From 48ea7c319e04cb992975000f8aefcbbe7fa0e612 Mon Sep 17 00:00:00 2001 From: Jakub Rusz Date: Thu, 2 Jun 2022 16:04:26 +0200 Subject: [PATCH] CI: Enable IQE trigger for prod branch Inserting different webhook url based on the deployed branch in the modified Jenkinsfile. Also renaming it to make more sense for us. --- .../{58231b16fdee45a03a4ee3cf94a9f2c3 => Jenkinsfile} | 2 +- .travis/custom_release.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) rename .travis/{58231b16fdee45a03a4ee3cf94a9f2c3 => Jenkinsfile} (97%) diff --git a/.travis/58231b16fdee45a03a4ee3cf94a9f2c3 b/.travis/Jenkinsfile similarity index 97% rename from .travis/58231b16fdee45a03a4ee3cf94a9f2c3 rename to .travis/Jenkinsfile index eff672b6..e395b4eb 100644 --- a/.travis/58231b16fdee45a03a4ee3cf94a9f2c3 +++ b/.travis/Jenkinsfile @@ -71,7 +71,7 @@ node { sh "python3 bustCache.py $EDGERC ${APP_NAME} ${BRANCH}" } // Trigger IQE pipelines - sh ("curl -X POST -H 'Content-type: application/json' --data '{\"text\":\"Trigger IQE pipelines\"}' https://smee.io/IQDT9yRXsWlqbxpg") + sh ("curl -X POST -H 'Content-type: application/json' --data '{\"text\":\"Trigger IQE pipelines\"}' WEBHOOK_PLACEHOLDER") } } } diff --git a/.travis/custom_release.sh b/.travis/custom_release.sh index fa8898a6..4c3234b8 100755 --- a/.travis/custom_release.sh +++ b/.travis/custom_release.sh @@ -6,8 +6,10 @@ if [ "${TRAVIS_BRANCH}" = "main" ]; then fi if [ "${TRAVIS_BRANCH}" = "stage-stable" ]; then - # Use modified Jenkinsfile - curl -o .travis/58231b16fdee45a03a4ee3cf94a9f2c3 https://raw.githubusercontent.com/RedHatInsights/image-builder-frontend/stage-stable/.travis/58231b16fdee45a03a4ee3cf94a9f2c3 + # Download modified Jenkinsfile + curl -o .travis/58231b16fdee45a03a4ee3cf94a9f2c3 https://raw.githubusercontent.com/RedHatInsights/image-builder-frontend/stage-stable/.travis/Jenkinsfile + # Insert stage webhook URL + sed -i 's|WEBHOOK_PLACEHOLDER|https://smee.io/IQDT9yRXsWlqbxpg|g' 58231b16fdee45a03a4ee3cf94a9f2c3 .travis/release.sh "stage-stable" fi @@ -16,5 +18,9 @@ if [ "${TRAVIS_BRANCH}" = "prod-beta" ]; then fi if [ "${TRAVIS_BRANCH}" = "prod-stable" ]; then + # Download modified Jenkinsfile + curl -o .travis/58231b16fdee45a03a4ee3cf94a9f2c3 https://raw.githubusercontent.com/RedHatInsights/image-builder-frontend/stage-stable/.travis/Jenkinsfile + # Insert prod webhook URL + sed -i 's|WEBHOOK_PLACEHOLDER|https://smee.io/F9gZwIGELxwah4if|g' 58231b16fdee45a03a4ee3cf94a9f2c3 .travis/release.sh "prod-stable" fi