From 5e720f9e797d6d7ed13cc17f7c2edfee7e4d0e95 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Sat, 1 Jun 2024 13:54:04 -0700 Subject: [PATCH] chore: upgrade to Aspect Workflows 5.10.0-rc1 --- .../workflows/.aspect-workflows-reusable.yaml | 32 +++++++++---------- .../workflows/aspect-workflows-delivery.yaml | 14 +++++--- .../workflows/aspect-workflows-warming.yaml | 6 ++-- .github/workflows/deps.bzl | 4 +-- 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/.github/workflows/.aspect-workflows-reusable.yaml b/.github/workflows/.aspect-workflows-reusable.yaml index ca2eece5..0d3826b4 100644 --- a/.github/workflows/.aspect-workflows-reusable.yaml +++ b/.github/workflows/.aspect-workflows-reusable.yaml @@ -1,7 +1,7 @@ # ================================================================================================== -# Aspect Workflows Reusable Workflow for GitHub Actions (v5.10.0-rc0) +# Aspect Workflows Reusable Workflow for GitHub Actions (v5.10.0-rc1) # -# https://github.com/marketplace/actions/aspect-workflows?version=5.10.0-rc0 +# https://github.com/marketplace/actions/aspect-workflows?version=5.10.0-rc1 # # At this time, GitHub Actions does not allow referencing reusable workflows from public # repositories in other organizations. See @@ -37,10 +37,10 @@ # jobs: # aspect-workflows: # name: Aspect Workflows -# uses: my-github-org/workflows-action/.github/workflows/.aspect-workflows-reusable.yaml@5.10.0-rc0 +# uses: my-github-org/workflows-action/.github/workflows/.aspect-workflows-reusable.yaml@5.10.0-rc1 # ``` # ================================================================================================== -name: Aspect Workflows Reusable Workflow (v5.10.0-rc0) +name: Aspect Workflows Reusable Workflow (v5.10.0-rc1) on: # Makes this workflow reusable, see @@ -94,17 +94,17 @@ jobs: ASPECT_WORKFLOWS_CONFIG: ${{ inputs.aspect-config }} steps: - - name: Configure environment + - name: Workflows environment run: ${{ fromJson(needs.setup.outputs.cfg).platform.directories.WORKFLOWS_BIN_DIR }}/configure_workflows_env - name: Clone repo uses: actions/checkout@v4 - - name: Agent health checks + - name: Agent health check run: ${{ fromJson(needs.setup.outputs.cfg).platform.directories.WORKFLOWS_BIN_DIR }}/agent_health_check timeout-minutes: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].health_check_timeout }} - - name: Process Secrets + - name: Process secrets id: process_secrets if: inputs.inherited_secrets != '' run: | @@ -123,8 +123,8 @@ jobs: write_output_files: true output_dir: ${{ fromJson(needs.setup.outputs.cfg).platform.directories.ARTIFACTS_DIR }} - - name: Checkout Health - uses: aspect-build/workflows-action@5.10.0-rc0 + - name: Checkout health + uses: aspect-build/workflows-action@5.10.0-rc1 timeout-minutes: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].checkout_task_timeout }} if: fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].has_checkout_task with: @@ -132,14 +132,14 @@ jobs: task: checkout - name: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].name }} - uses: aspect-build/workflows-action@5.10.0-rc0 + uses: aspect-build/workflows-action@5.10.0-rc1 env: ${{ inputs.inherited_secrets != '' && fromJson(steps.process_secrets.outputs.filtered_secrets) || fromJson('{}') }} timeout-minutes: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].timeout_in_minutes }} with: workspace: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].workspace }} task: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].task }} - - name: Send notification to Slack workflow + - name: Send notification to Slack id: slack # oncall cares about branches that do delivery, so key this on whether we produce a delivery manifest if: inputs.slack_webhook_url != '' && failure() && fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].generate_manifest @@ -152,9 +152,9 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets[inputs.slack_webhook_url] }} - - name: Delivery Manifest + - name: Delivery manifest if: fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].generate_manifest - uses: aspect-build/workflows-action@5.10.0-rc0 + uses: aspect-build/workflows-action@5.10.0-rc1 timeout-minutes: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].delivery_manifest_timout }} with: workspace: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].workspace }} @@ -162,7 +162,7 @@ jobs: args: "--data TARGETS_SOURCE=${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].task }}" # Upload all artifacts for the workspace - - name: Upload Artifact + - name: Upload artifacts # The `always()` condition makes this step run even if a previous step failed. # Setting `continue-on-error: true` on previous steps isn't ideal as the UI # will flag them as having passed even if they failed. @@ -174,7 +174,7 @@ jobs: overwrite: true # Codecov - - name: Codecov Upload + - name: Codecov upload # The `always()` condition makes this step run even if a previous step failed. # Setting `continue-on-error: true` on previous steps isn't ideal as the UI # will flag them as having passed even if they failed. @@ -188,7 +188,7 @@ jobs: # by the bazel convenience symlinks and finds the same coverage report # under bazel-out and {workspace}/bazel-out. - - name: Trigger Delivery + - name: Trigger delivery # This uses the following API: https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event run: | curl \ diff --git a/.github/workflows/aspect-workflows-delivery.yaml b/.github/workflows/aspect-workflows-delivery.yaml index 1792e5a8..2a5b0b25 100644 --- a/.github/workflows/aspect-workflows-delivery.yaml +++ b/.github/workflows/aspect-workflows-delivery.yaml @@ -9,6 +9,11 @@ on: description: The commit to checkout and run the delivery from. Targets listed in the delivery manifest for this commit will be delivered unless specific targets are listed in `delivery_targets`. type: string required: true + workspace: + description: The workspace to deliver from + type: string + required: false + default: '.' delivery_targets: description: List of Bazel targets to deliver, delimited by spaces. For example, \`//app/a:push_release //app/b:push_release\`. If empty, targets listed in the delivery manifest for the target commit will be delivered. type: string @@ -21,7 +26,7 @@ jobs: env: ASPECT_WORKFLOWS_BIN_DIR: /etc/aspect/workflows/bin steps: - - name: Configure environment + - name: Workflows environment run: ${ASPECT_WORKFLOWS_BIN_DIR}/configure_workflows_env - uses: actions/checkout@v4 with: @@ -30,12 +35,13 @@ jobs: # any tags that it needs for `git describe`. # See https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches fetch-depth: 0 - - name: Agent health checks + - name: Agent health check run: ${ASPECT_WORKFLOWS_BIN_DIR}/agent_health_check - - name: Run Delivery - uses: aspect-build/workflows-action@5.9.23 + - name: Run delivery + uses: aspect-build/workflows-action@5.10.0-rc1 with: task: delivery + workspace: ${{ inputs.workspace }} env: DELIVERY_COMMIT: ${{ inputs.delivery_commit }} DELIVERY_TARGETS: ${{ inputs.delivery_targets }} diff --git a/.github/workflows/aspect-workflows-warming.yaml b/.github/workflows/aspect-workflows-warming.yaml index 9da8ea8c..8c110de0 100644 --- a/.github/workflows/aspect-workflows-warming.yaml +++ b/.github/workflows/aspect-workflows-warming.yaml @@ -16,13 +16,13 @@ jobs: env: ASPECT_WORKFLOWS_BIN_DIR: /etc/aspect/workflows/bin steps: - - name: Configure environment + - name: Workflows environment run: ${ASPECT_WORKFLOWS_BIN_DIR}/configure_workflows_env - uses: actions/checkout@v4 - - name: Agent health checks + - name: Agent health check run: ${ASPECT_WORKFLOWS_BIN_DIR}/agent_health_check - name: Create warming archive - uses: aspect-build/workflows-action@5.9.23 + uses: aspect-build/workflows-action@5.10.0-rc1 with: task: warming - name: Archive warming tars diff --git a/.github/workflows/deps.bzl b/.github/workflows/deps.bzl index 4dc947b0..c74250ff 100644 --- a/.github/workflows/deps.bzl +++ b/.github/workflows/deps.bzl @@ -2,8 +2,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -ASPECT_WORKFLOWS_VERSION = "5.10.0-rc0" -ASPECT_WORKFLOWS_ACTION_INTEGRITY = "sha256-/HKqXzylqB+KzWL/oDZGs7W7BQ1zpCCQ9j0dGOA6Ng8=" +ASPECT_WORKFLOWS_VERSION = "5.10.0-rc1" +ASPECT_WORKFLOWS_ACTION_INTEGRITY = "sha256-jRnpdF4TgY509vszmlIzJzoiV869UNyMmASpMCXrpLY=" def aspect_workflows_github_actions_deps(): "Fetch deps needed for Aspect Workflows on GitHub Actions"