Skip to content

Commit

Permalink
Merge branch 'nd-137-gh-actions' into rspec-config
Browse files Browse the repository at this point in the history
  • Loading branch information
juddin927 authored Jun 11, 2024
2 parents 7ba93e6 + 5ac79eb commit 8ad6de3
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
Binary file added .DS_Store
Binary file not shown.
41 changes: 41 additions & 0 deletions .github/workflows/dhcp-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
push

jobs:
DhcpServerTesting:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::683290208331:role/GitHubWorkflow
role-session-name: GitHubWorkflow

- name: Get AWS DockerHub credentials
id: docker_hub_credentials
run: |
username=$(aws ssm get-parameter --name /moj-network-access-control/docker/username --with-decryption --query "Parameter.Value" --output text)
echo "::add-mask::$username"
echo "docker-hub-username=$username" >> "$GITHUB_OUTPUT"
password=$(aws ssm get-parameter --name /moj-network-access-control/docker/password --with-decryption --query "Parameter.Value" --output text)
echo "::add-mask::$password"
echo "docker-hub-password=$password" >> "$GITHUB_OUTPUT"
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{steps.docker_hub_credentials.outputs.docker-hub-username}}
password: ${{steps.docker_hub_credentials.outputs.docker-hub-password}}

- name: Run DHCP tests
run: |
make build-dev
make test
4 changes: 0 additions & 4 deletions buildspec.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ env:
DOCKER_PASSWORD: "/moj-network-access-control/docker/password"

phases:
install:
commands:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2&
- timeout 15 sh -c "until docker info; do echo .; sleep 1; done"

build:
commands:
Expand Down

0 comments on commit 8ad6de3

Please sign in to comment.