Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .Jenkinsfile.deploy-argo.swp
Binary file not shown.
24 changes: 22 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node {
SSH_KEY = sh(returnStdout: true, script: 'cat /srv/jenkins/ssh_key')
NPMRC = sh(returnStdout: true, script: 'cat /srv/jenkins/npmrc')
}
// comment

pipeline {
environment {
Expand Down Expand Up @@ -115,22 +116,41 @@ pipeline {
stage('publish') {
steps {
slackSend (
message: "Jenkins PR build (${env.GIT_BRANCH_NAME}: ${env.GIT_REF}) - Publishing...",
message: "Jenkins PR build (${env.GIT_BRANCH_NAME}: ${env.GIT_REF}) - Publishing docker image...",
color: "#6067f1"
)
script {
docker.withRegistry('', credentialsId) {
sh """
docker push hellobloom/bloom-vault:${env.GIT_REF}
docker push hellobloom/bloom-vault
"""
}
}
slackSend (
message: "Jenkins PR build (${env.GIT_BRANCH_NAME}: ${env.GIT_REF}) - Publish finished! ${env.BUILD_URL}display/redirect",
color: "#ea8afb"
)
slackSend (
message: "Jenkins PR build (${env.GIT_BRANCH_NAME}: ${env.GIT_REF}) - Update helm chart repo",
color: "#6067f1"
)
script {
docker.withRegistry('', credentialsId) {
sh """
docker push hellobloom/bloom-vault:${env.GIT_REF}
docker push hellobloom/bloom-vault
"""
}
}
slackSend (
message: "Jenkins PR build (${env.GIT_BRANCH_NAME}: ${env.GIT_REF}) - Helm chart update finished! ${env.BUILD_URL}display/redirect",
color: "#ea8afb"
)
}
}
stage('deploy-bloom-co-dev') {
}
}

post {
Expand All @@ -141,4 +161,4 @@ pipeline {
)
}
}
}
}
86 changes: 86 additions & 0 deletions Jenkinsfile.deploy-argo
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
node {
SSH_KEY = sh(returnStdout: true, script: 'cat /srv/jenkins/ssh_key')
NPMRC = sh(returnStdout: true, script: 'cat /srv/jenkins/npmrc')
}

pipeline {
environment {
credentialsId = 'docker-hub-credentials'
}

agent any

stages {
stage('checkout') {
steps {
checkout scm
script {
env.GIT_BRANCH_NAME=sh(returnStdout: true, script: "git rev-parse --abbrev-ref HEAD").trim()
env.GIT_REF=sh(returnStdout: true, script: "git rev-parse HEAD").trim()
}
}
}
stage('build') {
steps {
//slackSend (
// message: "Jenkins deploy (${env.GIT_BRANCH_NAME}: ${env.GIT_REF}) - Build...",
// color: "#6067f1"
//)
//script {
// docker.withRegistry('', credentialsId) {
// sh """
// docker build -f Dockerfile . --build-arg SSH_KEY="$SSH_KEY" --build-arg NPMRC='$NPMRC' -t hellobloom/bloom-vault:${env.GIT_REF}
// docker tag hellobloom/bloom-vault:${env.GIT_REF} hellobloom/bloom-vault
// """
// }
//}
//slackSend (
// message: "Jenkins deploy (${env.GIT_BRANCH_NAME}: ${env.GIT_REF}) - Finished build",
// color: "#00e981"
//)
container('any') {
sh """
echo "Build
"""
}
}
}
stage('publish') {
steps {
// slackSend (
// message: "Jenkins deploy (${env.GIT_BRANCH_NAME}: ${env.GIT_REF}) - Publishing...",
// color: "#6067f1"
// )
// script {
// docker.withRegistry('', credentialsId) {
// sh """
// docker push hellobloom/bloom-vault:${env.GIT_REF}
// docker push hellobloom/bloom-vault
// """
// }
// }
// slackSend (
// message: "Jenkins deploy (${env.GIT_BRANCH_NAME}: ${env.GIT_REF}) - Publish finished! ${env.BUILD_URL}display/redirect",
// color: "#ea8afb"
// )
}
}
stage('deploy') {
steps {
//slackSend(
// message: "Manual deployment required. Use the `deploy.sh` scripts on Vault VMs.",
// color: "#00e981"
)
}
}
}

post {
unsuccessful {
//slackSend (
// message: "Jenkins deploy (${env.GIT_BRANCH_NAME}: ${env.GIT_REF}) - Unsuccessful ${env.BUILD_URL}display/redirect",
// color: "#c13801"
//)
}
}
}