From 573f664708a19b424637506c96f79b369487aa27 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Sun, 16 Aug 2020 21:32:49 +0800 Subject: [PATCH] Added GChat notification --- Dockerfile | 4 ++-- Jenkinsfile | 6 +++++- Jenkinsfile.old | 27 --------------------------- 3 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 Jenkinsfile.old diff --git a/Dockerfile b/Dockerfile index fafd4cc..9939870 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Base on latest (edge) alpine image -FROM harbor.ervine.dev/library/x86_64/alpine/alpine:3.12 +FROM harbor.ervine.dev/public/x86_64/alpine:v3.12 -MAINTAINER “Jonathan Ervine” +LABEL "Maintainer Jonathan Ervine " # Install updates # Create mediaservice user diff --git a/Jenkinsfile b/Jenkinsfile index d67809e..8d27c03 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,8 +27,12 @@ spec: stage('Build with Kaniko') { git 'https://git.ervine.org/jonny/x86_64-alpine-htpcmgr.git' container('kaniko') { - sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/library/x86_64/alpine/htpc-mgr:latest --destination=harbor.ervine.dev/library/x86_64/alpine/htpc-mgr:2019' + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/htpc-mgr:latest --destination=harbor.ervine.dev/public/x86_64/alpine/htpc-mgr:2019' } } } } + +stage('Notify gchat') { + hangoutsNotify message: "Alpine Linux 3.12.0 with HTPC Manager has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false +} diff --git a/Jenkinsfile.old b/Jenkinsfile.old deleted file mode 100644 index 921dda0..0000000 --- a/Jenkinsfile.old +++ /dev/null @@ -1,27 +0,0 @@ -node("docker-node") { - docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') { - - git branch: "master", url: "ssh://git@git.ervine.org/jonny/x86_64-alpine-htpcmgr", credentialsId: 'jenkins-to-git' - - sh "git rev-parse HEAD > .git/commit-id" - def commit_id = readFile('.git/commit-id').trim() - println commit_id - - try { - - stage "build" - def app = docker.build "library/x86_64/alpine/htpc-mgr" - - stage "publish" - app.push("${env.BUILD_NUMBER}") - app.push("latest") - - stage('Deploy on K8s'){ - sh "/usr/local/bin/kubectl -n media delete po htpc-0" - } - } - catch (err) { - currentBuild.result = 'FAILURE' - } - } -}