Skip to content

Commit

Permalink
add ci cd stack
Browse files Browse the repository at this point in the history
  • Loading branch information
wyTrivail committed Jul 30, 2020
1 parent 2acb3b3 commit a69032a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .aoc-stack-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
testingRegion: "us-west-2"
s3ReleaseCandidateBucketName: "aoc-release-candidate-release"
s3BucketName: "aws-opentelemetry-collector-release"
sshKeyS3BucketName: "aoc-ssh-key-release"
5 changes: 5 additions & 0 deletions .aoc-stack-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
testingRegion: "us-west-2"
s3ReleaseCandidateBucketName: "aoc-release-candidate"
s3BucketName: "aws-opentelemetry-collector-test"
sshKeyS3BucketName: "aoc-ssh-key"
14 changes: 14 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
release-checking:
runs-on: ubuntu-latest
steps:
- name: Checkout aws-opentelemetry-collector
uses: actions/checkout@v2

- name: Checking if the related commit has passed the Soaking test
run: echo "Checking Soaking test"

Expand All @@ -30,12 +33,20 @@ jobs:
id: get_version
run: echo ::set-output name=version::$(echo $GITHUB_REF | cut -d / -f 3)

- name: place stack
run: cp .aoc-stack-test.yml .aoc-stack.yml

- name: download packages as release candidate from s3
uses: wyTrivail/aocintegtest@master
with:
running_type: candidate
opts: "-t=DownloadCandidate -p=${{ steps.get_version.outputs.version }} -g=${{ github.sha }}"

- name: cp stack into packages
run: |
cp .aoc-stack-test.yml build/packages/
cp .aoc-stack-release.yml build/packages/
- run: ls -R

- name: Cache packages
Expand Down Expand Up @@ -63,6 +74,9 @@ jobs:
aws-secret-access-key: ${{ secrets.INTEG_TEST_AWS_KEY_SECRET }}
aws-region: us-west-2

- name: place stack
run: cp build/packages/.aoc-stack-release.yml .aoc-stack.yml

- name: Release to S3
id: release-to-s3
uses: wyTrivail/aocintegtest@master
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ jobs:
Version="`cat VERSION`-$GITHUB_RUN_ID"
echo $Version > build/packages/VERSION
- name: Checkout aws-opentelemetry-collector
uses: actions/checkout@v2

- name: prepare CI&CD stack
run: |
cp .aoc-stack-test.yml build/packages/
cp .aoc-stack-release.yml build/packages/
- name: Cache the packages
uses: actions/cache@v2
with:
Expand All @@ -254,6 +262,9 @@ jobs:
path: build/packages
key: "cached_packages_${{ github.run_id }}"

- name: place stack
run: cp build/packages/.aoc-stack-test.yml ./.aoc-stack.yml

- name: upload to s3 in the testing stack
uses: wyTrivail/aocintegtest@master
with:
Expand Down Expand Up @@ -290,8 +301,8 @@ jobs:
path: build/packages
key: "cached_packages_${{ github.run_id }}"

- name: Configure SSH Key
run: echo "${{ secrets.INTEG_TEST_SSH_KEY }}" > build/packages/sshkey.pem
- name: place stack
run: cp build/packages/.aoc-stack-test.yml ./.aoc-stack.yml

- name: perform integration test on EC2
uses: wyTrivail/aocintegtest@master
Expand Down Expand Up @@ -323,6 +334,9 @@ jobs:
echo $Version > build/packages/VERSION
echo $GITHUB_SHA > build/packages/GITHUB_SHA
- name: place stack
run: cp build/packages/.aoc-stack-test.yml ./aoc-stack.yml

- name: upload packages as release candidate on s3
uses: wyTrivail/aocintegtest@master
with:
Expand Down

0 comments on commit a69032a

Please sign in to comment.