Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws/ci security fix #68

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions .github/workflows/awstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,24 @@ jobs:
awstest:
runs-on: ubuntu-latest
steps:
# ---------------------------
# check out the PR branch
# we run tests against the code in the PR branch
# ---------------------------
- uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
token: ${{github.token}}
path: 'pr-branch'

# ---------------------------
# check out the target branch
# all CI scripts that use secrets come from the target branch
# ---------------------------
- uses: actions/checkout@v3
with:
path: 'target-branch'

# ---------------------------
# update the operating system
Expand All @@ -27,7 +44,7 @@ jobs:
# ---------------------------
- name: install awscli and helm
run: |
. ./ci/util/util_awscli.sh
. ./target-branch/ci/util/util_awscli.sh
awscli_config
helm_install
env:
Expand All @@ -40,7 +57,7 @@ jobs:
# ---------------------------
- name: create EC2 VM
run: |
. ./ci/util/util_awscli.sh
. ./target-branch/ci/util/util_awscli.sh
instanceid=$(awscli_launch ao)
echo "instanceid=${instanceid}" >> ${GITHUB_ENV}
awscli_wait_run ${instanceid} || exit -1
Expand All @@ -51,7 +68,7 @@ jobs:
# ---------------------------
- name: install and start minikube
run: |
. ./ci/util/util_awscli.sh
. ./target-branch/ci/util/util_awscli.sh
awscli_start_minikube ${ipaddr} && \
awscli_access_minikube ${ipaddr}

Expand All @@ -60,15 +77,15 @@ jobs:
# ---------------------------
- name: run test scenarios
run: |
./ci/tests/runtests.sh
./pr-branch/ci/tests/runtests.sh

# ---------------------------
# terminate the VM
# ---------------------------
- name: finish
if: success() || failure()
run: |
. ./ci/util/util_awscli.sh
. ./target-branch/ci/util/util_awscli.sh
if [[ ${instanceid} != "" ]]
then
awscli_terminate ${instanceid}
Expand Down
Loading