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

Added integration test for docker credential outputs #338

Open
wants to merge 1 commit into
base: integ-tests
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 23 additions & 5 deletions test-workflow.yml
Expand Up @@ -6,8 +6,8 @@ on:
name: Integration Test

jobs:
deploy:
name: Deploy
job1:
name: Test
runs-on: ubuntu-latest

steps:
Expand All @@ -19,7 +19,7 @@ jobs:
echo Integration test run: BUILD_ID

- name: Configure AWS credentials
id: configure-aws-credentials-pdx
id: configure-aws-credentials-us-west-2
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -46,7 +46,7 @@ jobs:
registries: ${{ steps.configure-aws-credentials.outputs.aws-account-id }}

- name: Configure AWS credentials
id: configure-aws-credentials-iad
id: configure-aws-credentials-us-east-1
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -69,4 +69,22 @@ jobs:
docker pull amazonlinux
docker tag amazonlinux $ECR_PUBLIC_REGISTRY/$ECR_PUBLIC_REGISTRY_ALIAS/$ECR_PUBLIC_REPOSITORY:$IMAGE_TAG
docker push $ECR_PUBLIC_REGISTRY/$ECR_PUBLIC_REGISTRY_ALIAS/$ECR_PUBLIC_REPOSITORY:$IMAGE_TAG

outputs:
docker_username: ${{ steps.login-ecr.outputs.docker_username_386586417298_dkr_ecr_us_west_2_amazonaws_com }}
docker_password: ${{ steps.login-ecr.outputs.docker_password_386586417298_dkr_ecr_us_west_2_amazonaws_com }}

job2:
name: Service
needs: job1
runs-on: ubuntu-latest
services:
internal-service:
image: 386586417298.dkr.ecr.us-west-2.amazonaws.com/github-actions-amazon-ecr-login-integ-tests:latest
credentials:
username: ${{ needs.job1.outputs.docker_username }}
password: ${{ needs.job1.outputs.docker_password }}
ports:
- '80:80'
steps:
- name: Echo
run: echo "Integration Test"