Skip to content

Commit

Permalink
Add continuous deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Jul 22, 2024
1 parent 751af1c commit e940724
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pipeline {
agent any

environment {
PROJECT = 'sul-dlss/sul-solr-configs'
}

stages {
stage('Config deploy') {
when {
branch 'master'
}

steps {
checkout scm

sshagent (['sul-devops-team', 'sul-continuous-deployment']){
sh '''#!/bin/bash -l
git diff --name-only $GIT_PREVIOUS_SUCCESSFUL_COMMIT $GIT_COMMIT |
xargs dirname | sort | uniq |
grep -v "spec/" | grep -v "plugins" | grep -v "\." |
xargs -I {} ssh [email protected] -- ~/bin/upconfig {}
'''
}
}

post {
always {
build job: '/Continuous Deployment/Slack Deployment Notification', parameters: [
string(name: 'PROJECT', value: env.PROJECT),
string(name: 'GIT_COMMIT', value: env.GIT_COMMIT),
string(name: 'GIT_URL', value: env.GIT_URL),
string(name: 'GIT_PREVIOUS_SUCCESSFUL_COMMIT', value: env.GIT_PREVIOUS_SUCCESSFUL_COMMIT),
string(name: 'DEPLOY_ENVIRONMENT', value: env.DEPLOY_ENVIRONMENT),
string(name: 'TAG_NAME', value: env.TAG_NAME),
booleanParam(name: 'SUCCESS', value: currentBuild.resultIsBetterOrEqualTo('SUCCESS')),
string(name: 'RUN_DISPLAY_URL', value: env.RUN_DISPLAY_URL)
]
}
}
}
}
}

0 comments on commit e940724

Please sign in to comment.