chore (Jenkinsfile): package and deploy
This commit is contained in:
parent
71a0889ad8
commit
f440437862
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
.idea
|
.idea
|
||||||
*.iml
|
*.iml
|
||||||
|
target
|
21
Jenkinsfile
vendored
21
Jenkinsfile
vendored
@ -12,5 +12,26 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Package') {
|
||||||
|
steps {
|
||||||
|
container('chart-testing'){
|
||||||
|
sh 'mkdir target'
|
||||||
|
sh 'for dir in charts/*; do helm package --destination target "$dir"; done'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deploy') {
|
||||||
|
steps {
|
||||||
|
container('vault') {
|
||||||
|
script {
|
||||||
|
env.NEXUS_USER = sh(script: 'vault read -field=username secret/ops/account/nexus', returnStdout: true)
|
||||||
|
env.NEXUS_PWD = sh(script: 'vault read -field=password secret/ops/account/nexus', returnStdout: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
container('alpine') {
|
||||||
|
sh 'set +x; for chart in target/*; do curl -L -u $NEXUS_USER:$NEXUS_PWD http://registry.molgenis.org/repository/helm/ --upload-file "$chart"; done'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -593,6 +593,29 @@ jenkins:
|
|||||||
Command: cat
|
Command: cat
|
||||||
WorkingDir: /home/jenkins
|
WorkingDir: /home/jenkins
|
||||||
TTY: true
|
TTY: true
|
||||||
|
alpine:
|
||||||
|
Image: "spotify/alpine"
|
||||||
|
Command: cat
|
||||||
|
WorkingDir: /home/jenkins
|
||||||
|
TTY: true
|
||||||
|
vault:
|
||||||
|
Image: "vault"
|
||||||
|
Command: cat
|
||||||
|
WorkingDir: /home/jenkins
|
||||||
|
TTY: true
|
||||||
|
EnvVars:
|
||||||
|
- type: Secret
|
||||||
|
key: VAULT_TOKEN
|
||||||
|
secretName: molgenis-pipeline-vault-secret
|
||||||
|
secretKey: token
|
||||||
|
- type: Secret
|
||||||
|
key: VAULT_SKIP_VERIFY
|
||||||
|
secretName: molgenis-pipeline-vault-secret
|
||||||
|
secretKey: skipVerify
|
||||||
|
- type: Secret
|
||||||
|
key: VAULT_ADDR
|
||||||
|
secretName: molgenis-pipeline-vault-secret
|
||||||
|
secretKey: addr
|
||||||
NodeSelector: {}
|
NodeSelector: {}
|
||||||
|
|
||||||
# secret contains configuration for the kubernetes secrets that jenkins can access
|
# secret contains configuration for the kubernetes secrets that jenkins can access
|
||||||
|
Loading…
Reference in New Issue
Block a user