Skip to content

[release/13.2] Update CI image from 1es-mariner-2 to build.azurelinux… #16004

[release/13.2] Update CI image from 1es-mariner-2 to build.azurelinux…

[release/13.2] Update CI image from 1es-mariner-2 to build.azurelinux… #16004

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
- 'release/**'
push:
branches:
- main
- 'release/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
prepare_for_ci:
runs-on: ubuntu-latest
name: Prepare for CI
if: ${{ github.repository_owner == 'microsoft' }}
outputs:
skip_workflow: ${{ (steps.check_for_changes.outputs.no_changes == 'true' || steps.check_for_changes.outputs.only_changed == 'true') && 'true' || 'false' }}
steps:
- name: Checkout code
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Check for any changes that require CI
id: check_for_changes
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/actions/check-changed-files
with:
patterns_file: eng/testing/github-ci-trigger-patterns.txt
tests:
uses: ./.github/workflows/tests.yml
name: Tests
needs: [prepare_for_ci]
if: ${{ github.repository_owner == 'microsoft' && needs.prepare_for_ci.outputs.skip_workflow != 'true' }}
# This job is used for branch protection. It fails if any of the dependent jobs failed
results:
if: ${{ always() && github.repository_owner == 'microsoft' }}
runs-on: ubuntu-latest
name: Final Results
needs: [prepare_for_ci, tests]
steps:
- name: Fail if any of the dependent jobs failed
# Don't fail if the workflow is being skipped.
# Check skip_workflow on all declared dependencies. Workflows without
# skip_workflow outputs (e.g., tests, build_cli_archives) evaluate to
# empty string, so the check still works ('!= true' is true for empty).
#
# For others 'skipped' can be when a transitive dependency fails and the dependent job gets
# 'skipped'. For example, one of setup_* jobs failing and the Integration test jobs getting
# 'skipped'
if: >-
${{ always() &&
needs.prepare_for_ci.outputs.skip_workflow != 'true' &&
needs.tests.outputs.skip_workflow != 'true' &&
(contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled') ||
contains(needs.*.result, 'skipped')) }}
run: |
echo "One or more dependent jobs failed."
exit 1