Skip to content

Commit

Permalink
Merge pull request #1656 from aws-observability/rapphil-dev-enable-on…
Browse files Browse the repository at this point in the history
…ly-ec2-tests

Enable only EC2 tests for the dev branch
  • Loading branch information
rapphil authored Nov 22, 2022
2 parents 919030e + c98bc2d commit e31626f
Showing 1 changed file with 3 additions and 40 deletions.
43 changes: 3 additions & 40 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ env:
GITHB_RUN_ID: ${{ github.run_id }}
DDB_TABLE_NAME: BatchTestCache
MAX_JOBS: 90
BATCH_INCLUDED_SERVICES: EKS,ECS,EC2,EKS_ARM64,EKS_FARGATE
BATCH_INCLUDED_SERVICES: EC2
GO_VERSION: ~1.18.8


Expand Down Expand Up @@ -723,46 +723,9 @@ jobs:
cd testing-framework/terraform
make checkCacheHits
release-candidate:
runs-on: ubuntu-latest
if: ${{ always() && needs.validate-all-tests-pass.result == 'success' }}
needs: validate-all-tests-pass
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: ${{ secrets.COLLECTOR_ASSUMABLE_ROLE_ARN }}
aws-region: us-west-2

- name: restore cached packages
uses: actions/cache@v3
with:
path: "${{ env.PACKAGING_ROOT }}"
key: "cached_packages_${{ github.run_id }}"

- name: prepare production version
run: |
TESTING_VERSION=`cat $PACKAGING_ROOT/VERSION`
VERSION=`echo $TESTING_VERSION | awk -F "-" '{print $1}'`
echo $VERSION > $PACKAGING_ROOT/VERSION
echo $GITHUB_SHA > $PACKAGING_ROOT/GITHUB_SHA
echo $TESTING_VERSION > $PACKAGING_ROOT/TESTING_VERSION
- name: upload packages as release candidate on s3
run: |
tar czvf $GITHUB_SHA.tar.gz build
aws s3 cp $GITHUB_SHA.tar.gz s3://aws-otel-collector-release-candidate/$GITHUB_SHA.tar.gz
- name: Trigger performance test
uses: peter-evans/repository-dispatch@v2
with:
token: "${{ secrets.REPO_WRITE_ACCESS_TOKEN }}"
event-type: trigger-perf
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

publish-ci-status:
runs-on: ubuntu-latest
needs: [release-candidate]
needs: [validate-all-tests-pass]
if: always()
steps:
- name: Configure AWS Credentials
Expand All @@ -773,7 +736,7 @@ jobs:

- name: Publish CI status
run: |
if [ '${{ needs.release-candidate.result }}' = 'success' ]; then
if [ '${{ needs.validate-all-tests-pass.result }}' = 'success' ]; then
aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \
--metric-name Success \
--dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=CI \
Expand Down

0 comments on commit e31626f

Please sign in to comment.