From 0a8864eda82a196000c251fc04f8a9c541eba3cd Mon Sep 17 00:00:00 2001 From: Subhash Khileri Date: Wed, 19 Jul 2023 11:22:12 +0530 Subject: [PATCH] upstream merge conflict fix --- .github/workflows/bootstrap-cluster.yml | 3 ++- .github/workflows/sync.yml | 8 ++++++++ hack/bootstrap-cluster.sh | 11 +++-------- hack/preview.sh | 7 +------ 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/bootstrap-cluster.yml b/.github/workflows/bootstrap-cluster.yml index 4d7b8a680fe..7fb649568c4 100644 --- a/.github/workflows/bootstrap-cluster.yml +++ b/.github/workflows/bootstrap-cluster.yml @@ -34,6 +34,7 @@ jobs: # Slashes have to be escaped as those variables are given to sed as a param SPI_API_SERVER: "https:\\/\\/api-toolchain-host-operator.apps.hac-devsandbox.5unc.p1.openshiftapps.com" HAS_DEFAULT_IMAGE_REPOSITORY: "quay.io\\/hacdev\\/build_service" + BROKER: true run: | # Setup GIT access git config --global user.name 'Katka92' @@ -58,7 +59,7 @@ jobs: sed -i "s/IMAGE_CONTROLLER_QUAY_TOKEN=.*/IMAGE_CONTROLLER_QUAY_TOKEN=${IMAGE_CONTROLLER_QUAY_TOKEN}/g" hack/preview.env # Bootstrap the cluster - hack/bootstrap-cluster.sh preview --toolchain --keycloak --broker + hack/bootstrap-cluster.sh preview --toolchain --keycloak # Set the docker secret to push HAS images to quay if doesn't exist yet if [[ ! $(oc get secrets -n build-templates | grep redhat-appstudio-user-workload) ]]; then diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index a8e36c1878b..ff055ac3299 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -21,3 +21,11 @@ jobs: git fetch upstream git merge upstream/main git push origin main + + - name: Slack alert on merge failure + if: failure() + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + CHANNEL_ID: "C04U7TA1BT8" # forum-rhtap-test-execution-alerts + run: | + curl -H "Authorization: Bearer ${SLACK_BOT_TOKEN}" -d "text=:alert-siren: infra-deployments upstream merge job failed" -d "channel=${CHANNEL_ID}" -X POST https://slack.com/api/chat.postMessage diff --git a/hack/bootstrap-cluster.sh b/hack/bootstrap-cluster.sh index f7527809a34..95979e42c6c 100755 --- a/hack/bootstrap-cluster.sh +++ b/hack/bootstrap-cluster.sh @@ -3,7 +3,7 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/.. main() { - local mode keycloak toolchain obo broker + local mode keycloak toolchain obo while [[ $# -gt 0 ]]; do key=$1 case $key in @@ -15,10 +15,6 @@ main() { keycloak="--keycloak" shift ;; - --broker | -b) - broker="--broker" - shift - ;; --obo | -o) obo="--obo" shift @@ -60,7 +56,7 @@ main() { fi ;; "preview") - $ROOT/hack/preview.sh $toolchain $keycloak $obo $broker + $ROOT/hack/preview.sh $toolchain $keycloak $obo ;; esac } @@ -71,10 +67,9 @@ print_help() { echo " -t, --toolchain (only in preview mode) Install toolchain operators" echo " -kc, --keycloak (only in preview mode) Configure the toolchain operator to use keycloak deployed on the cluster" echo " -o, --obo (only in preview mode) Install Observability operator and Prometheus instance for federation" - echo " -b, --broker (only in preview mode) Install Pact Broker" echo " -h, --help Show this help message and exit" echo - echo "Example usage: \`$0 preview --toolchain --keycloak --obo --broker" + echo "Example usage: \`$0 preview --toolchain --keycloak --obo" } if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then diff --git a/hack/preview.sh b/hack/preview.sh index 287ad453c64..ef7d98299b5 100755 --- a/hack/preview.sh +++ b/hack/preview.sh @@ -10,9 +10,8 @@ function print_help() { echo " --toolchain (only in preview mode) Install toolchain operators" echo " --keycloak (only in preview mode) Configure the toolchain operator to use keycloak deployed on the cluster" echo " --obo (only in preview mode) Install Observability operator and Prometheus instance for federation" - echo " --broker (only in preview mode) Install Pact Broker" echo - echo "Example usage: \`$0 --toolchain --keycloak --broker" + echo "Example usage: \`$0 --toolchain --keycloak --obo" } TOOLCHAIN=false KEYCLOAK=false @@ -29,10 +28,6 @@ while [[ $# -gt 0 ]]; do KEYCLOAK=true shift ;; - --broker) - BROKER=true - shift - ;; --obo) OBO=true shift