diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index bf0b5f6f..64f9b42e 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -1,96 +1,77 @@ -name: "Create release" +name: Create release on: workflow_dispatch: + inputs: + DRY_RUN: + type: boolean + default: false + description: "Dry run: setting this to `true` will skip the final step of publishing the release, leaving it as a draft-release. This can be helpful for testing and debugging. Note that the tag and release are still getting generated and the next run of this result in incremented release version. To avoid this, do not forget to delete the resulting release and tag." jobs: - verify-release: - name: Verify release - runs-on: ubuntu-latest - outputs: - version: ${{ steps.gen-version.outputs.VERSION }} + gen-version: + name: Generate semantic version from branch and tags + uses: kyma-project/eventing-tools/.github/workflows/get-version-from-release-branch-reusable.yml@d491378dbbeef63bf8616f1a1b2b1a49ea5f9eeb + # outputs: VERSION - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 + bump-sec-scanners-config: + name: Bump the sec-scanners-config.yaml + needs: gen-version + uses: kyma-project/eventing-tools/.github/workflows/bump-sec-scanners-config-reusable.yml@e8d1cd652dd636ad14b420da984f0bd4bf84ee0a + with: + VERSION: ${{ needs.gen-version.outputs.VERSION }} + secrets: + BOT_PAT: ${{ secrets.BOT_PAT }} - - name: Generate version number - id: gen-version - run: | - # get script - GET_VERSION=$(mktemp /tmp/get-version-from-branch.XXXXX) - curl -L https://raw.githubusercontent.com/kyma-project/eventing-tools/main/hack/scripts/get-version-from-branch.sh -o "${GET_VERSION}" - chmod +x "${GET_VERSION}" - # get version via script - VERSION=$("${GET_VERSION}") - # push version to output environment file - echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT + run-unit-test: + name: Run Unit Tests + needs: [gen-version, bump-sec-scanners-config] + uses: kyma-project/eventing-tools/.github/workflows/unit-test-reusable.yml@d491378dbbeef63bf8616f1a1b2b1a49ea5f9eeb - - name: Check image Tag - env: - VERSION: ${{ steps.gen-version.outputs.VERSION }} - run: ./scripts/check_sec-scanners-config.sh $VERSION + run-golint-cli: + name: Run Golint-cli + needs: [gen-version, bump-sec-scanners-config] + uses: kyma-project/eventing-tools/.github/workflows/lint-reusable.yml@d491378dbbeef63bf8616f1a1b2b1a49ea5f9eeb - create-draft: - name: Create draft release - needs: verify-release - runs-on: ubuntu-latest - env: - VERSION: ${{ needs.verify-release.outputs.VERSION }} - outputs: - release_id: ${{ steps.create-draft.outputs.release_id }} + build-image: + name: Build image + needs: [gen-version, run-unit-test, run-golint-cli] + uses: kyma-project/eventing-tools/.github/workflows/trigger-prow-build-job-reusable.yml@f509756e135aa2255cfd9e96c833fe5c6e511b3b + with: + VERSION: ${{ needs.gen-version.outputs.VERSION }} + TIMEOUT: 1200000 # 20 minutes + INTERVAL: 60000 # 1 minute + CONTEXT: "release-eventing-manager-build" + COMMIT_REF: ${{ github.ref_name }} + secrets: inherit - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 + create-draft-release: + name: Create a draft release + needs: [gen-version, run-unit-test, run-golint-cli, build-image] + uses: kyma-project/eventing-tools/.github/workflows/create-draft-release-reusable.yml@5c713986ad2249557ad12481a3608480f548975c + with: + VERSION: ${{ needs.gen-version.outputs.VERSION }} + secrets: + BOT_PAT: ${{ secrets.BOT_PAT }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Create changelog - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./scripts/create_changelog.sh $VERSION - - - name: Create draft release - id: create-draft - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - RELEASE_ID=$(./scripts/create_draft_release.sh $VERSION) - echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT - - - name: Create lightweight tag - run: | - git tag $VERSION - git push origin $VERSION - - - name: Verify job status - run: ./scripts/verify-status.sh ${{ github.ref_name }} 600 10 30 - - - name: Create and upload eventing-manager.yaml and eventing-default-cr.yaml - env: - PULL_BASE_REF: ${{ needs.verify-release.outputs.VERSION }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - IMG: "europe-docker.pkg.dev/kyma-project/prod/eventing-manager:${VERSION}" - MODULE_REGISTRY: "europe-docker.pkg.dev/kyma-project/prod/unsigned" - KUSTOMIZE_VERSION: "v4.5.6" - run: | - ./scripts/render_and_upload_manifests.sh + render-and-upload-manifest: + name: Render and upload the manifests + needs: [gen-version, create-draft-release, build-image] + uses: kyma-project/eventing-tools/.github/workflows/render-and-upload-manifests-reusable.yml@5c713986ad2249557ad12481a3608480f548975c + with: + VERSION: ${{ needs.gen-version.outputs.VERSION }} + CR_FILE: eventing-default-cr.yaml + CRD_FILE: eventing-manager.yaml + secrets: + BOT_PAT: ${{ secrets.BOT_PAT }} publish-release: - name: Publish release - needs: [verify-release, create-draft] - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Publish release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./scripts/publish_release.sh ${{ needs.create-draft.outputs.release_id }} + if: ${{ !inputs.DRY_RUN }} + needs: [gen-version, render-and-upload-manifest, build-image] + name: Publish the release + uses: kyma-project/eventing-tools/.github/workflows/publish-release-reusable.yml@d491378dbbeef63bf8616f1a1b2b1a49ea5f9eeb + with: + VERSION: ${{ needs.gen-version.outputs.VERSION }} + secrets: + BOT_PAT: ${{ secrets.BOT_PAT }} diff --git a/hack/scripts/create_changelog.sh b/hack/scripts/create_changelog.sh new file mode 100755 index 00000000..25f9792f --- /dev/null +++ b/hack/scripts/create_changelog.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +PREVIOUS_RELEASE=$2 # for testability + +# standard bash error handling +set -o nounset # treat unset variables as an error and exit immediately. +set -o errexit # exit immediately when a command fails. +set -E # needs to be set if we want the ERR trap +set -o pipefail # prevents errors in a pipeline from being masked + +RELEASE_TAG=$1 + +REPOSITORY=${REPOSITORY:-kyma-project/eventing-manager} +GITHUB_URL=https://api.github.com/repos/${REPOSITORY} +GITHUB_AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}" +CHANGELOG_FILE="CHANGELOG.md" + +if [ "${PREVIOUS_RELEASE}" == "" ]; then + PREVIOUS_RELEASE=$(git describe --tags --abbrev=0) +fi + +echo "## What has changed" >>${CHANGELOG_FILE} + +git log ${PREVIOUS_RELEASE}..HEAD --pretty=tformat:"%h" --reverse | while read -r commit; do + COMMIT_AUTHOR=$(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/commits/${commit}" | jq -r '.author.login') + if [ "${COMMIT_AUTHOR}" != "kyma-bot" ]; then + git show -s ${commit} --format="* %s by @${COMMIT_AUTHOR}" >>${CHANGELOG_FILE} + fi +done + +NEW_CONTRIB=$$.new + +join -v2 \ + <(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/compare/$(git rev-list --max-parents=0 HEAD)...${PREVIOUS_RELEASE}" | jq -r '.commits[].author.login' | sort -u) \ + <(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/compare/${PREVIOUS_RELEASE}...HEAD" | jq -r '.commits[].author.login' | sort -u) >${NEW_CONTRIB} + +if [ -s ${NEW_CONTRIB} ]; then + echo -e "\n## New contributors" >>${CHANGELOG_FILE} + while read -r user; do + REF_PR=$(grep "@${user}" ${CHANGELOG_FILE} | head -1 | grep -o " (#[0-9]\+)" || true) + if [ -n "${REF_PR}" ]; then #reference found + REF_PR=" in ${REF_PR}" + fi + echo "* @${user} made first contribution${REF_PR}" >>${CHANGELOG_FILE} + done <${NEW_CONTRIB} +fi + +echo -e "\n**Full changelog**: https://github.com/$REPOSITORY/compare/${PREVIOUS_RELEASE}...${RELEASE_TAG}" >>${CHANGELOG_FILE} + +# cleanup +rm ${NEW_CONTRIB} || echo "cleaned up" diff --git a/hack/scripts/render-sec-scanners-config.sh b/hack/scripts/render-sec-scanners-config.sh new file mode 100755 index 00000000..c2b3ecad --- /dev/null +++ b/hack/scripts/render-sec-scanners-config.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +set -e + +# This scrpit generates the sec-scanners-config by fetching all relevant images. + +TAG=$1 +OUTPUT_FILE=${2:-"sec-scanners-config.yaml"} +WEBHOOK_FILE=${3-"config/webhook/kustomization.yaml"} +PUBLISHER_FILE=${4-"config/manager/manager.yaml"} +KUSTOMIZATION_FILE=${5-"config/manager/kustomization.yaml"} +# Fetch Webhook Image. +echo "fetching webhook image from ${WEBHOOK_FILE}" +WEBHOOK_IMAGE=$(yq eval '.images[0].newName' <"$WEBHOOK_FILE") +WEBHOOK_TAG=$(yq eval '.images[0].newTag' <"$WEBHOOK_FILE") +WEBHOOK_IMAGE="${WEBHOOK_IMAGE}:$WEBHOOK_TAG" +echo -e "webhook image is ${WEBHOOK_IMAGE} \n" + +# Fetch Publisher Image. +echo "fetching publisher image from ${PUBLISHER_FILE}" +PUBLISHER_IMAGE=$(yq eval '.spec.template.spec.containers[0].env[] | select(.name == "PUBLISHER_IMAGE") | .value' <"${PUBLISHER_FILE}") +echo -e "publisher image is ${PUBLISHER_IMAGE} \n" + +# Generating File. +echo -e "generating to ${OUTPUT_FILE} \n" +cat <tmp_file && mv tmp_file "$KUSTOMIZATION_FILE" diff --git a/hack/scripts/render_crd.sh b/hack/scripts/render_crd.sh new file mode 100755 index 00000000..4f010951 --- /dev/null +++ b/hack/scripts/render_crd.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# standard bash error handling +set -o nounset # treat unset variables as an error and exit immediately. +set -o errexit # exit immediately when a command fails. +set -E # needs to be set if we want the ERR trap +set -o pipefail # prevents errors in a pipeline from being masked + +VERSION=$1 +IMG="europe-docker.pkg.dev/kyma-project/prod/eventing-manager:${VERSION}" make render-manifest diff --git a/scripts/check_release_tag.sh b/scripts/check_release_tag.sh deleted file mode 100755 index 8c3c2f4a..00000000 --- a/scripts/check_release_tag.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -ue - -DESIRED_TAG=$1 - -source .version - -if [[ "$DESIRED_TAG" != "$MODULE_VERSION" ]]; then - echo "Tags mismatch: expected ${MODULE_VERSION}, got $DESIRED_TAG" - exit 1 -fi -echo "Tags are correct" -exit 0 \ No newline at end of file diff --git a/scripts/check_sec-scanners-config.sh b/scripts/check_sec-scanners-config.sh deleted file mode 100755 index 40497b80..00000000 --- a/scripts/check_sec-scanners-config.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -# This script checks thate the RC-Tag and the eventing-manager image have the tag of the corresponding release. - -# Error handling: -set -o nounset # treat unset variables as an error and exit immediately. -set -o errexit # exit immediately when a command fails. -set -E # needs to be set if we want the ERR trap -set -o pipefail # prevents errors in a pipeline from being masked - -# Get release version -DESIRED_TAG="${1:-"main"}" - -# Get eventing-manager tag from sec-scanners-config.yaml -SEC_SCAN_TO_CHECK="${2:-europe-docker.pkg.dev/kyma-project/prod/eventing-manager}" -IMAGE_TAG=$(cat sec-scanners-config.yaml | grep "${SEC_SCAN_TO_CHECK}" | cut -d : -f 2) - -# Get rc-tag -RC_TAG_TO_CHECK="${3:-rc-tag}" -RC_TAG=$(cat sec-scanners-config.yaml | grep "${RC_TAG_TO_CHECK}" | cut -d : -f 2 | xargs) - -# Check IMAGE_TAG and required image tag -if [[ "$IMAGE_TAG" != "$DESIRED_TAG" ]] || [[ "$RC_TAG" != "$DESIRED_TAG" ]]; then - # ERROR: Tag issue - echo "Tags are not correct: - - wanted: $DESIRED_TAG - - security-scanner image tag: $IMAGE_TAG - - rc-tag: $RC_TAG" - exit 1 -fi - -# OK: Everything is fine -echo "Tags are correct" -exit 0 diff --git a/scripts/create_changelog.sh b/scripts/create_changelog.sh deleted file mode 100755 index 3a063adc..00000000 --- a/scripts/create_changelog.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash - -PREVIOUS_RELEASE=$2 # for testability - -# standard bash error handling -set -o nounset # treat unset variables as an error and exit immediately. -set -o errexit # exit immediately when a command fails. -set -E # needs to be set if we want the ERR trap -set -o pipefail # prevents errors in a pipeline from being masked - -RELEASE_TAG=$1 - -REPOSITORY=${REPOSITORY:-kyma-project/eventing-manager} -GITHUB_URL=https://api.github.com/repos/${REPOSITORY} -GITHUB_AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}" -CHANGELOG_FILE="CHANGELOG.md" - -if [ "${PREVIOUS_RELEASE}" == "" ] -then - PREVIOUS_RELEASE=$(git describe --tags --abbrev=0) -fi - -echo "## What has changed" >> ${CHANGELOG_FILE} - -git log ${PREVIOUS_RELEASE}..HEAD --pretty=tformat:"%h" --reverse | while read -r commit -do - COMMIT_AUTHOR=$(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/commits/${commit}" | jq -r '.author.login') - if [ "${COMMIT_AUTHOR}" != "kyma-bot" ]; then - git show -s ${commit} --format="* %s by @${COMMIT_AUTHOR}" >> ${CHANGELOG_FILE} - fi -done - -NEW_CONTRIB=$$.new - -join -v2 \ -<(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/compare/$(git rev-list --max-parents=0 HEAD)...${PREVIOUS_RELEASE}" | jq -r '.commits[].author.login' | sort -u) \ -<(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/compare/${PREVIOUS_RELEASE}...HEAD" | jq -r '.commits[].author.login' | sort -u) >${NEW_CONTRIB} - -if [ -s ${NEW_CONTRIB} ] -then - echo -e "\n## New contributors" >> ${CHANGELOG_FILE} - while read -r user - do - REF_PR=$(grep "@${user}" ${CHANGELOG_FILE} | head -1 | grep -o " (#[0-9]\+)" || true) - if [ -n "${REF_PR}" ] #reference found - then - REF_PR=" in ${REF_PR}" - fi - echo "* @${user} made first contribution${REF_PR}" >> ${CHANGELOG_FILE} - done <${NEW_CONTRIB} -fi - -echo -e "\n**Full changelog**: https://github.com/$REPOSITORY/compare/${PREVIOUS_RELEASE}...${RELEASE_TAG}" >> ${CHANGELOG_FILE} - -# cleanup -rm ${NEW_CONTRIB} || echo "cleaned up" \ No newline at end of file diff --git a/scripts/create_draft_release.sh b/scripts/create_draft_release.sh deleted file mode 100755 index 738d83f0..00000000 --- a/scripts/create_draft_release.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -# This script returns the id of the draft release - -# standard bash error handling -set -o nounset # treat unset variables as an error and exit immediately. -set -o errexit # exit immediately when a command fails. -set -E # needs to be set if we want the ERR trap -set -o pipefail # prevents errors in a pipeline from being masked - -RELEASE_TAG=$1 - -REPOSITORY=${REPOSITORY:-kyma-project/eventing-manager} -GITHUB_URL=https://api.github.com/repos/${REPOSITORY} -GITHUB_AUTH_HEADER="Authorization: Bearer ${GITHUB_TOKEN}" -CHANGELOG_FILE=$(cat CHANGELOG.md) - -JSON_PAYLOAD=$(jq -n \ - --arg tag_name "$RELEASE_TAG" \ - --arg name "$RELEASE_TAG" \ - --arg body "$CHANGELOG_FILE" \ - '{ - "tag_name": $tag_name, - "name": $name, - "body": $body, - "draft": true - }') - -CURL_RESPONSE=$(curl -L \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "${GITHUB_AUTH_HEADER}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - ${GITHUB_URL}/releases \ - -d "$JSON_PAYLOAD") - -echo "$(echo $CURL_RESPONSE | jq -r ".id")" \ No newline at end of file diff --git a/scripts/publish_release.sh b/scripts/publish_release.sh deleted file mode 100755 index 681fc54b..00000000 --- a/scripts/publish_release.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# This script publishes a draft release - -# standard bash error handling -set -o nounset # treat unset variables as an error and exit immediately. -set -o errexit # exit immediately when a command fails. -set -E # needs to be set if we want the ERR trap -set -o pipefail # prevents errors in a pipeline from being masked - -RELEASE_ID=$1 - -REPOSITORY=${REPOSITORY:-kyma-project/eventing-manager} -GITHUB_URL=https://api.github.com/repos/${REPOSITORY} -GITHUB_AUTH_HEADER="Authorization: Bearer ${GITHUB_TOKEN}" - -CURL_RESPONSE=$(curl -L \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "${GITHUB_AUTH_HEADER}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - ${GITHUB_URL}/releases/${RELEASE_ID} \ - -d '{"draft":false}') \ No newline at end of file diff --git a/scripts/render_and_upload_manifests.sh b/scripts/render_and_upload_manifests.sh deleted file mode 100755 index c9e8e604..00000000 --- a/scripts/render_and_upload_manifests.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -# standard bash error handling -set -o nounset # treat unset variables as an error and exit immediately. -set -o errexit # exit immediately when a command fails. -set -E # needs to be set if we want the ERR trap -set -o pipefail # prevents errors in a pipeline from being masked - -# Expected variables: -# PULL_BASE_REF - name of the tag -# GITHUB_TOKEN - github token used to upload the template yaml - -uploadFile() { - filePath=${1} - ghAsset=${2} - - echo "Uploading ${filePath} as ${ghAsset}" - response=$(curl -s -o output.txt -w "%{http_code}" \ - --request POST --data-binary @"$filePath" \ - -H "Authorization: token $GITHUB_TOKEN" \ - -H "Content-Type: text/yaml" \ - $ghAsset) - if [[ "$response" != "201" ]]; then - echo "Unable to upload the asset ($filePath): " - echo "HTTP Status: $response" - cat output.txt - exit 1 - else - echo "$filePath uploaded" - fi -} - -echo "PULL_BASE_REF ${PULL_BASE_REF}" - -MODULE_VERSION=${PULL_BASE_REF} make render-manifest - -echo "Generated eventing-manager.yaml:" -cat eventing-manager.yaml - -echo "Updating github release with eventing-manager.yaml" - -echo "Finding release id for: ${PULL_BASE_REF}" -CURL_RESPONSE=$(curl -w "%{http_code}" -sL \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $GITHUB_TOKEN" \ - https://api.github.com/repos/kyma-project/eventing-manager/releases) -JSON_RESPONSE=$(sed '$ d' <<<"${CURL_RESPONSE}") -HTTP_CODE=$(tail -n1 <<<"${CURL_RESPONSE}") -if [[ "${HTTP_CODE}" != "200" ]]; then - echo "${JSON_RESPONSE}" && exit 1 -fi - -echo "Finding release id for: ${PULL_BASE_REF}" -RELEASE_ID=$(jq <<<${JSON_RESPONSE} --arg tag "${PULL_BASE_REF}" '.[] | select(.tag_name == $ARGS.named.tag) | .id') - -if [ -z "${RELEASE_ID}" ]; then - echo "No release with tag = ${PULL_BASE_REF}" - exit 1 -fi - -UPLOAD_URL="https://uploads.github.com/repos/kyma-project/eventing-manager/releases/${RELEASE_ID}/assets" - -uploadFile "eventing-manager.yaml" "${UPLOAD_URL}?name=eventing-manager.yaml" -uploadFile "config/samples/default.yaml" "${UPLOAD_URL}?name=eventing-default-cr.yaml" diff --git a/scripts/verify-status.sh b/scripts/verify-status.sh deleted file mode 100755 index 21fd686a..00000000 --- a/scripts/verify-status.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env bash - -echo "Checking status of POST Jobs for Eventing-Manager" - -REF_NAME="${1:-"main"}" -TIMEOUT_TIME="${2:-600}" -INTERVAL_TIME="${3:-3}" -INITIAL_WAIT_TIME="${4:-30}" - -# Generate job Status URL -STATUS_URL="https://api.github.com/repos/kyma-project/eventing-manager/commits/${REF_NAME}/status" - -# Dates -START_TIME=$(date +%s) -TODAY_DATE=$(date '+%Y-%m-%d') - -# Retry function -function retry { - - # Get status result - local statusresult=$(curl -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" ${STATUS_URL}) - - # Get overall state - fullstatus=$(echo $statusresult | jq '.state' | tr -d '"') - - # Collect latest run related data - local latestrun=$(echo $statusresult | jq '.statuses[-1]') - local latestrun_state=$(echo $latestrun | jq '.state' | tr -d '"') - local latestrun_createdat=$(echo $latestrun | jq '.created_at' | tr -d '"') - local latestrun_targeturl=$(echo $latestrun | jq '.target_url' | tr -d '"') - - # Check Today's run data - if [[ $latestrun_createdat == *"$TODAY_DATE"* ]]; then - echo $latestrun_createdat - echo $latestrun_state - echo $latestrun_targeturl - fi - - # Show all execution for Today - echo $statusresult | jq --arg t $TODAY_DATE '.statuses[]|select(.created_at | contains($t))' - - # Date time for time-out - local CURRENT_TIME=$(date +%s) - local elapsed_time=$((CURRENT_TIME - START_TIME)) - - # Check time-out - if [ $elapsed_time -ge $TIMEOUT_TIME ]; then - echo "Timeout reached. Exiting." - exit 1 - fi - - if [ "$fullstatus" == "success" ]; then - echo "Success!" - elif [ "$fullstatus" == "failed" ]; then - # Show overall state to user - echo "$statusresult" - echo "Failure! Exiting with an error." - exit 1 - elif [ "$fullstatus" == "pending" ]; then - echo "Status is '$fullstatus'. Retrying in $INTERVAL_TIME seconds..." - sleep $INTERVAL_TIME - else - echo "Invalid result: $result" - exit 1 - fi - -} - -# Initial wait -sleep $INITIAL_WAIT_TIME -# Call retry function -retry -while [ "$fullstatus" == "pending" ]; do - retry -done diff --git a/sec-scanners-config.yaml b/sec-scanners-config.yaml index 956c4175..c2d77bc2 100644 --- a/sec-scanners-config.yaml +++ b/sec-scanners-config.yaml @@ -1,6 +1,10 @@ +# Dont edit this file; it is autogenerated by github action 'Create release'. +# The value for the publisher image is extracted from config/manager/manager.yaml. +# The value for the webhook image is extracted from config/webhook/kustomization.yaml. module-name: eventing +rc-tag: 0.7.0 protecode: - - europe-docker.pkg.dev/kyma-project/prod/eventing-manager:main + - europe-docker.pkg.dev/kyma-project/prod/eventing-manager:0.7.0 - europe-docker.pkg.dev/kyma-project/prod/eventing-publisher-proxy:1.0.1 - europe-docker.pkg.dev/kyma-project/prod/eventing-webhook-certificates:1.7.0 whitesource: