diff --git a/ci-operator/step-registry/aws/c2s/get-project-info/aws-c2s-get-project-info-commands.sh b/ci-operator/step-registry/aws/c2s/get-project-info/aws-c2s-get-project-info-commands.sh index c9d4ac9eaf57e..be0b763363d6d 100644 --- a/ci-operator/step-registry/aws/c2s/get-project-info/aws-c2s-get-project-info-commands.sh +++ b/ci-operator/step-registry/aws/c2s/get-project-info/aws-c2s-get-project-info-commands.sh @@ -4,7 +4,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' EXIT TERM REGION="${LEASED_RESOURCE}" @@ -56,4 +62,4 @@ echo "$PublicAvailabilityZones" > "${SHARED_DIR}/public_availability_zones" echo "$PrivateSubnetIds" > "${SHARED_DIR}/subnet_ids" echo "$PrivateAvailabilityZones" > "${SHARED_DIR}/availability_zones" -exit 0 \ No newline at end of file +exit 0 diff --git a/ci-operator/step-registry/aws/c2s/init-token-service/aws-c2s-init-token-service-commands.sh b/ci-operator/step-registry/aws/c2s/init-token-service/aws-c2s-init-token-service-commands.sh index 821757218c9f4..8fe057bda31cc 100755 --- a/ci-operator/step-registry/aws/c2s/init-token-service/aws-c2s-init-token-service-commands.sh +++ b/ci-operator/step-registry/aws/c2s/init-token-service/aws-c2s-init-token-service-commands.sh @@ -2,6 +2,14 @@ set -o nounset +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"' EXIT TERM + # ------------------------------------------------------------------------------------------------ # Initialize temporary credential on C2S and SC2S regions # 1. Get credential from temporary credentional provider endpoint provided by SHIFT, diff --git a/ci-operator/step-registry/aws/c2s/instance-metadata/aws-c2s-instance-metadata-commands.sh b/ci-operator/step-registry/aws/c2s/instance-metadata/aws-c2s-instance-metadata-commands.sh index 2444c9ac699c2..6e5c478e2a30f 100755 --- a/ci-operator/step-registry/aws/c2s/instance-metadata/aws-c2s-instance-metadata-commands.sh +++ b/ci-operator/step-registry/aws/c2s/instance-metadata/aws-c2s-instance-metadata-commands.sh @@ -5,7 +5,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' EXIT TERM # ---------------------------------------------------------------------- # C2S apply metadata patch diff --git a/ci-operator/step-registry/aws/c2s/mirror-images/aws-c2s-mirror-images-commands.sh b/ci-operator/step-registry/aws/c2s/mirror-images/aws-c2s-mirror-images-commands.sh index a0f57ba1d0965..bd70a2ad9eae3 100755 --- a/ci-operator/step-registry/aws/c2s/mirror-images/aws-c2s-mirror-images-commands.sh +++ b/ci-operator/step-registry/aws/c2s/mirror-images/aws-c2s-mirror-images-commands.sh @@ -4,8 +4,13 @@ set -o nounset set -o errexit set -o pipefail - -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' EXIT TERM new_pull_secret="${SHARED_DIR}/new_pull_secret" diff --git a/ci-operator/step-registry/aws/cluster/public-to-private/aws-cluster-public-to-private-commands.sh b/ci-operator/step-registry/aws/cluster/public-to-private/aws-cluster-public-to-private-commands.sh index bce9ba658a64a..16da781b6a11f 100644 --- a/ci-operator/step-registry/aws/cluster/public-to-private/aws-cluster-public-to-private-commands.sh +++ b/ci-operator/step-registry/aws/cluster/public-to-private/aws-cluster-public-to-private-commands.sh @@ -4,7 +4,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' EXIT TERM export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/aws/provision/bastionhost/aws-provision-bastionhost-commands.sh b/ci-operator/step-registry/aws/provision/bastionhost/aws-provision-bastionhost-commands.sh index 486a1c30b0c17..ad0c637772ad8 100644 --- a/ci-operator/step-registry/aws/provision/bastionhost/aws-provision-bastionhost-commands.sh +++ b/ci-operator/step-registry/aws/provision/bastionhost/aws-provision-bastionhost-commands.sh @@ -4,9 +4,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM -#Save stacks events -trap 'save_stack_events_to_artifacts' EXIT TERM INT +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi; save_stack_events_to_artifacts' EXIT TERM INT export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/aws/provision/cco-manual-users/static/aws-provision-cco-manual-users-static-commands.sh b/ci-operator/step-registry/aws/provision/cco-manual-users/static/aws-provision-cco-manual-users-static-commands.sh index d09e873b530ff..839d7d08ef869 100644 --- a/ci-operator/step-registry/aws/provision/cco-manual-users/static/aws-provision-cco-manual-users-static-commands.sh +++ b/ci-operator/step-registry/aws/provision/cco-manual-users/static/aws-provision-cco-manual-users-static-commands.sh @@ -4,7 +4,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' EXIT TERM export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/aws/provision/edge-zone-subnet/aws-provision-edge-zone-subnet-commands.sh b/ci-operator/step-registry/aws/provision/edge-zone-subnet/aws-provision-edge-zone-subnet-commands.sh index 2a27ecc2a7e6f..480f5b89525d4 100644 --- a/ci-operator/step-registry/aws/provision/edge-zone-subnet/aws-provision-edge-zone-subnet-commands.sh +++ b/ci-operator/step-registry/aws/provision/edge-zone-subnet/aws-provision-edge-zone-subnet-commands.sh @@ -6,8 +6,13 @@ set -o pipefail set -x -#Save stacks events -trap 'save_stack_events_to_artifacts' EXIT TERM INT +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; save_stack_events_to_artifacts' EXIT TERM INT export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" @@ -448,4 +453,4 @@ else exit 1 fi -set +x \ No newline at end of file +set +x diff --git a/ci-operator/step-registry/aws/provision/iam-profile/aws-provision-iam-profile-commands.sh b/ci-operator/step-registry/aws/provision/iam-profile/aws-provision-iam-profile-commands.sh index cef7805eefde9..e9267df488073 100644 --- a/ci-operator/step-registry/aws/provision/iam-profile/aws-provision-iam-profile-commands.sh +++ b/ci-operator/step-registry/aws/provision/iam-profile/aws-provision-iam-profile-commands.sh @@ -4,7 +4,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' EXIT TERM export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/aws/provision/iam-role/aws-provision-iam-role-commands.sh b/ci-operator/step-registry/aws/provision/iam-role/aws-provision-iam-role-commands.sh index acba455f6d437..5c18cef0ce8bf 100644 --- a/ci-operator/step-registry/aws/provision/iam-role/aws-provision-iam-role-commands.sh +++ b/ci-operator/step-registry/aws/provision/iam-role/aws-provision-iam-role-commands.sh @@ -4,7 +4,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' EXIT TERM export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/aws/provision/iam-user/aws-provision-iam-user-commands.sh b/ci-operator/step-registry/aws/provision/iam-user/aws-provision-iam-user-commands.sh index d2af1dafbac21..d5ea65c2131b7 100644 --- a/ci-operator/step-registry/aws/provision/iam-user/aws-provision-iam-user-commands.sh +++ b/ci-operator/step-registry/aws/provision/iam-user/aws-provision-iam-user-commands.sh @@ -4,8 +4,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM -trap 'rm -f /tmp/aws_cred_output' EXIT TERM INT +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi; rm -f /tmp/aws_cred_output' EXIT TERM INT export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" REGION="${LEASED_RESOURCE}" diff --git a/ci-operator/step-registry/aws/provision/kms-key/aws-provision-kms-key-commands.sh b/ci-operator/step-registry/aws/provision/kms-key/aws-provision-kms-key-commands.sh index c0ebc2920bd10..3a484508ef87d 100644 --- a/ci-operator/step-registry/aws/provision/kms-key/aws-provision-kms-key-commands.sh +++ b/ci-operator/step-registry/aws/provision/kms-key/aws-provision-kms-key-commands.sh @@ -4,7 +4,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' EXIT TERM export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/aws/provision/route53/private-hosted-zone/associate-diff-vpc/aws-provision-route53-private-hosted-zone-associate-diff-vpc-commands.sh b/ci-operator/step-registry/aws/provision/route53/private-hosted-zone/associate-diff-vpc/aws-provision-route53-private-hosted-zone-associate-diff-vpc-commands.sh index a1727e603771c..38231cdcd045b 100755 --- a/ci-operator/step-registry/aws/provision/route53/private-hosted-zone/associate-diff-vpc/aws-provision-route53-private-hosted-zone-associate-diff-vpc-commands.sh +++ b/ci-operator/step-registry/aws/provision/route53/private-hosted-zone/associate-diff-vpc/aws-provision-route53-private-hosted-zone-associate-diff-vpc-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"' EXIT TERM + REGION="${LEASED_RESOURCE}" CLUSTER_NAME="${NAMESPACE}-${UNIQUE_HASH}" diff --git a/ci-operator/step-registry/aws/provision/route53/private-hosted-zone/aws-provision-route53-private-hosted-zone-commands.sh b/ci-operator/step-registry/aws/provision/route53/private-hosted-zone/aws-provision-route53-private-hosted-zone-commands.sh index e6a53433146e0..c8553c8ee353e 100755 --- a/ci-operator/step-registry/aws/provision/route53/private-hosted-zone/aws-provision-route53-private-hosted-zone-commands.sh +++ b/ci-operator/step-registry/aws/provision/route53/private-hosted-zone/aws-provision-route53-private-hosted-zone-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"' EXIT TERM + export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" if [[ ${ENABLE_SHARED_PHZ} == "yes" ]]; then CLUSTER_CREATOR_USER_ARN=$(aws sts get-caller-identity | jq -r '.Arn') diff --git a/ci-operator/step-registry/aws/provision/security-group/aws-provision-security-group-commands.sh b/ci-operator/step-registry/aws/provision/security-group/aws-provision-security-group-commands.sh index ceb7f7ab95ea3..f840b02ac297c 100644 --- a/ci-operator/step-registry/aws/provision/security-group/aws-provision-security-group-commands.sh +++ b/ci-operator/step-registry/aws/provision/security-group/aws-provision-security-group-commands.sh @@ -4,7 +4,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' EXIT TERM export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/aws/provision/tags-for-byo-vpc/aws-provision-tags-for-byo-vpc-commands.sh b/ci-operator/step-registry/aws/provision/tags-for-byo-vpc/aws-provision-tags-for-byo-vpc-commands.sh index 0ee57c17f31be..beb415a20bf46 100644 --- a/ci-operator/step-registry/aws/provision/tags-for-byo-vpc/aws-provision-tags-for-byo-vpc-commands.sh +++ b/ci-operator/step-registry/aws/provision/tags-for-byo-vpc/aws-provision-tags-for-byo-vpc-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"' EXIT TERM + export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" REGION=${REGION:-$LEASED_RESOURCE} @@ -46,4 +54,4 @@ if [[ ${ENABLE_AWS_EDGE_ZONE} == "yes" ]] && [[ ${EDGE_ZONE_TYPES} == "outpost" # public id aws --region $REGION ec2 create-tags --resources $edge_zone_public_subnet_id --tags Key=kubernetes.io/role/elb,Value=1 -fi \ No newline at end of file +fi diff --git a/ci-operator/step-registry/aws/provision/tags-for-byo-vpc/ocm/pre/aws-provision-tags-for-byo-vpc-ocm-pre-commands.sh b/ci-operator/step-registry/aws/provision/tags-for-byo-vpc/ocm/pre/aws-provision-tags-for-byo-vpc-ocm-pre-commands.sh index 8647abe7104d6..6a68bb5343975 100644 --- a/ci-operator/step-registry/aws/provision/tags-for-byo-vpc/ocm/pre/aws-provision-tags-for-byo-vpc-ocm-pre-commands.sh +++ b/ci-operator/step-registry/aws/provision/tags-for-byo-vpc/ocm/pre/aws-provision-tags-for-byo-vpc-ocm-pre-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"' EXIT TERM + if [[ ${ENABLE_SHARED_VPC} == "yes" ]]; then echo "Using shared account" export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred_shared_account" diff --git a/ci-operator/step-registry/aws/provision/vpc/disconnected/aws-provision-vpc-disconnected-commands.sh b/ci-operator/step-registry/aws/provision/vpc/disconnected/aws-provision-vpc-disconnected-commands.sh index c548fb6005e8e..01c4d9e6e8aa4 100644 --- a/ci-operator/step-registry/aws/provision/vpc/disconnected/aws-provision-vpc-disconnected-commands.sh +++ b/ci-operator/step-registry/aws/provision/vpc/disconnected/aws-provision-vpc-disconnected-commands.sh @@ -4,8 +4,13 @@ set -o nounset set -o errexit set -o pipefail -#Save stacks events -trap 'save_stack_events_to_artifacts' EXIT TERM INT +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; save_stack_events_to_artifacts' EXIT TERM export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/aws/provision/vpc/shared/aws-provision-vpc-shared-commands.sh b/ci-operator/step-registry/aws/provision/vpc/shared/aws-provision-vpc-shared-commands.sh index 5fe9133f55ffb..ac340958ca2be 100644 --- a/ci-operator/step-registry/aws/provision/vpc/shared/aws-provision-vpc-shared-commands.sh +++ b/ci-operator/step-registry/aws/provision/vpc/shared/aws-provision-vpc-shared-commands.sh @@ -4,8 +4,13 @@ set -o nounset set -o errexit set -o pipefail -#Save stacks events -trap 'save_stack_events_to_artifacts' EXIT TERM INT +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; save_stack_events_to_artifacts' EXIT TERM export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" if [[ ${ENABLE_SHARED_VPC} == "yes" ]]; then diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/bootstrap-ignition/cucushift-installer-check-aws-bootstrap-ignition-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/bootstrap-ignition/cucushift-installer-check-aws-bootstrap-ignition-commands.sh index 26a42cd525d0e..2c0876f64c414 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/bootstrap-ignition/cucushift-installer-check-aws-bootstrap-ignition-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/bootstrap-ignition/cucushift-installer-check-aws-bootstrap-ignition-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + REGION="${LEASED_RESOURCE}" INFRA_ID=$(jq -r '.infraID' ${SHARED_DIR}/metadata.json) export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/byo-iam-profile/cucushift-installer-check-aws-byo-iam-profile-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/byo-iam-profile/cucushift-installer-check-aws-byo-iam-profile-commands.sh index 30b997916f58f..d3b08c457f6a4 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/byo-iam-profile/cucushift-installer-check-aws-byo-iam-profile-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/byo-iam-profile/cucushift-installer-check-aws-byo-iam-profile-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + if [ -f "${SHARED_DIR}/kubeconfig" ] ; then export KUBECONFIG=${SHARED_DIR}/kubeconfig else diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/byo-iam-role/cucushift-installer-check-aws-byo-iam-role-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/byo-iam-role/cucushift-installer-check-aws-byo-iam-role-commands.sh index 9a45de906a8e5..43fbd638afe7a 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/byo-iam-role/cucushift-installer-check-aws-byo-iam-role-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/byo-iam-role/cucushift-installer-check-aws-byo-iam-role-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + if [ -f "${SHARED_DIR}/kubeconfig" ] ; then export KUBECONFIG=${SHARED_DIR}/kubeconfig else diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/byo-kms-key/cucushift-installer-check-aws-byo-kms-key-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/byo-kms-key/cucushift-installer-check-aws-byo-kms-key-commands.sh index beabcb201fb7e..1e6a89d8ff3b4 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/byo-kms-key/cucushift-installer-check-aws-byo-kms-key-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/byo-kms-key/cucushift-installer-check-aws-byo-kms-key-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + if [ -f "${SHARED_DIR}/kubeconfig" ] ; then export KUBECONFIG=${SHARED_DIR}/kubeconfig else diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/c2s/cucushift-installer-check-aws-c2s-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/c2s/cucushift-installer-check-aws-c2s-commands.sh index 1c20260568212..0213fd9961a5a 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/c2s/cucushift-installer-check-aws-c2s-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/c2s/cucushift-installer-check-aws-c2s-commands.sh @@ -4,6 +4,13 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM if [ -f "${SHARED_DIR}/kubeconfig" ] ; then export KUBECONFIG=${SHARED_DIR}/kubeconfig diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/custom-ami/cucushift-installer-check-aws-custom-ami-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/custom-ami/cucushift-installer-check-aws-custom-ami-commands.sh index d43818934737b..8dc28ad49b160 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/custom-ami/cucushift-installer-check-aws-custom-ami-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/custom-ami/cucushift-installer-check-aws-custom-ami-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + REGION="${LEASED_RESOURCE}" INFRA_ID=$(jq -r '.infraID' ${SHARED_DIR}/metadata.json) export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/custom-sg/cucushift-installer-check-aws-custom-sg-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/custom-sg/cucushift-installer-check-aws-custom-sg-commands.sh index 7a0f9b324e6de..4c3cff877f82e 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/custom-sg/cucushift-installer-check-aws-custom-sg-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/custom-sg/cucushift-installer-check-aws-custom-sg-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + if [ -f "${SHARED_DIR}/kubeconfig" ] ; then export KUBECONFIG=${SHARED_DIR}/kubeconfig else diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/custom-tag/cucushift-installer-check-aws-custom-tag-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/custom-tag/cucushift-installer-check-aws-custom-tag-commands.sh index bc8c2ddcf3b03..8aad381fea26c 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/custom-tag/cucushift-installer-check-aws-custom-tag-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/custom-tag/cucushift-installer-check-aws-custom-tag-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + REGION="${LEASED_RESOURCE}" INFRA_ID=$(jq -r '.infraID' ${SHARED_DIR}/metadata.json) export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/edge-zone/cucushift-installer-check-aws-edge-zone-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/edge-zone/cucushift-installer-check-aws-edge-zone-commands.sh index a39f67d7f43a9..7f827f0e45d0d 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/edge-zone/cucushift-installer-check-aws-edge-zone-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/edge-zone/cucushift-installer-check-aws-edge-zone-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + REGION="${LEASED_RESOURCE}" # INFRA_ID=$(jq -r '.infraID' ${SHARED_DIR}/metadata.json) export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/ipv4-pool/cucushift-installer-check-aws-ipv4-pool-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/ipv4-pool/cucushift-installer-check-aws-ipv4-pool-commands.sh index 56ab5657c3ae4..190ba88be5c72 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/ipv4-pool/cucushift-installer-check-aws-ipv4-pool-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/ipv4-pool/cucushift-installer-check-aws-ipv4-pool-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + REGION="${LEASED_RESOURCE}" INFRA_ID=$(jq -r '.infraID' ${SHARED_DIR}/metadata.json) export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/outpost/cucushift-installer-check-aws-outpost-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/outpost/cucushift-installer-check-aws-outpost-commands.sh index b267f9764eb56..edc55d0efe867 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/outpost/cucushift-installer-check-aws-outpost-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/outpost/cucushift-installer-check-aws-outpost-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + if [ -f "${SHARED_DIR}/kubeconfig" ] ; then export KUBECONFIG=${SHARED_DIR}/kubeconfig else diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/private/cucushift-installer-check-aws-private-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/private/cucushift-installer-check-aws-private-commands.sh index af862ca326f4a..5ace1f53c9b6d 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/private/cucushift-installer-check-aws-private-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/private/cucushift-installer-check-aws-private-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + REGION="${LEASED_RESOURCE}" INFRA_ID=$(jq -r '.infraID' ${SHARED_DIR}/metadata.json) CLUSTER_NAME="${NAMESPACE}-${UNIQUE_HASH}" diff --git a/ci-operator/step-registry/cucushift/installer/check/aws/shared-phz/cucushift-installer-check-aws-shared-phz-commands.sh b/ci-operator/step-registry/cucushift/installer/check/aws/shared-phz/cucushift-installer-check-aws-shared-phz-commands.sh index 21608e03d2b5a..de5fa15c63871 100755 --- a/ci-operator/step-registry/cucushift/installer/check/aws/shared-phz/cucushift-installer-check-aws-shared-phz-commands.sh +++ b/ci-operator/step-registry/cucushift/installer/check/aws/shared-phz/cucushift-installer-check-aws-shared-phz-commands.sh @@ -4,6 +4,14 @@ set -o nounset set -o errexit set -o pipefail +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=101 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-post-check-status.txt"' EXIT TERM + REGION="${LEASED_RESOURCE}" INFRA_ID=$(jq -r '.infraID' ${SHARED_DIR}/metadata.json) diff --git a/ci-operator/step-registry/ipi/conf/aws/user-min-permissions/ipi-conf-aws-user-min-permissions-commands.sh b/ci-operator/step-registry/ipi/conf/aws/user-min-permissions/ipi-conf-aws-user-min-permissions-commands.sh index 191150bfac493..befdfae6c1b58 100644 --- a/ci-operator/step-registry/ipi/conf/aws/user-min-permissions/ipi-conf-aws-user-min-permissions-commands.sh +++ b/ci-operator/step-registry/ipi/conf/aws/user-min-permissions/ipi-conf-aws-user-min-permissions-commands.sh @@ -4,9 +4,13 @@ set -o nounset set -o errexit set -o pipefail -trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM -trap 'rm -rf /tmp/aws_cred_output /tmp/pull-secret /tmp/min_perms/ /tmp/jsoner.py' EXIT TERM INT - +# save the exit code for junit xml file generated in step gather-must-gather +# pre configuration steps before running installation, exit code 100 if failed, +# save to install-pre-config-status.txt +# post check steps after cluster installation, exit code 101 if failed, +# save to install-post-check-status.txt +EXIT_CODE=100 +trap 'if [[ "$?" == 0 ]]; then EXIT_CODE=0; fi; echo "${EXIT_CODE}" > "${SHARED_DIR}/install-pre-config-status.txt"; CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi; rm -rf /tmp/aws_cred_output /tmp/pull-secret /tmp/min_perms/ /tmp/jsoner.py' EXIT TERM INT JSONER_PY="/tmp/jsoner.py" GET_ACTIONS_PY="/tmp/get_actions.py"