Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Commit

Permalink
Image build with network=host (#22)
Browse files Browse the repository at this point in the history
Send slack notification

Co-authored-by: osher cohen <[email protected]>
  • Loading branch information
oshercc and osher cohen authored Aug 31, 2020
1 parent e9292b2 commit 2db5be6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
29 changes: 17 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,21 @@ pipeline {

}
}
post {
failure {
script {
if (env.BRANCH_NAME == 'master')
stage('notify master branch fail') {
withCredentials([string(credentialsId: 'slack-token', variable: 'TOKEN')]) {
sh '''curl -X POST -H 'Content-type: application/json' --data '{"text":"Attention! master branch push integration failed, Check $BUILD_URL"}' https://hooks.slack.com/services/${TOKEN}'''
}
}
}
}
}
post {
failure {
script {
if (env.BRANCH_NAME == 'master')
stage('notify master branch fail') {
withCredentials([string(credentialsId: 'slack-token', variable: 'TOKEN')]) {
script {
def data = [text: "Attention! assisted-ignition-generator branch test failed, see: ${BUILD_URL}"]
writeJSON(file: 'data.txt', json: data, pretty: 4)
}
sh '''curl -X POST -H 'Content-type: application/json' --data-binary "@data.txt" https://hooks.slack.com/services/$TOKEN'''

}
}
}
}
}
}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
skipper build assisted-ignition-generator

build-image:
docker build -f Dockerfile.assisted-ignition-generator . -t $(GENERATOR)
docker build --network=host -f Dockerfile.assisted-ignition-generator . -t $(GENERATOR)

update: build
GIT_REVISION=${GIT_REVISION} docker build --pull --build-arg GIT_REVISION -t $(GENERATOR) -f Dockerfile.assisted-ignition-generator .
Expand Down

0 comments on commit 2db5be6

Please sign in to comment.