Skip to content

Commit

Permalink
chore: upgrade to Aspect Workflows 5.10.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Jun 2, 2024
1 parent db924be commit 29fa2db
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .aspect/workflows/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ tasks:
condition:
branches:
- main
- workflows_510rc
- deliverable:
- //docs:docs_delivery
condition:
only_on_change: false
branches:
- main
- workflows_510rc
notifications:
github: {}
32 changes: 16 additions & 16 deletions .github/workflows/.aspect-workflows-reusable.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -37,10 +37,10 @@
# jobs:
# aspect-workflows:
# name: Aspect Workflows
# uses: my-github-org/workflows-action/.github/workflows/[email protected]rc0
# uses: my-github-org/workflows-action/.github/workflows/[email protected]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
Expand Down Expand Up @@ -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: |
Expand All @@ -123,23 +123,23 @@ jobs:
write_output_files: true
output_dir: ${{ fromJson(needs.setup.outputs.cfg).platform.directories.ARTIFACTS_DIR }}

- name: Checkout Health
uses: aspect-build/[email protected]rc0
- name: Checkout health
uses: aspect-build/[email protected]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:
workspace: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].workspace }}
task: checkout

- name: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].name }}
uses: aspect-build/[email protected]rc0
uses: aspect-build/[email protected]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
Expand All @@ -152,17 +152,17 @@ 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/[email protected]rc0
uses: aspect-build/[email protected]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 }}
task: delivery_manifest
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.
Expand All @@ -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.
Expand All @@ -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 \
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/aspect-workflows-delivery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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 }}
6 changes: 3 additions & 3 deletions .github/workflows/aspect-workflows-warming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 29fa2db

Please sign in to comment.