Skip to content

Commit

Permalink
Merge pull request #2900 from aws-observability/pinubuntu
Browse files Browse the repository at this point in the history
chore: Update GitHub Actions workflow to use Ubuntu 22.04 runner
  • Loading branch information
vasireddy99 authored Nov 21, 2024
2 parents 627555a + b3df255 commit 4cce5ec
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 72 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@

name: C/D

on:
on:
workflow_dispatch:
inputs:
version:
description: 'the version number to release'
required: true
sha:
description: 'the github sha to release'
required: true
required: true
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

env:
IMAGE_NAME: aws-otel-collector
IMAGE_NAMESPACE: amazon
Expand All @@ -42,14 +42,14 @@ permissions:
contents: write

jobs:
release-checking:
runs-on: ubuntu-latest
release-checking:
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.set-input-vars.outputs.version }}
testing_version: ${{ steps.checking_sha_version.outputs.testing_version }}
latest-or-newer: ${{ steps.version.outputs.latest-or-newer }}
sha: ${{ steps.set-input-vars.outputs.sha }}
steps:
steps:
- uses: actions/checkout@v4
- name: Set Input Variables
id: set-input-vars
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
fi
echo "testing_version=$version_in_release_candidate" >> $GITHUB_OUTPUT
- name: Compare version with Dockerhub latest
id: version
run: |
Expand All @@ -110,7 +110,7 @@ jobs:
path: ${{ env.PACKAGING_ROOT }}

release-to-s3:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [release-checking]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -143,9 +143,9 @@ jobs:
- name: Release binaries to s3 with latest version
if: ${{ needs.release-checking.outputs.latest-or-newer == 'true' && steps.release-to-s3.outputs.cache-hit != 'true' }}
run: s3_bucket_name=${{ env.RELEASE_S3_BUCKET }} upload_to_latest=1 bash tools/release/image-binary-release/s3-release.sh

release-version-image:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [release-checking]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:latest
release-ssm:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [release-version-image,release-to-s3, release-checking]
steps:
- name: Cache if success
Expand All @@ -218,7 +218,7 @@ jobs:
inputs: '{ "version": "${{ needs.release-checking.outputs.version }}", "sha": "${{ needs.release-checking.outputs.sha }}", "public": "true", "pkgname": "${{ env.SSM_RELEASE_PACKAGE_NAME }}", "latest": "${{ needs.release-checking.outputs.latest-or-newer }}" }'

release-to-github:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [ release-ssm, release-to-s3, release-version-image, release-checking]
steps:
- name: Checkout
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ permissions:

jobs:
validate-markdown:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/checkout@v4
Expand All @@ -87,7 +87,7 @@ jobs:
|| { echo "Check that anchor links are lowercase"; exit 1; }
create-test-ref:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: validate-markdown
outputs:
testRef: ${{ steps.setRef.outputs.ref }}
Expand All @@ -102,7 +102,7 @@ jobs:
fi
build-aotutil:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: create-test-ref
steps:
- name: Check out testing framework
Expand All @@ -127,7 +127,7 @@ jobs:
build:
needs:
- create-test-ref
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Remove cache
Expand Down Expand Up @@ -269,7 +269,7 @@ jobs:
retention-days: 1

packaging-rpm:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build
steps:
# Build and archive rpms into cache.
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:
gpg --fingerprint --with-colons aws-otel-collector@amazon.com grep "^fpr" | sed -n 's/^fpr:::::::::\([[:alnum:]]\+\):/\1/p' | xargs gpg --batch --yes --delete-secret-keys
gpg --list-secret-keys
packaging-deb:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build
steps:
# Build and archive debs into cache.
Expand Down Expand Up @@ -384,7 +384,7 @@ jobs:
gpg --list-secret-keys
test-control-stript:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [packaging-deb]
steps:
- name: Checkout
Expand All @@ -404,7 +404,7 @@ jobs:
sudo ./.github/scripts/test-collector-ctl.sh $PACKAGING_ROOT/debian/amd64/aws-otel-collector.deb ./config.yaml
packaging-ssm:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [packaging-rpm, packaging-deb, packaging-msi]
steps:
# Build and archive SSM package into cache.
Expand Down Expand Up @@ -448,7 +448,7 @@ jobs:
rm -rf $PACKAGING_ROOT/ssm
python3 tools/ssm/ssm_manifest.py ${ssm_pkg_version}
e2etest-preparation:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [packaging-rpm, packaging-deb, packaging-msi, packaging-ssm]
outputs:
version: ${{ steps.versioning.outputs.version }}
Expand Down Expand Up @@ -506,7 +506,7 @@ jobs:
echo "version=$version" >> $GITHUB_OUTPUT
e2etest-release:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [e2etest-preparation]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -594,7 +594,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

get-testing-suites:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [create-test-ref]
outputs:
test-case-batch-key: ${{ steps.set-batches.outputs.batch-keys }}
Expand Down Expand Up @@ -632,7 +632,7 @@ jobs:
echo ${{ steps.set-batches.outputs.batch-values }}
run-batch-job:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [get-testing-suites, e2etest-release, e2etest-preparation, create-test-ref, build-aotutil]
strategy:
fail-fast: false
Expand Down Expand Up @@ -709,7 +709,7 @@ jobs:
make terraformCleanup
run-collector-testbed:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [ e2etest-preparation, e2etest-release, create-test-ref]

steps:
Expand Down Expand Up @@ -751,7 +751,7 @@ jobs:
./gradlew test --rerun-tasks --info
clean-ssm-package:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ always() && needs.e2etest-preparation.result == 'success' }}
needs: [run-batch-job,e2etest-preparation]
steps:
Expand Down Expand Up @@ -786,7 +786,7 @@ jobs:
aws ssm delete-document --name ${{ env.SSM_PACKAGE_NAME }} --version-name ${{ steps.versioning.outputs.ssm_pkg_version }}
validate-all-tests-pass:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [run-batch-job,e2etest-preparation,create-test-ref,get-testing-suites]
if: always()
steps:
Expand Down Expand Up @@ -823,7 +823,7 @@ jobs:
make checkCacheHits
release-candidate:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ always() && needs.validate-all-tests-pass.result == 'success'
&& needs.run-collector-testbed.result == 'success'
&& (startsWith(github.ref_name, 'release/v') || github.ref_name == 'main') }}
Expand Down Expand Up @@ -862,7 +862,7 @@ jobs:
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

publish-ci-status:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [release-candidate]
if: always()
steps:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/PR-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ permissions:

jobs:
validate-markdown:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/checkout@v4
Expand All @@ -62,7 +62,7 @@ jobs:
if: ${{ env.MDS }}

create-test-ref:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
testRef: ${{ steps.setRef.outputs.ref }}
steps:
Expand All @@ -76,7 +76,7 @@ jobs:
fi
changes:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
changed: ${{ steps.filter.outputs.changed }}
steps:
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:


build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [changes]
steps:
- name: Remove cache
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
run: .\tools\packaging\windows\create_msi.ps1

packaging-rpm:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [changes, build]
steps:
# Build and archive RPMs into cache.
Expand All @@ -235,7 +235,7 @@ jobs:
ARCH=aarch64 SOURCE_ARCH=arm64 DEST=build/packages/linux/arm64 tools/packaging/linux/create_rpm.sh
packaging-deb:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [changes, build]
steps:
# Build and archive debs into cache.
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
ARCH=arm64 DEST=build/packages/debian/arm64 tools/packaging/debian/create_deb.sh
test-control-stript:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [changes, packaging-deb]
steps:
- name: Checkout
Expand All @@ -285,7 +285,7 @@ jobs:
sudo ./.github/scripts/test-collector-ctl.sh ./build/packages/debian/amd64/aws-otel-collector.deb ./config.yaml
get-test-cases:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
Expand All @@ -308,7 +308,7 @@ jobs:
echo ${{ steps.set-matrix.outputs.matrix }}
run-test-case:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [changes, get-test-cases, build, create-test-ref]
strategy:
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/aws-resources-clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ permissions:

jobs:
clean-resources:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
max-parallel: 10
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
# API GW api has a limit of one delete request per 30 seconds. Thus it cannot be run in parallel
# with the other tests
clean-apigw:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
max-parallel: 1
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ permissions:

jobs:
create-test-ref:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
testRef: ${{ steps.setRef.outputs.ref }}
steps:
Expand All @@ -44,7 +44,7 @@ jobs:
fi
build-aotutil:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: create-test-ref
steps:
- name: Check out testing framework
Expand All @@ -68,7 +68,7 @@ jobs:
path: testing-framework/cmd/aotutil/aotutil

get-canary-test-cases:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- build-aotutil
outputs:
Expand All @@ -88,7 +88,7 @@ jobs:
echo "canary_matrix=$canary_matrix" >> $GITHUB_OUTPUT
run-canary-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [get-canary-test-cases, create-test-ref]
strategy:
matrix: ${{ fromJson(needs.get-canary-test-cases.outputs.canary_matrix) }}
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
cd testing-framework/terraform/canary
terraform init
terraform apply -auto-approve -lock=false $opts -var="aoc_version=latest" -var="testcase=../testcases/${{ matrix.testcase }}" -var="testing_ami=${{ matrix.testing_ami }}"
- name: Destroy terraform resources
if: ${{ always() }}
run: |
Expand Down
Loading

0 comments on commit 4cce5ec

Please sign in to comment.