diff --git a/Jenkinsfile b/Jenkinsfile index ce39fd0..3a39e94 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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''' + + } + } + } + } + } } \ No newline at end of file diff --git a/Makefile b/Makefile index d6a6182..27ef6c7 100644 --- a/Makefile +++ b/Makefile @@ -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 .