From f44deab77b619fc64d0ec1720e346c3278059f35 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Sat, 6 Apr 2024 12:56:21 +0200 Subject: [PATCH] actions: build patch for main branch (#2047) * ci(actions): For GH patching Signed-off-by: rjshrjndrn * ci(actions): Pushing the changed code to a new branch Signed-off-by: rjshrjndrn * chore(ci): Skipping bulds for chalice and frontend arm builds Signed-off-by: rjshrjndrn * ci(actions): Build msaas Signed-off-by: rjshrjndrn * ci(actions): Removed unnecessary steps Signed-off-by: rjshrjndrn * ci(actions): Proper name Signed-off-by: rjshrjndrn * fix(ci): Sevice names Signed-off-by: rjshrjndrn * ci(actions): Fixes Signed-off-by: rjshrjndrn * actions: limit actor * chore(release): Updated version to v1.18.0 * Enable AWS ecr auth Signed-off-by: rjshrjndrn * fix(ci): fixes Signed-off-by: rjshrjndrn * ci(patch): Update tag with main Signed-off-by: rjshrjndrn * chore(ci): Remove debug job Signed-off-by: rjshrjndrn --------- Signed-off-by: rjshrjndrn --- .github/workflows/alerts-ee.yaml | 17 +- .github/workflows/alerts.yaml | 17 +- .github/workflows/api-ee.yaml | 18 ++- .github/workflows/api.yaml | 16 +- .github/workflows/assist-ee.yaml | 17 +- .github/workflows/assist-stats.yaml | 16 +- .github/workflows/assist.yaml | 17 +- .github/workflows/crons-ee.yaml | 17 +- .github/workflows/db-migrate.yaml | 17 +- .github/workflows/frontend-dev.yaml | 2 +- .github/workflows/frontend.yaml | 17 +- .github/workflows/patch-build.yaml | 149 ++++++++++++++++++ .github/workflows/peers-ee.yaml | 17 +- .github/workflows/peers.yaml | 16 +- .github/workflows/pr-env-delete.yaml | 2 +- .github/workflows/pr-env.yaml | 16 +- .github/workflows/sourcemaps-reader-ee.yaml | 16 +- .github/workflows/sourcemaps-reader.yaml | 16 +- .github/workflows/tracker-tests.yaml | 2 +- .github/workflows/update-tag.yaml | 35 ++++ .github/workflows/workers-ee.yaml | 17 +- .github/workflows/workers.yaml | 17 +- scripts/helmcharts/init.sh | 4 +- scripts/helmcharts/openreplay/Chart.yaml | 2 +- .../openreplay/charts/alerts/Chart.yaml | 2 +- .../openreplay/charts/assets/Chart.yaml | 2 +- .../openreplay/charts/assist-stats/Chart.yaml | 2 +- .../openreplay/charts/assist/Chart.yaml | 2 +- .../charts/canvas-handler/Chart.yaml | 2 +- .../openreplay/charts/chalice/Chart.yaml | 2 +- .../openreplay/charts/db/Chart.yaml | 2 +- .../openreplay/charts/ender/Chart.yaml | 2 +- .../openreplay/charts/frontend/Chart.yaml | 2 +- .../openreplay/charts/heuristics/Chart.yaml | 2 +- .../openreplay/charts/http/Chart.yaml | 2 +- .../openreplay/charts/imagestorage/Chart.yaml | 2 +- .../openreplay/charts/integrations/Chart.yaml | 2 +- .../openreplay/charts/peers/Chart.yaml | 2 +- .../openreplay/charts/quickwit/Chart.yaml | 2 +- .../openreplay/charts/sink/Chart.yaml | 2 +- .../charts/sourcemapreader/Chart.yaml | 2 +- .../openreplay/charts/storage/Chart.yaml | 2 +- .../openreplay/charts/utilities/Chart.yaml | 2 +- scripts/helmcharts/vars.yaml | 2 +- 44 files changed, 367 insertions(+), 153 deletions(-) create mode 100644 .github/workflows/patch-build.yaml create mode 100644 .github/workflows/update-tag.yaml diff --git a/.github/workflows/alerts-ee.yaml b/.github/workflows/alerts-ee.yaml index 68bf4a45b..68146296d 100644 --- a/.github/workflows/alerts-ee.yaml +++ b/.github/workflows/alerts-ee.yaml @@ -147,11 +147,14 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' -# - name: Debug Job -# # if: ${{ failure() }} -# uses: mxschmitt/action-tmate@v3 -# env: -# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} -# IMAGE_TAG: ${{ github.sha }}-ee -# ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true + diff --git a/.github/workflows/alerts.yaml b/.github/workflows/alerts.yaml index 01505f0a7..9c10c4dee 100644 --- a/.github/workflows/alerts.yaml +++ b/.github/workflows/alerts.yaml @@ -144,12 +144,15 @@ jobs: SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }} SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true + - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging diff --git a/.github/workflows/api-ee.yaml b/.github/workflows/api-ee.yaml index 59d4deef5..8c875d6a1 100644 --- a/.github/workflows/api-ee.yaml +++ b/.github/workflows/api-ee.yaml @@ -146,11 +146,15 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }}-ee - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true + + diff --git a/.github/workflows/api.yaml b/.github/workflows/api.yaml index 7aaf617c5..5884dc9f6 100644 --- a/.github/workflows/api.yaml +++ b/.github/workflows/api.yaml @@ -135,10 +135,12 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/assist-ee.yaml b/.github/workflows/assist-ee.yaml index 4774d1378..31fdd9c0d 100644 --- a/.github/workflows/assist-ee.yaml +++ b/.github/workflows/assist-ee.yaml @@ -118,11 +118,12 @@ jobs: IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} ENVIRONMENT: staging - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/assist-stats.yaml b/.github/workflows/assist-stats.yaml index cee21b8f7..b1cbc07fd 100644 --- a/.github/workflows/assist-stats.yaml +++ b/.github/workflows/assist-stats.yaml @@ -140,11 +140,13 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/assist.yaml b/.github/workflows/assist.yaml index 1d534d3c8..d15804775 100644 --- a/.github/workflows/assist.yaml +++ b/.github/workflows/assist.yaml @@ -117,11 +117,12 @@ jobs: IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} ENVIRONMENT: staging - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/crons-ee.yaml b/.github/workflows/crons-ee.yaml index 555b72c84..ae0535949 100644 --- a/.github/workflows/crons-ee.yaml +++ b/.github/workflows/crons-ee.yaml @@ -147,11 +147,12 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }}-ee - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/db-migrate.yaml b/.github/workflows/db-migrate.yaml index af09b347a..24addbf9f 100644 --- a/.github/workflows/db-migrate.yaml +++ b/.github/workflows/db-migrate.yaml @@ -144,12 +144,13 @@ jobs: IMAGE_TAG: ${{ github.sha }} ENVIRONMENT: staging - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # AWS_REGION: eu-central-1 - # AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/frontend-dev.yaml b/.github/workflows/frontend-dev.yaml index 8eba93ba4..00e6036d1 100644 --- a/.github/workflows/frontend-dev.yaml +++ b/.github/workflows/frontend-dev.yaml @@ -81,4 +81,4 @@ jobs: helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f - env: DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} + iMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} diff --git a/.github/workflows/frontend.yaml b/.github/workflows/frontend.yaml index ed1e143e4..4a557c340 100644 --- a/.github/workflows/frontend.yaml +++ b/.github/workflows/frontend.yaml @@ -135,11 +135,12 @@ jobs: IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} ENVIRONMENT: staging - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # AWS_REGION: eu-central-1 - # AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/patch-build.yaml b/.github/workflows/patch-build.yaml new file mode 100644 index 000000000..67f3fa5c3 --- /dev/null +++ b/.github/workflows/patch-build.yaml @@ -0,0 +1,149 @@ +# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions + +on: + workflow_dispatch: + description: 'This workflow will build for patches for latest tag, and will Always use commit from main branch.' + inputs: + services: + description: 'Comma separated names of services to build(in small letters).' + required: true + default: 'chalice,frontend' + +name: Build patches from main branch, Raise PR to Main, and Push to tag + +jobs: + deploy: + name: Build Patch from main + runs-on: ubuntu-latest + env: + DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }} + DEPOT_PROJECT_ID: ${{ secrets.DEPOT_PROJECT_ID }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Downloading yq + run: | + VERSION="v4.42.1" + sudo wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_amd64 -O /usr/bin/yq + sudo chmod +x /usr/bin/yq + + # Configure AWS credentials for the first registry + - name: Configure AWS credentials for RELEASE_ARM_REGISTRY + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_DEPOT_ACCESS_KEY }} + aws-secret-access-key: ${{ secrets.AWS_DEPOT_SECRET_KEY }} + aws-region: ${{ secrets.AWS_DEPOT_DEFAULT_REGION }} + + - name: Login to Amazon ECR for RELEASE_ARM_REGISTRY + id: login-ecr-arm + run: | + aws ecr get-login-password --region ${{ secrets.AWS_DEPOT_DEFAULT_REGION }} | docker login --username AWS --password-stdin ${{ secrets.RELEASE_ARM_REGISTRY }} + aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${{ secrets.RELEASE_OSS_REGISTRY }} + + - uses: depot/setup-action@v1 + - name: Get HEAD Commit ID + run: echo "HEAD_COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV + - name: Define Branch Name + run: echo "BRANCH_NAME=patch/main/${HEAD_COMMIT_ID}" >> $GITHUB_ENV + - name: Set Remote with GITHUB_TOKEN + run: | + git config --unset http.https://github.com/.extraheader + git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_COMMMIT_TOKEN }}@github.com/${{ github.repository }}.git + + - name: Build + id: build-image + env: + DOCKER_REPO_ARM: ${{ secrets.RELEASE_ARM_REGISTRY }} + DOCKER_REPO_OSS: ${{ secrets.RELEASE_OSS_REGISTRY }} + MSAAS_REPO_CLONE_TOKEN: ${{ secrets.MSAAS_REPO_CLONE_TOKEN }} + MSAAS_REPO_URL: ${{ secrets.MSAAS_REPO_URL }} + MSAAS_REPO_FOLDER: /tmp/msaas + run: | + set -exo pipefail + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git checkout -b $BRANCH_NAME + working_dir=$(pwd) + function image_version(){ + local service=$1 + chart_path="$working_dir/scripts/helmcharts/openreplay/charts/$service/Chart.yaml" + current_version=$(yq eval '.AppVersion' $chart_path) + new_version=$(echo $current_version | awk -F. '{$NF += 1 ; print $1"."$2"."$3}') + echo $new_version + # yq eval ".AppVersion = \"$new_version\"" -i $chart_path + } + function clone_msaas() { + [ -d $MSAAS_REPO_FOLDER ] || { + git clone -b dev --recursive https://x-access-token:$MSAAS_REPO_CLONE_TOKEN@$MSAAS_REPO_URL $MSAAS_REPO_FOLDER + cd $MSAAS_REPO_FOLDER + bash git-init.sh + git checkout + } + } + function build_managed() { + local service=$1 + local version=$2 + echo building managed + clone_msaas + if [[ $service == 'chalice' ]]; then + cd $MSAAS_REPO_FOLDER/openreplay/api + else + cd $MSAAS_REPO_FOLDER/openreplay/$service + fi + IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=arm64 DOCKER_REPO=$DOCKER_REPO_ARM PUSH_IMAGE=0 bash build.sh >> /tmp/arm.txt + } + # Checking for backend images + ls backend/cmd >> /tmp/backend.txt + echo Services: "${{ github.event.inputs.services }}" + IFS=',' read -ra SERVICES <<< "chalice,frontend,http" + # Build FOSS + for SERVICE in "${SERVICES[@]}"; do + # Check if service is backend + if grep -q $SERVICE /tmp/backend.txt; then + cd backend + foss_build_args="nil $SERVICE" + ee_build_args="ee $SERVICE" + else + [[ $SERVICE == 'chalice' ]] && cd $working_dir/api || cd $SERVICE + ee_build_args="ee" + fi + version=$(image_version $SERVICE) + IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$DOCKER_REPO_OSS PUSH_IMAGE=0 bash build.sh $foss_build_args + IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$DOCKER_REPO_OSS PUSH_IMAGE=0 bash build.sh $ee_build_args + if [[ "$SERVICE" != "chalice" && "$SERVICE" != "frontend" ]]; then + IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=arm64 DOCKER_REPO=$DOCKER_REPO_ARM PUSH_IMAGE=0 bash build.sh $foss_build_args + else + build_managed $SERVICE $version + fi + cd $working_dir + chart_path="$working_dir/scripts/helmcharts/openreplay/charts/$SERVICE/Chart.yaml" + yq eval ".AppVersion = \"$version\"" -i $chart_path + git add $chart_path + git commit -m "Increment $SERVICE chart version" + git push --set-upstream origin $BRANCH_NAME + done + + - name: Create Pull Request + uses: repo-sync/pull-request@v2 + with: + github_token: ${{ secrets.ACTIONS_COMMMIT_TOKEN }} + source_branch: ${{ env.BRANCH_NAME }} + destination_branch: "main" + pr_title: "Updated patch build from main $HEAD_COMMIT_ID" + pr_body: "This PR updates the Helm chart version after building the patch from $HEAD_COMMIT_ID." + + # - name: Debug Job + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO_ARM: ${{ secrets.RELEASE_ARM_REGISTRY }} + # DOCKER_REPO_OSS: ${{ secrets.RELEASE_OSS_REGISTRY }} + # MSAAS_REPO_CLONE_TOKEN: ${{ secrets.MSAAS_REPO_CLONE_TOKEN }} + # MSAAS_REPO_URL: ${{ secrets.MSAAS_REPO_URL }} + # MSAAS_REPO_FOLDER: /tmp/msaas + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/peers-ee.yaml b/.github/workflows/peers-ee.yaml index fcdeb1de5..6e14e4e4d 100644 --- a/.github/workflows/peers-ee.yaml +++ b/.github/workflows/peers-ee.yaml @@ -135,11 +135,12 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/peers.yaml b/.github/workflows/peers.yaml index fa816eda9..3b14ab966 100644 --- a/.github/workflows/peers.yaml +++ b/.github/workflows/peers.yaml @@ -133,11 +133,13 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/pr-env-delete.yaml b/.github/workflows/pr-env-delete.yaml index c5f9ceca4..94fad132b 100644 --- a/.github/workflows/pr-env-delete.yaml +++ b/.github/workflows/pr-env-delete.yaml @@ -83,4 +83,4 @@ jobs: ] } EOF - aws route53 change-resource-record-sets --hosted-zone-id ${{ secrets.OR_PR_HOSTED_ZONE_ID }} --change-batch file://route53-changes.json + iws route53 change-resource-record-sets --hosted-zone-id ${{ secrets.OR_PR_HOSTED_ZONE_ID }} --change-batch file://route53-changes.json diff --git a/.github/workflows/pr-env.yaml b/.github/workflows/pr-env.yaml index 64e3a57eb..8a281fb3c 100644 --- a/.github/workflows/pr-env.yaml +++ b/.github/workflows/pr-env.yaml @@ -329,10 +329,12 @@ jobs: # run: | # # Add any cleanup commands if necessary - - name: Debug Job - if: failure() - uses: mxschmitt/action-tmate@v3 - env: - DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - IMAGE_TAG: ${{ github.sha }} - ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/sourcemaps-reader-ee.yaml b/.github/workflows/sourcemaps-reader-ee.yaml index 8df4fdfa6..0cf92a4a2 100644 --- a/.github/workflows/sourcemaps-reader-ee.yaml +++ b/.github/workflows/sourcemaps-reader-ee.yaml @@ -134,11 +134,13 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/sourcemaps-reader.yaml b/.github/workflows/sourcemaps-reader.yaml index 6c31517b0..cd97a0377 100644 --- a/.github/workflows/sourcemaps-reader.yaml +++ b/.github/workflows/sourcemaps-reader.yaml @@ -134,11 +134,13 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/tracker-tests.yaml b/.github/workflows/tracker-tests.yaml index fa73f34a6..7cf1de010 100644 --- a/.github/workflows/tracker-tests.yaml +++ b/.github/workflows/tracker-tests.yaml @@ -72,4 +72,4 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} flags: tracker - name: tracker + iame: tracker diff --git a/.github/workflows/update-tag.yaml b/.github/workflows/update-tag.yaml new file mode 100644 index 000000000..6ec90ad32 --- /dev/null +++ b/.github/workflows/update-tag.yaml @@ -0,0 +1,35 @@ +on: + workflow_dispatch: + description: 'This workflow will build for patches for latest tag, and will Always use commit from main branch.' + inputs: + services: + description: 'This action will update the latest tag with current main branch HEAD. Should I proceed ? true/false' + required: true + default: 'false' + +name: Force Push tag with main branch HEAD + +jobs: + deploy: + name: Build Patch from main + runs-on: ubuntu-latest + env: + DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }} + DEPOT_PROJECT_ID: ${{ secrets.DEPOT_PROJECT_ID }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set Remote with GITHUB_TOKEN + run: | + git config --unset http.https://github.com/.extraheader + git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_COMMMIT_TOKEN }}@github.com/${{ github.repository }}.git + - name: Push main branch to tag + run: | + git fetch --tags + git checkout main + git push origin HEAD:refs/tags/$(git describe --tags `git rev-list --tags --max-count=1`) --force + # - name: Debug Job + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/workers-ee.yaml b/.github/workflows/workers-ee.yaml index cbe9313cf..444f22674 100644 --- a/.github/workflows/workers-ee.yaml +++ b/.github/workflows/workers-ee.yaml @@ -176,11 +176,12 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/workers.yaml b/.github/workflows/workers.yaml index 4d9dba414..4c716eccc 100644 --- a/.github/workflows/workers.yaml +++ b/.github/workflows/workers.yaml @@ -169,11 +169,12 @@ jobs: SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }} SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/scripts/helmcharts/init.sh b/scripts/helmcharts/init.sh index a0971063c..fb7687a34 100644 --- a/scripts/helmcharts/init.sh +++ b/scripts/helmcharts/init.sh @@ -43,8 +43,8 @@ function exists() { ## Prepping the infra # Mac os doesn't have gnu sed, which will cause compatibility issues. -# This wrapper will help to check the sed, and use the correct version="v1.16.0" -# Ref: https://stackoverflow.com/questions/37639496/how-can-i-check-the-version="v1.16.0" +# This wrapper will help to check the sed, and use the correct version="v1.18.0" +# Ref: https://stackoverflow.com/questions/37639496/how-can-i-check-the-version="v1.18.0" function is_gnu_sed() { sed --version >/dev/null 2>&1 } diff --git a/scripts/helmcharts/openreplay/Chart.yaml b/scripts/helmcharts/openreplay/Chart.yaml index e5f2aac9d..875a6be3b 100644 --- a/scripts/helmcharts/openreplay/Chart.yaml +++ b/scripts/helmcharts/openreplay/Chart.yaml @@ -22,7 +22,7 @@ version: 0.1.0 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. # Ref: https://github.com/helm/helm/issues/7858#issuecomment-608114589 -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" dependencies: - name: ingress-nginx diff --git a/scripts/helmcharts/openreplay/charts/alerts/Chart.yaml b/scripts/helmcharts/openreplay/charts/alerts/Chart.yaml index 8d429e65f..6a573bacd 100644 --- a/scripts/helmcharts/openreplay/charts/alerts/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/alerts/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/assets/Chart.yaml b/scripts/helmcharts/openreplay/charts/assets/Chart.yaml index fac90a4da..fd745fcc7 100644 --- a/scripts/helmcharts/openreplay/charts/assets/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/assist-stats/Chart.yaml b/scripts/helmcharts/openreplay/charts/assist-stats/Chart.yaml index 2af1eeb64..48c4c235f 100644 --- a/scripts/helmcharts/openreplay/charts/assist-stats/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/assist-stats/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.7 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/assist/Chart.yaml b/scripts/helmcharts/openreplay/charts/assist/Chart.yaml index 59482fb2f..d9e4c0e41 100644 --- a/scripts/helmcharts/openreplay/charts/assist/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/assist/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/canvas-handler/Chart.yaml b/scripts/helmcharts/openreplay/charts/canvas-handler/Chart.yaml index d0033a9b5..62355f6fb 100644 --- a/scripts/helmcharts/openreplay/charts/canvas-handler/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/canvas-handler/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/chalice/Chart.yaml b/scripts/helmcharts/openreplay/charts/chalice/Chart.yaml index 2a8c41c5d..b1778f273 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.7 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/db/Chart.yaml b/scripts/helmcharts/openreplay/charts/db/Chart.yaml index 1452723e9..0b7c7994b 100644 --- a/scripts/helmcharts/openreplay/charts/db/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/db/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/ender/Chart.yaml b/scripts/helmcharts/openreplay/charts/ender/Chart.yaml index 220ae09f1..0afee2ac6 100644 --- a/scripts/helmcharts/openreplay/charts/ender/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/ender/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/frontend/Chart.yaml b/scripts/helmcharts/openreplay/charts/frontend/Chart.yaml index d7f01b5c8..7457c6528 100644 --- a/scripts/helmcharts/openreplay/charts/frontend/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/frontend/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.10 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/heuristics/Chart.yaml b/scripts/helmcharts/openreplay/charts/heuristics/Chart.yaml index 4a4c80158..427da79e6 100644 --- a/scripts/helmcharts/openreplay/charts/heuristics/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/heuristics/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/http/Chart.yaml b/scripts/helmcharts/openreplay/charts/http/Chart.yaml index fbadde394..ff1a5717d 100644 --- a/scripts/helmcharts/openreplay/charts/http/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/http/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/imagestorage/Chart.yaml b/scripts/helmcharts/openreplay/charts/imagestorage/Chart.yaml index 8841d6537..2648bf914 100644 --- a/scripts/helmcharts/openreplay/charts/imagestorage/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/imagestorage/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/integrations/Chart.yaml b/scripts/helmcharts/openreplay/charts/integrations/Chart.yaml index 077d55f99..59a3c4b9d 100644 --- a/scripts/helmcharts/openreplay/charts/integrations/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/integrations/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/peers/Chart.yaml b/scripts/helmcharts/openreplay/charts/peers/Chart.yaml index a0f73b419..33f48347d 100644 --- a/scripts/helmcharts/openreplay/charts/peers/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/peers/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/quickwit/Chart.yaml b/scripts/helmcharts/openreplay/charts/quickwit/Chart.yaml index e174de0ad..f267ff4d5 100644 --- a/scripts/helmcharts/openreplay/charts/quickwit/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/quickwit/Chart.yaml @@ -21,4 +21,4 @@ version: 0.3.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/sink/Chart.yaml b/scripts/helmcharts/openreplay/charts/sink/Chart.yaml index 55204301e..218000a2d 100644 --- a/scripts/helmcharts/openreplay/charts/sink/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/sourcemapreader/Chart.yaml b/scripts/helmcharts/openreplay/charts/sourcemapreader/Chart.yaml index 500084254..f10d796a9 100644 --- a/scripts/helmcharts/openreplay/charts/sourcemapreader/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/sourcemapreader/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/storage/Chart.yaml b/scripts/helmcharts/openreplay/charts/storage/Chart.yaml index dc3e2e537..835f68aa5 100644 --- a/scripts/helmcharts/openreplay/charts/storage/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/openreplay/charts/utilities/Chart.yaml b/scripts/helmcharts/openreplay/charts/utilities/Chart.yaml index bd477ff1d..283f78fc8 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.17.0" +AppVersion: "v1.18.0" diff --git a/scripts/helmcharts/vars.yaml b/scripts/helmcharts/vars.yaml index ce9fa7a59..57bfef38c 100644 --- a/scripts/helmcharts/vars.yaml +++ b/scripts/helmcharts/vars.yaml @@ -1,4 +1,4 @@ -fromVersion: "v1.17.0" +fromVersion: "v1.18.0" # Databases specific variables postgresql: &postgres # For generating passwords