From be6ba0d2c0f353b258c7824bebb60a8a0531f476 Mon Sep 17 00:00:00 2001 From: James Green Date: Mon, 10 Jun 2024 14:52:37 +0100 Subject: [PATCH] updated build spec, added basic github action to test --- .DS_Store | Bin 0 -> 6148 bytes .github/workflows/dhcp-testing.yml | 40 +++++++++++++++++++++++++++++ buildspec.test.yml | 4 --- 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 .DS_Store create mode 100644 .github/workflows/dhcp-testing.yml diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..45b1232043887e1e8cc94f28a92821945cc7e63b GIT binary patch literal 6148 zcmeHKI|>3p3{CuiU}I@HSMUad=n3`$7J>+}f}mJ#<+(hXFP}nL?6go`AbB&Hyjk`Y zn~jL*^1NM$%tT}YHu_g_y_&l13531Cg^ z0+E4fP=P_!95FQL$d|0EiCtjOMRWMje6r?*qW*N;U%Xtj1~O6sD)6enFt#)6|7-Z0 z`Tv!~9TlJgf2DwqR?TXOSIXYndpYa11-^k>%^hxrwNnth9Rs}`V`J@j?nO~oY>o4p V*abQrd8Y&UGhn*VsKB=scmPVK6yg8? literal 0 HcmV?d00001 diff --git a/.github/workflows/dhcp-testing.yml b/.github/workflows/dhcp-testing.yml new file mode 100644 index 0000000..180f1b7 --- /dev/null +++ b/.github/workflows/dhcp-testing.yml @@ -0,0 +1,40 @@ +on: + push + +jobs: + DhcpServerTesting: + runs-on: macos-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 test diff --git a/buildspec.test.yml b/buildspec.test.yml index 643ec46..15ca7c6 100644 --- a/buildspec.test.yml +++ b/buildspec.test.yml @@ -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: