From 0779c9ae219b6a6d1015201f5b8fb99a47f2d23d Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Tue, 15 Dec 2020 14:03:02 +0800 Subject: [PATCH 1/5] Adding code to reack branch issue-#1 --- Dockerfile | 2 +- Jenkinsfile | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2549cc0..12c3bec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN apk update && \ apk -U upgrade --ignore alpine-baselayout && \ apk -U add python3 gcc py3-pip python3-dev musl-dev libffi-dev git curl && \ adduser -D python && \ - mkdir /data && cd /data && git clone --single-branch --branch master https://git.ervine.org/jonny/flask-python-helm /data && \ + mkdir /data && cd /data && git clone --single-branch --branch issue-#1 https://git.ervine.org/jonny/flask-python-helm /data && \ pip3 install -r /data/requirements.txt && \ curl -L "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl && \ chmod 755 /usr/local/bin/kubectl && \ diff --git a/Jenkinsfile b/Jenkinsfile index bff5a91..05cf44f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,14 +25,14 @@ spec: node(POD_LABEL) { stage('Build with Kaniko') { - git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-helm-python.git', credentialsId: 'jenkins-to-git' + git branch: 'issue-#1', url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-helm-python.git', credentialsId: 'jenkins-to-git' container('kaniko') { - sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12.0 --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-2.13.1:v3.12.0 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-2.13.1:v3.12' + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-2.13.1:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-2.13.1:v3.12-1' } } + stage('Notify gchat') { + hangoutsNotify message: "Helm python flask Application on Alpine Linux 3.12.1 has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false + } } } -stage('Notify gchat') { - hangoutsNotify message: "Helm python flask Application on Alpine Linux 3.12.0 has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false -} From 4a0db2898864dc68b8d9544a4069a60410811d1b Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Tue, 15 Dec 2020 14:55:10 +0800 Subject: [PATCH 2/5] Remove build cache --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 05cf44f..dc67cee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ spec: stage('Build with Kaniko') { git branch: 'issue-#1', url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-helm-python.git', credentialsId: 'jenkins-to-git' container('kaniko') { - sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-2.13.1:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-2.13.1:v3.12-1' + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-2.13.1:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-2.13.1:v3.12-1' } } stage('Notify gchat') { From 3d6ed7237abaf60f87cb30d5af35b43f11aadaff Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Wed, 16 Dec 2020 12:55:38 +0800 Subject: [PATCH 3/5] Use helm3 --- Dockerfile | 4 ++-- Jenkinsfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 12c3bec..923be47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,8 @@ RUN apk update && \ pip3 install -r /data/requirements.txt && \ curl -L "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl && \ chmod 755 /usr/local/bin/kubectl && \ - curl -L https://get.helm.sh/helm-v2.13.1-linux-amd64.tar.gz -o /tmp/helm-2.13.1.tgz && \ - tar -zxvf /tmp/helm-2.13.1.tgz --strip-components=1 -C /usr/local/bin linux-amd64/helm && \ + curl -L https://get.helm.sh/helm-v3.4.2-linux-amd64.tar.gz -o /tmp/helm.tgz && \ + tar -zxvf /tmp/helm.tgz --strip-components=1 -C /usr/local/bin linux-amd64/helm && \ rm -rf /tmp/src && rm -rf /var/cache/apk/* EXPOSE 3000 diff --git a/Jenkinsfile b/Jenkinsfile index dc67cee..436b31a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ spec: stage('Build with Kaniko') { git branch: 'issue-#1', url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-helm-python.git', credentialsId: 'jenkins-to-git' container('kaniko') { - sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-2.13.1:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-2.13.1:v3.12-1' + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-3:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-3:v3.12-1' } } stage('Notify gchat') { From eba056a70f08f819419076bd29bc067cca6080c7 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Wed, 16 Dec 2020 13:54:49 +0800 Subject: [PATCH 4/5] Removed kubectl download --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 923be47..74bdce2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,6 @@ RUN apk update && \ adduser -D python && \ mkdir /data && cd /data && git clone --single-branch --branch issue-#1 https://git.ervine.org/jonny/flask-python-helm /data && \ pip3 install -r /data/requirements.txt && \ - curl -L "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl && \ - chmod 755 /usr/local/bin/kubectl && \ curl -L https://get.helm.sh/helm-v3.4.2-linux-amd64.tar.gz -o /tmp/helm.tgz && \ tar -zxvf /tmp/helm.tgz --strip-components=1 -C /usr/local/bin linux-amd64/helm && \ rm -rf /tmp/src && rm -rf /var/cache/apk/* From 6888017548d41cdd1646ad199e3a0c17abfb12de Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Fri, 18 Dec 2020 10:10:31 +0800 Subject: [PATCH 5/5] Reset to master settings --- Dockerfile | 2 +- Jenkinsfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 74bdce2..b36116c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN apk update && \ apk -U upgrade --ignore alpine-baselayout && \ apk -U add python3 gcc py3-pip python3-dev musl-dev libffi-dev git curl && \ adduser -D python && \ - mkdir /data && cd /data && git clone --single-branch --branch issue-#1 https://git.ervine.org/jonny/flask-python-helm /data && \ + mkdir /data && cd /data && git clone --single-branch --branch master https://git.ervine.org/jonny/flask-python-helm /data && \ pip3 install -r /data/requirements.txt && \ curl -L https://get.helm.sh/helm-v3.4.2-linux-amd64.tar.gz -o /tmp/helm.tgz && \ tar -zxvf /tmp/helm.tgz --strip-components=1 -C /usr/local/bin linux-amd64/helm && \ diff --git a/Jenkinsfile b/Jenkinsfile index 436b31a..0d3d034 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,9 +25,9 @@ spec: node(POD_LABEL) { stage('Build with Kaniko') { - git branch: 'issue-#1', url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-helm-python.git', credentialsId: 'jenkins-to-git' + git branch: 'master', url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-helm-python.git', credentialsId: 'jenkins-to-git' container('kaniko') { - sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-3:v3.12.1-1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-3:v3.12-1' + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12.1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm:v3.12 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-3:v3.12.1 --destination=harbor.ervine.dev/public/x86_64/alpine/helm-3:v3.12' } } stage('Notify gchat') {