Skip to content

Commit

Permalink
serviceAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Aug 3, 2018
1 parent a16ccb0 commit 4a7a12d
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions helm/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,13 @@ pipeline {
agent {
kubernetes {
label 'helm-pod'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
some-label: helm-pod
spec:
serviceAccount: jenkins
containers:
- name: helm-pod
image: wardviaene/helm-s3
command:
- cat
tty: true
"""
serviceAccount 'jenkins'
containerTemplate {
name 'helm-pod'
image 'wardviaene/helm-s3'
ttyEnabled true
command 'cat'
}
}
}
stages {
Expand All @@ -29,7 +20,7 @@ spec:
HELM_BUCKET=helm-rytcufor
PACKAGE=demo-chart
export AWS_REGION=eu-west-1

cp -r /home/helm/.helm ~
helm repo add my-charts s3://${HELM_BUCKET}/charts
DEPLOYED=$(helm list |grep -E "^${PACKAGE}" |grep DEPLOYED |wc -l)
Expand All @@ -38,6 +29,7 @@ spec:
else
helm upgrade ${PACKAGE} my-charts/${PACKAGE}
fi
echo "deployed!"
'''
}
}
Expand Down

0 comments on commit 4a7a12d

Please sign in to comment.