From 3d0729135be7a7984dc1b64e6b583185361c6a84 Mon Sep 17 00:00:00 2001 From: Andrea Grillo Date: Fri, 13 Dec 2024 15:49:10 +0100 Subject: [PATCH] [CES-605] Upgrade Ubuntu version used by managed GitHub runner (#187) Co-authored-by: Krusty93 --- .github/workflows/docker_image_build.yaml | 2 +- .github/workflows/function_app_deploy.yaml | 4 ++-- .github/workflows/infra_apply.yaml | 6 +++--- .github/workflows/infra_drift_detection.yml | 4 ++-- .github/workflows/infra_plan.yaml | 2 +- .github/workflows/js_code_review.yaml | 2 +- .github/workflows/keep_alive_repository.yml | 6 +++--- .github/workflows/legacy_code_review.yaml | 8 ++++---- .github/workflows/legacy_deploy_pipelines.yaml | 12 ++++++------ .github/workflows/legacy_publish_sdk.yaml | 14 +++++++------- .github/workflows/static_analysis.yaml | 6 +++--- .github/workflows/terraform_test.yaml | 2 +- .github/workflows/web_app_deploy.yaml | 6 +++--- 13 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/docker_image_build.yaml b/.github/workflows/docker_image_build.yaml index 936c2a58e..537c4b733 100644 --- a/.github/workflows/docker_image_build.yaml +++ b/.github/workflows/docker_image_build.yaml @@ -39,7 +39,7 @@ jobs: release: name: Build and Push to Registry - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: packages: write diff --git a/.github/workflows/function_app_deploy.yaml b/.github/workflows/function_app_deploy.yaml index b90e58960..830385c1a 100644 --- a/.github/workflows/function_app_deploy.yaml +++ b/.github/workflows/function_app_deploy.yaml @@ -43,7 +43,7 @@ jobs: build: name: Build Artifact - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: WORKSPACE: ${{ inputs.workspace_name }} TURBO_CACHE_DIR: .turbo-cache @@ -101,7 +101,7 @@ jobs: name: Deploy if: ${{ !github.event.act }} needs: [build] - runs-on: ${{ inputs.use_private_agent == true && 'self-hosted' || 'ubuntu-20.04' }} + runs-on: ${{ inputs.use_private_agent == true && 'self-hosted' || 'ubuntu-latest' }} environment: ${{ inputs.environment }}-cd permissions: id-token: write diff --git a/.github/workflows/infra_apply.yaml b/.github/workflows/infra_apply.yaml index 848549c12..dbb379fe0 100644 --- a/.github/workflows/infra_apply.yaml +++ b/.github/workflows/infra_apply.yaml @@ -41,10 +41,10 @@ concurrency: cancel-in-progress: false jobs: - + tf_plan: name: 'Terraform Plan' - runs-on: ${{ inputs.use_labels && inputs.use_private_agent && inputs.environment || inputs.use_private_agent && 'self-hosted' || 'ubuntu-20.04' }} + runs-on: ${{ inputs.use_labels && inputs.use_private_agent && inputs.environment || inputs.use_private_agent && 'self-hosted' || 'ubuntu-latest' }} environment: ${{ inputs.override_github_environment == '' && inputs.environment || inputs.override_github_environment}}-ci permissions: id-token: write @@ -211,7 +211,7 @@ jobs: tf_apply: name: 'Terraform Apply' - runs-on: ${{ inputs.use_labels && inputs.use_private_agent && inputs.environment || inputs.use_private_agent && 'self-hosted' || 'ubuntu-20.04' }} + runs-on: ${{ inputs.use_labels && inputs.use_private_agent && inputs.environment || inputs.use_private_agent && 'self-hosted' || 'ubuntu-latest' }} needs: [tf_plan] environment: ${{ inputs.override_github_environment == '' && inputs.environment || inputs.override_github_environment}}-cd permissions: diff --git a/.github/workflows/infra_drift_detection.yml b/.github/workflows/infra_drift_detection.yml index 921709fbe..585406350 100644 --- a/.github/workflows/infra_drift_detection.yml +++ b/.github/workflows/infra_drift_detection.yml @@ -31,7 +31,7 @@ env: jobs: terraform_driftdetection_job: name: Terraform Drift Detection - runs-on: ${{ inputs.use_private_agent == true && 'self-hosted' || 'ubuntu-20.04' }} + runs-on: ${{ inputs.use_private_agent == true && 'self-hosted' || 'ubuntu-latest' }} environment: ${{ inputs.environment }}-ci concurrency: group: ${{ github.workflow }}-ci @@ -189,7 +189,7 @@ jobs: core.setOutput("commit_url", `${data.repository.html_url}/commit/${data.head_sha}`); core.setOutput("committer_name", data.head_commit.committer.name); - # Reference: https://github.com/slackapi/slack-github-action + # Reference: https://github.com/slackapi/slack-github-action - name: Drift Notification if: ${{ steps.drift.outputs.drift_found == 'true' }} id: drift_notify diff --git a/.github/workflows/infra_plan.yaml b/.github/workflows/infra_plan.yaml index 9ff0cdd00..8d2388c46 100644 --- a/.github/workflows/infra_plan.yaml +++ b/.github/workflows/infra_plan.yaml @@ -39,7 +39,7 @@ env: jobs: tf_plan: name: 'Terraform Plan' - runs-on: ${{ inputs.use_labels && inputs.use_private_agent && inputs.environment || inputs.use_private_agent && 'self-hosted' || 'ubuntu-20.04' }} + runs-on: ${{ inputs.use_labels && inputs.use_private_agent && inputs.environment || inputs.use_private_agent && 'self-hosted' || 'ubuntu-latest' }} environment: ${{ inputs.override_github_environment == '' && inputs.environment || inputs.override_github_environment}}-ci concurrency: group: ${{ github.workflow }}-${{ inputs.environment }}-ci diff --git a/.github/workflows/js_code_review.yaml b/.github/workflows/js_code_review.yaml index 7b8b4eb94..225fa809d 100644 --- a/.github/workflows/js_code_review.yaml +++ b/.github/workflows/js_code_review.yaml @@ -5,7 +5,7 @@ on: jobs: js_code_review: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest env: TURBO_CACHE_DIR: .turbo-cache diff --git a/.github/workflows/keep_alive_repository.yml b/.github/workflows/keep_alive_repository.yml index 795581426..ed7458ccb 100644 --- a/.github/workflows/keep_alive_repository.yml +++ b/.github/workflows/keep_alive_repository.yml @@ -2,7 +2,7 @@ name: Keep Alive # This workflow is designed to keep the repository active. # GitHub automatically disables all actions with a cron trigger after 60 days of inactivity. -# This action checks if there has been a commit in the last 55 days. +# This action checks if there has been a commit in the last 55 days. # If a commit is found within this timeframe, the workflow does nothing, # however, if no commits have been made, it performs an empty push to keep the repository active. @@ -13,7 +13,7 @@ on: jobs: keep_alive: - runs-on: 'ubuntu-20.04' + runs-on: 'ubuntu-latest' permissions: contents: read actions: write @@ -40,4 +40,4 @@ jobs: - name: Keep Alive # If 55 days have passed then execute the action which makes an empty push if: steps.commit_date.outputs.days_since_commit >= '55' - uses: ./.github/actions/keep-alive \ No newline at end of file + uses: ./.github/actions/keep-alive diff --git a/.github/workflows/legacy_code_review.yaml b/.github/workflows/legacy_code_review.yaml index cac371b5d..f0253fabf 100644 --- a/.github/workflows/legacy_code_review.yaml +++ b/.github/workflows/legacy_code_review.yaml @@ -1,6 +1,6 @@ name: Code Review - Legacy -# This workflow is used by functions that do not use the monorepo +# This workflow is used by functions that do not use the monorepo # and still use a legacy architecture that will be deprecated in the future. on: @@ -8,7 +8,7 @@ on: jobs: js_code_review: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Check-out code @@ -17,7 +17,7 @@ jobs: # Corepack is an official tool by Node.js that manages package managers versions # This is needed to avoid - # Error: Error when performing the request to https://registry.npmjs.org/yarn/latest; + # Error: Error when performing the request to https://registry.npmjs.org/yarn/latest; - name: Setup target Node.js to enable Corepack uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 with: @@ -61,4 +61,4 @@ jobs: if: ${{ env.CODECOV_TOKEN != '' }} uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0 with: - token: ${{ env.CODECOV_TOKEN }} \ No newline at end of file + token: ${{ env.CODECOV_TOKEN }} diff --git a/.github/workflows/legacy_deploy_pipelines.yaml b/.github/workflows/legacy_deploy_pipelines.yaml index e30f07ac8..3cb78038b 100644 --- a/.github/workflows/legacy_deploy_pipelines.yaml +++ b/.github/workflows/legacy_deploy_pipelines.yaml @@ -1,6 +1,6 @@ name: Deploy Pipelines - Legacy -# This workflow is used by functions that do not use the monorepo +# This workflow is used by functions that do not use the monorepo # and still use a legacy architecture that will be deprecated in the future. on: @@ -43,7 +43,7 @@ concurrency: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest env: WORKSPACE: ${{ github.workspace }} @@ -139,7 +139,7 @@ jobs: deploy: if: ${{ !github.event.act }} needs: [build] - runs-on: ${{ inputs.use_private_agent == true && 'self-hosted' || 'ubuntu-22.04' }} + runs-on: ${{ inputs.use_private_agent == true && 'self-hosted' || 'ubuntu-latest' }} environment: ${{ inputs.environment }}-cd permissions: id-token: write @@ -165,7 +165,7 @@ jobs: client-id: ${{ env.ARM_CLIENT_ID }} tenant-id: ${{ env.ARM_TENANT_ID }} subscription-id: ${{ env.ARM_SUBSCRIPTION_ID }} - + - name: Deploy if: ${{ inputs.use_staging_slot == false }} run: | @@ -175,7 +175,7 @@ jobs: --src-path ${{ github.workspace }}/${{ env.BUNDLE_NAME }}.zip \ --type zip \ --async false \ - | grep -v "hidden-link:" + | grep -v "hidden-link:" - name: Deploy to Staging Slot if: ${{ inputs.use_staging_slot == true }} @@ -205,4 +205,4 @@ jobs: -g ${{ inputs.resource_group_name }} \ -n ${{ inputs.app_name }} \ --slot staging \ - --target-slot production \ No newline at end of file + --target-slot production diff --git a/.github/workflows/legacy_publish_sdk.yaml b/.github/workflows/legacy_publish_sdk.yaml index 6e8e8b8ce..5e128da0d 100644 --- a/.github/workflows/legacy_publish_sdk.yaml +++ b/.github/workflows/legacy_publish_sdk.yaml @@ -1,6 +1,6 @@ name: Publish SDK - Legacy -# This workflow is used by functions that do not use the monorepo +# This workflow is used by functions that do not use the monorepo # and still use a legacy architecture that will be deprecated in the future. on: @@ -50,28 +50,28 @@ concurrency: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest env: WORKSPACE: ${{ github.workspace }} steps: - name: Check-out code uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - + - name: Generate client and definitions run: |- set -euo pipefail PACKAGE=${{ inputs.generatorPackageName }} - + # If the application use a specific version of the generator package, use it; otherwise, just use latest version from the registry # Warning: yarn only is supported CODEGEN_VERSION=$(yarn list --depth=0 | grep $PACKAGE | grep -Eo "([0-9]+\.)+[0-9]+" || echo '*') - + # Execute the generator fetching the specific package from the registry npx -p $PACKAGE@$CODEGEN_VERSION gen-api-sdk --api-spec ${{ inputs.openapiSpecPath }} \ --out-dir ${{ env.GENERATED_CODE_DIR }} ${{ env.CODE_GEN_PACKAGE_NAME_PARAM }} --request-types --response-decoders --client - + working-directory: "${{ inputs.apiProjectDir }}" - name: Setup Node.js @@ -100,7 +100,7 @@ jobs: deploy: if: ${{ !github.event.act }} needs: [build] - runs-on: ${{ inputs.use_private_agent == true && 'self-hosted' || 'ubuntu-22.04' }} + runs-on: ${{ inputs.use_private_agent == true && 'self-hosted' || 'ubuntu-latest' }} environment: ${{ inputs.environment }}-cd permissions: id-token: write diff --git a/.github/workflows/static_analysis.yaml b/.github/workflows/static_analysis.yaml index 7322d6c76..8d5922195 100644 --- a/.github/workflows/static_analysis.yaml +++ b/.github/workflows/static_analysis.yaml @@ -14,7 +14,7 @@ on: default: "1.7.5" pre_commit_tf_tag: description: | - Pre-commit Terraform TAG to use, + Pre-commit Terraform TAG to use, is release tag + package digest (Ref. Digest https://github.com/antonbabenko/pre-commit-terraform/pkgs/container/pre-commit-terraform) Example: vX.Y.Z@sha256:000...N type: string @@ -33,7 +33,7 @@ concurrency: jobs: tf_analysis: name: Terraform Validation - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: TERRAFORM_VERSION: ${{ inputs.terraform_version }} container: @@ -89,4 +89,4 @@ jobs: pre-commit run \ --color=always \ - --all-files \ No newline at end of file + --all-files diff --git a/.github/workflows/terraform_test.yaml b/.github/workflows/terraform_test.yaml index 51475c947..3fd30167e 100644 --- a/.github/workflows/terraform_test.yaml +++ b/.github/workflows/terraform_test.yaml @@ -42,7 +42,7 @@ jobs: tf_test: name: Terraform Test environment: dev-ci - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: id-token: write contents: read diff --git a/.github/workflows/web_app_deploy.yaml b/.github/workflows/web_app_deploy.yaml index d11277ca6..0c8238e28 100644 --- a/.github/workflows/web_app_deploy.yaml +++ b/.github/workflows/web_app_deploy.yaml @@ -38,7 +38,7 @@ env: jobs: build: name: Build Artifact - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest env: WORKSPACE: ${{ inputs.workspace_name }} @@ -89,7 +89,7 @@ jobs: mkdir ${{ github.run_id }} - # bundle compiled code, excluding node_modules + # bundle compiled code, excluding node_modules curl -fsSL https://esbuild.github.io/dl/v0.21.5 | sh ./esbuild index=$ENTRY_POINT --bundle --format=$FORMAT --platform=node --target=node20 --packages=external --outdir=${{ github.run_id }} --allow-overwrite @@ -118,7 +118,7 @@ jobs: name: Deploy if: ${{ !github.event.act }} needs: [build] - runs-on: ${{ inputs.use_private_agent == true && 'self-hosted' || 'ubuntu-22.04' }} + runs-on: ${{ inputs.use_private_agent == true && 'self-hosted' || 'ubuntu-latest' }} environment: ${{ inputs.environment }}-cd permissions: id-token: write