-
Notifications
You must be signed in to change notification settings - Fork 5
/
.update-hashes
34 lines (32 loc) · 1.05 KB
/
.update-hashes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
pipeline {
agent any
triggers {
cron('H * * * *')
}
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
}
stages {
stage('Hash Update') {
steps {
sh '''
bash setup.sh
git add layers || true
git add sources || true
if [ -n "$(git status --porcelain -uno)" ] ; then
git commit -m "Update git update repository hash values $(date +%y%m%d%H%M)"
git push origin HEAD:$BRANCH_NAME
fi
'''
}
}
}
post {
failure {
emailext body: 'Check console output at $BUILD_URL to view the results. \n\n ${CHANGES} \n\n -------------------------------------------------- \n${BUILD_LOG, maxLines=100, escapeHtml=false}',
to: '[email protected]',
subject: 'Build failed in Jenkins: $PROJECT_NAME - #$BUILD_NUMBER'
}
}
}