From 50b8e6c1188efe024ee29bfa9225abe0d401116f Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Tue, 28 Nov 2023 14:30:54 -0600 Subject: [PATCH 01/35] Update README.md add note --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c3ce44c03..3b58f7eff3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Example Voting App -A simple distributed application running across multiple Docker containers. +A simple distributed application running across multiple Docker containers. + +***Note: This is a forked repository from the original repository https://github.com/dockersamples/example-voting-app.git, which belongs to Sysdig. It is intended solely for lab-testing purposes.*** ## Getting started From 4456d7370f310557ba15888be96ed11e1f711616 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Tue, 28 Nov 2023 14:41:22 -0600 Subject: [PATCH 02/35] testing the integration --- k8s-specifications/vote-service.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/k8s-specifications/vote-service.yaml b/k8s-specifications/vote-service.yaml index eae29ffcc3..b19c6dc9e1 100644 --- a/k8s-specifications/vote-service.yaml +++ b/k8s-specifications/vote-service.yaml @@ -13,4 +13,6 @@ spec: nodePort: 31000 selector: app: vote + +##This is just a test... From 66656eae72b779f76c497e1da6b239b124afe185 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:02:16 -0600 Subject: [PATCH 03/35] Create build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/build-scan-and-push.yaml diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml new file mode 100644 index 0000000000..0184ee0f32 --- /dev/null +++ b/.github/workflows/build-scan-and-push.yaml @@ -0,0 +1,69 @@ +env: + SYSDIG_SECURE_ENDPOINT: "https://app.us4.sysdig.com/" + REGISTRY_HOST: "quay.io" + IMAGE_NAME: "voting-app" + IMAGE_TAG: "tag-dg" + DOCKERFILE_CONTEXT: "github/" +name: Container build, scan and push +on: [push, pull_request] + +jobs: + build-scan-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and save + uses: docker/build-push-action@v3 + with: + context: ${{ env.DOCKERFILE_CONTEXT }} + tags: ${{ env.REGISTRY_HOST }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} + load: true + + - name: Scan the image using sysdig-cli-scanner + env: + SECURE_API_TOKEN: ${{ secrets.SECURE_API_TOKEN }} + run: | + ${GITHUB_WORKSPACE}/cache/sysdig-cli-scanner \ + --apiurl ${SYSDIG_SECURE_ENDPOINT} \ + docker://${REGISTRY_HOST}/${{ secrets.REGISTRY_USER }}/${IMAGE_NAME}:${IMAGE_TAG} \ + --console-log \ + --dbpath=${GITHUB_WORKSPACE}/cache/db/ \ + --cachepath=${GITHUB_WORKSPACE}/cache/scanner-cache/ + + - name: Login to the registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - name: Push + uses: docker/build-push-action@v3 + with: + context: ${{ env.DOCKERFILE_CONTEXT }} + push: true + tags: ${{ env.REGISTRY_HOST }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} + + - name: Setup cache + uses: actions/cache@v3 + with: + path: cache + key: ${{ runner.os }}-cache-${{ hashFiles('**/sysdig-cli-scanner', '**/latest_version.txt', '**/db/main.db.meta.json', '**/scanner-cache/inlineScannerCache.db') }} + restore-keys: ${{ runner.os }}-cache- + + - name: Download sysdig-cli-scanner if needed + run: | + curl -sLO https://download.sysdig.com/scanning/sysdig-cli-scanner/latest_version.txt + mkdir -p ${GITHUB_WORKSPACE}/cache/db/ + if [ ! -f ${GITHUB_WORKSPACE}/cache/latest_version.txt ] || [ $(cat ./latest_version.txt) != $(cat ${GITHUB_WORKSPACE}/cache/latest_version.txt) ]; then + cp ./latest_version.txt ${GITHUB_WORKSPACE}/cache/latest_version.txt + curl -sL -o ${GITHUB_WORKSPACE}/cache/sysdig-cli-scanner "https://download.sysdig.com/scanning/bin/sysdig-cli-scanner/$(cat ${GITHUB_WORKSPACE}/cache/latest_version.txt)/linux/amd64/sysdig-cli-scanner" + chmod +x ${GITHUB_WORKSPACE}/cache/sysdig-cli-scanner + else + echo "sysdig-cli-scanner latest version already downloaded" + fi + From 9b0126850fd4669b7c3990ebc6b5c7925a0b8682 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:05:57 -0600 Subject: [PATCH 04/35] Update build-scan-and-push.yaml change image_name and image_tag vars --- .github/workflows/build-scan-and-push.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 0184ee0f32..a25a05c583 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -1,8 +1,8 @@ env: SYSDIG_SECURE_ENDPOINT: "https://app.us4.sysdig.com/" REGISTRY_HOST: "quay.io" - IMAGE_NAME: "voting-app" - IMAGE_TAG: "tag-dg" + IMAGE_NAME: "mytestimage" + IMAGE_TAG: "my-tag" DOCKERFILE_CONTEXT: "github/" name: Container build, scan and push on: [push, pull_request] From b2f2e9d1a07cae2c287d3f6e9628b3ed7e1ba8bf Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:27:22 -0600 Subject: [PATCH 05/35] Update build-scan-and-push.yaml update variables --- .github/workflows/build-scan-and-push.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index a25a05c583..79936212a1 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -1,8 +1,8 @@ env: SYSDIG_SECURE_ENDPOINT: "https://app.us4.sysdig.com/" - REGISTRY_HOST: "quay.io" - IMAGE_NAME: "mytestimage" - IMAGE_TAG: "my-tag" + REGISTRY_HOST: "ghcr.io" + IMAGE_NAME: "dockersamples/examplevotingapp_vote" + IMAGE_TAG: "vote" DOCKERFILE_CONTEXT: "github/" name: Container build, scan and push on: [push, pull_request] From d4f0ebba63d3d736794e16139ef7d3e347dd3bf0 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:29:41 -0600 Subject: [PATCH 06/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 79936212a1..f40a1bbdbe 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -1,7 +1,7 @@ env: SYSDIG_SECURE_ENDPOINT: "https://app.us4.sysdig.com/" REGISTRY_HOST: "ghcr.io" - IMAGE_NAME: "dockersamples/examplevotingapp_vote" + IMAGE_NAME: "dockersamples" IMAGE_TAG: "vote" DOCKERFILE_CONTEXT: "github/" name: Container build, scan and push From 6c945465970c153b8fff77a563d6355631d09cd5 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:36:31 -0600 Subject: [PATCH 07/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 54 +++++++++++----------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index f40a1bbdbe..0e631a1f31 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -1,10 +1,12 @@ env: SYSDIG_SECURE_ENDPOINT: "https://app.us4.sysdig.com/" - REGISTRY_HOST: "ghcr.io" - IMAGE_NAME: "dockersamples" - IMAGE_TAG: "vote" - DOCKERFILE_CONTEXT: "github/" + REGISTRY_HOST: "quay.io" + IMAGE_NAME: "mytestimage" + IMAGE_TAG: "my-tag" + DOCKERFILE_CONTEXT: "github/new-scan-engine" + name: Container build, scan and push + on: [push, pull_request] jobs: @@ -13,16 +15,35 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - + - name: Build and save uses: docker/build-push-action@v3 with: context: ${{ env.DOCKERFILE_CONTEXT }} tags: ${{ env.REGISTRY_HOST }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} load: true + + - name: Setup cache + uses: actions/cache@v3 + with: + path: cache + key: ${{ runner.os }}-cache-${{ hashFiles('**/sysdig-cli-scanner', '**/latest_version.txt', '**/db/main.db.meta.json', '**/scanner-cache/inlineScannerCache.db') }} + restore-keys: ${{ runner.os }}-cache- + + - name: Download sysdig-cli-scanner if needed + run: | + curl -sLO https://download.sysdig.com/scanning/sysdig-cli-scanner/latest_version.txt + mkdir -p ${GITHUB_WORKSPACE}/cache/db/ + if [ ! -f ${GITHUB_WORKSPACE}/cache/latest_version.txt ] || [ $(cat ./latest_version.txt) != $(cat ${GITHUB_WORKSPACE}/cache/latest_version.txt) ]; then + cp ./latest_version.txt ${GITHUB_WORKSPACE}/cache/latest_version.txt + curl -sL -o ${GITHUB_WORKSPACE}/cache/sysdig-cli-scanner "https://download.sysdig.com/scanning/bin/sysdig-cli-scanner/$(cat ${GITHUB_WORKSPACE}/cache/latest_version.txt)/linux/amd64/sysdig-cli-scanner" + chmod +x ${GITHUB_WORKSPACE}/cache/sysdig-cli-scanner + else + echo "sysdig-cli-scanner latest version already downloaded" + fi - name: Scan the image using sysdig-cli-scanner env: @@ -41,29 +62,10 @@ jobs: registry: ${{ env.REGISTRY_HOST }} username: ${{ secrets.REGISTRY_USER }} password: ${{ secrets.REGISTRY_PASSWORD }} + - name: Push uses: docker/build-push-action@v3 with: context: ${{ env.DOCKERFILE_CONTEXT }} push: true tags: ${{ env.REGISTRY_HOST }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} - - - name: Setup cache - uses: actions/cache@v3 - with: - path: cache - key: ${{ runner.os }}-cache-${{ hashFiles('**/sysdig-cli-scanner', '**/latest_version.txt', '**/db/main.db.meta.json', '**/scanner-cache/inlineScannerCache.db') }} - restore-keys: ${{ runner.os }}-cache- - - - name: Download sysdig-cli-scanner if needed - run: | - curl -sLO https://download.sysdig.com/scanning/sysdig-cli-scanner/latest_version.txt - mkdir -p ${GITHUB_WORKSPACE}/cache/db/ - if [ ! -f ${GITHUB_WORKSPACE}/cache/latest_version.txt ] || [ $(cat ./latest_version.txt) != $(cat ${GITHUB_WORKSPACE}/cache/latest_version.txt) ]; then - cp ./latest_version.txt ${GITHUB_WORKSPACE}/cache/latest_version.txt - curl -sL -o ${GITHUB_WORKSPACE}/cache/sysdig-cli-scanner "https://download.sysdig.com/scanning/bin/sysdig-cli-scanner/$(cat ${GITHUB_WORKSPACE}/cache/latest_version.txt)/linux/amd64/sysdig-cli-scanner" - chmod +x ${GITHUB_WORKSPACE}/cache/sysdig-cli-scanner - else - echo "sysdig-cli-scanner latest version already downloaded" - fi - From f99ffc4158f25cc92dd0d83ebeb6a9f5e0120208 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:38:31 -0600 Subject: [PATCH 08/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 0e631a1f31..44c24f1dae 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -30,7 +30,7 @@ jobs: uses: actions/cache@v3 with: path: cache - key: ${{ runner.os }}-cache-${{ hashFiles('**/sysdig-cli-scanner', '**/latest_version.txt', '**/db/main.db.meta.json', '**/scanner-cache/inlineScannerCache.db') }} + key: ${{ runner.os }}-cache-${{ hashFiles('/sysdig-cli-scanner', '/latest_version.txt', '/db/main.db.meta.json', '/scanner-cache/inlineScannerCache.db') }} restore-keys: ${{ runner.os }}-cache- - name: Download sysdig-cli-scanner if needed From 8aaf24255d7a0a7f3e034255cacd45a35da2c8a4 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:39:25 -0600 Subject: [PATCH 09/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 44c24f1dae..0e631a1f31 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -30,7 +30,7 @@ jobs: uses: actions/cache@v3 with: path: cache - key: ${{ runner.os }}-cache-${{ hashFiles('/sysdig-cli-scanner', '/latest_version.txt', '/db/main.db.meta.json', '/scanner-cache/inlineScannerCache.db') }} + key: ${{ runner.os }}-cache-${{ hashFiles('**/sysdig-cli-scanner', '**/latest_version.txt', '**/db/main.db.meta.json', '**/scanner-cache/inlineScannerCache.db') }} restore-keys: ${{ runner.os }}-cache- - name: Download sysdig-cli-scanner if needed From f14d941b888e3b737f535502741e01d021f2cab3 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:03:33 -0600 Subject: [PATCH 10/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 0e631a1f31..4c8d2fa11b 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -1,8 +1,8 @@ env: SYSDIG_SECURE_ENDPOINT: "https://app.us4.sysdig.com/" - REGISTRY_HOST: "quay.io" - IMAGE_NAME: "mytestimage" - IMAGE_TAG: "my-tag" + REGISTRY_HOST: "ghcr.io" + IMAGE_NAME: "dockersamples/examplevotingapp" + IMAGE_TAG: "latest" DOCKERFILE_CONTEXT: "github/new-scan-engine" name: Container build, scan and push From 93e6d413e4aa9c2ce2c26c21739c1f3ac89da5c5 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:13:07 -0600 Subject: [PATCH 11/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 4c8d2fa11b..698e427b37 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -1,7 +1,7 @@ env: SYSDIG_SECURE_ENDPOINT: "https://app.us4.sysdig.com/" REGISTRY_HOST: "ghcr.io" - IMAGE_NAME: "dockersamples/examplevotingapp" + IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" DOCKERFILE_CONTEXT: "github/new-scan-engine" From 75c6528f33f2e745570bd7f39a2f1e5522d1ea43 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:22:39 -0600 Subject: [PATCH 12/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 698e427b37..3c414a9913 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "github/new-scan-engine" + DOCKERFILE_CONTEXT: "github.com/DannyJS-933" name: Container build, scan and push From 09924c33297663f89003f1cf7a58873bf8fd3de7 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:23:41 -0600 Subject: [PATCH 13/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 3c414a9913..7994d46012 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "github.com/DannyJS-933" + DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app" name: Container build, scan and push From b45ed9857ff798de27a54e7e2018f17bdccaac1f Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:27:51 -0600 Subject: [PATCH 14/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 7994d46012..75bbef3db7 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app" + DOCKERFILE_CONTEXT: "https://github.com/DannyJS-933/example-voting-app/tree/09924c33297663f89003f1cf7a58873bf8fd3de7/vote" name: Container build, scan and push From 4f7e2daa3532aee391fa2e820cab954492952a9c Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:28:48 -0600 Subject: [PATCH 15/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 75bbef3db7..95eb35f621 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "https://github.com/DannyJS-933/example-voting-app/tree/09924c33297663f89003f1cf7a58873bf8fd3de7/vote" + DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app/tree/vote" name: Container build, scan and push From 7aba82f0e7620e128f79281f53f9ae407b3dc59d Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:32:47 -0600 Subject: [PATCH 16/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 95eb35f621..d6732bafca 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app/tree/vote" + DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-appvote/vote/Dockerfile" name: Container build, scan and push From 8f25667e8bab3230e8eb1cb72c651cebccbf458a Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:36:40 -0600 Subject: [PATCH 17/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index d6732bafca..2e745a009a 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-appvote/vote/Dockerfile" + DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app/vote/Dockerfile" name: Container build, scan and push From dfd5280430f5e1bb40c0f4b48067bb131ceb1ade Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:37:41 -0600 Subject: [PATCH 18/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 2e745a009a..268e278c14 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app/vote/Dockerfile" + DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app/vote" name: Container build, scan and push From 6419aa5fe833ca7790e473aa92371886d6cbbdaa Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:45:27 -0600 Subject: [PATCH 19/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 268e278c14..744dcc233f 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app/vote" + DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app/tree/main/vote" name: Container build, scan and push From 1807bf09fd65179b12335d21380213dca7011636 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:50:07 -0600 Subject: [PATCH 20/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 744dcc233f..4f8b8e0891 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app/tree/main/vote" + DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app" name: Container build, scan and push @@ -22,7 +22,7 @@ jobs: - name: Build and save uses: docker/build-push-action@v3 with: - context: ${{ env.DOCKERFILE_CONTEXT }} + context: ${{ env.DOCKERFILE_CONTEXT }}:tree/main/vote tags: ${{ env.REGISTRY_HOST }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} load: true From 29942fe90cb168dca715a3405bf3d4a58842b78e Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:54:50 -0600 Subject: [PATCH 21/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 4f8b8e0891..6b02a185c8 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app" + DOCKERFILE_CONTEXT: "https://github.com/DannyJS-933/example-voting-app.git" name: Container build, scan and push From fa024252472c5ae3d2f92bbb8e4ebb17d9c989fa Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:59:18 -0600 Subject: [PATCH 22/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 6b02a185c8..e6352fc2ae 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -22,7 +22,7 @@ jobs: - name: Build and save uses: docker/build-push-action@v3 with: - context: ${{ env.DOCKERFILE_CONTEXT }}:tree/main/vote + context: ${{ env.DOCKERFILE_CONTEXT }} tags: ${{ env.REGISTRY_HOST }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} load: true From ac775cc100066867e2e94ac3077a82ec4ad407b3 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:17:40 -0600 Subject: [PATCH 23/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index e6352fc2ae..a59e765748 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "https://github.com/DannyJS-933/example-voting-app.git" + DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app.git" name: Container build, scan and push From 02344730e3a95643fc310645eb99684df8e43804 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 18:51:35 -0600 Subject: [PATCH 24/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index a59e765748..a057fb2fbc 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -3,7 +3,7 @@ env: REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" IMAGE_TAG: "latest" - DOCKERFILE_CONTEXT: "github.com/DannyJS-933/example-voting-app.git" + DOCKERFILE_CONTEXT: "https://github.com/DannyJS-933/example-voting-app.git#main:vote" name: Container build, scan and push From 005764e5b61e2ebee452a068b8cee5d85e7325be Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:24:49 -0600 Subject: [PATCH 25/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index a057fb2fbc..3c74230b22 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -60,7 +60,7 @@ jobs: uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY_HOST }} - username: ${{ secrets.REGISTRY_USER }} + username: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_PASSWORD }} - name: Push From 37617d4f3848d96bbe6dd64447f2c423e414c3a3 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:31:39 -0600 Subject: [PATCH 26/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 3c74230b22..cbafc043ea 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -60,8 +60,8 @@ jobs: uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY_HOST }} - username: ${{ secrets.REGISTRY_TOKEN }} - password: ${{ secrets.REGISTRY_PASSWORD }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} - name: Push uses: docker/build-push-action@v3 From ad4f2338f2b3bc84fe310c8ec0a4e17fa1c61477 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:34:58 -0600 Subject: [PATCH 27/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index cbafc043ea..a057fb2fbc 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -61,7 +61,7 @@ jobs: with: registry: ${{ env.REGISTRY_HOST }} username: ${{ secrets.REGISTRY_USER }} - password: ${{ secrets.REGISTRY_TOKEN }} + password: ${{ secrets.REGISTRY_PASSWORD }} - name: Push uses: docker/build-push-action@v3 From b1421794bb53b8ea03b9c3cc33403d1d8b260756 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:44:19 -0600 Subject: [PATCH 28/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index a057fb2fbc..cbafc043ea 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -61,7 +61,7 @@ jobs: with: registry: ${{ env.REGISTRY_HOST }} username: ${{ secrets.REGISTRY_USER }} - password: ${{ secrets.REGISTRY_PASSWORD }} + password: ${{ secrets.REGISTRY_TOKEN }} - name: Push uses: docker/build-push-action@v3 From a18720dd68bac23bbc294c9310b716d33317d79c Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:53:21 -0600 Subject: [PATCH 29/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index cbafc043ea..bdaf16dc40 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -68,4 +68,4 @@ jobs: with: context: ${{ env.DOCKERFILE_CONTEXT }} push: true - tags: ${{ env.REGISTRY_HOST }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} + tags: ${{ env.REGISTRY_HOST }}/${{ secrets.REGISTRY_TOKEN }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} From f04ede7402faf2499fa2d4ff46eb1439ad019cb1 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:55:42 -0600 Subject: [PATCH 30/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index bdaf16dc40..5b2740159b 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -60,8 +60,8 @@ jobs: uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY_HOST }} - username: ${{ secrets.REGISTRY_USER }} - password: ${{ secrets.REGISTRY_TOKEN }} + username: ${{ secrets.REGISTRY_TOKEN }} + password: ${{ secrets.REGISTRY_PASSWORD }} - name: Push uses: docker/build-push-action@v3 From a8c84d3db6582e7564ee8ad3684ca77a2c8f9075 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:58:48 -0600 Subject: [PATCH 31/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 5b2740159b..a057fb2fbc 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -60,7 +60,7 @@ jobs: uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY_HOST }} - username: ${{ secrets.REGISTRY_TOKEN }} + username: ${{ secrets.REGISTRY_USER }} password: ${{ secrets.REGISTRY_PASSWORD }} - name: Push @@ -68,4 +68,4 @@ jobs: with: context: ${{ env.DOCKERFILE_CONTEXT }} push: true - tags: ${{ env.REGISTRY_HOST }}/${{ secrets.REGISTRY_TOKEN }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} + tags: ${{ env.REGISTRY_HOST }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} From f20c721fe14b442f4e3e6e1d86753afad459f941 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 20:00:38 -0600 Subject: [PATCH 32/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index a057fb2fbc..cbafc043ea 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -61,7 +61,7 @@ jobs: with: registry: ${{ env.REGISTRY_HOST }} username: ${{ secrets.REGISTRY_USER }} - password: ${{ secrets.REGISTRY_PASSWORD }} + password: ${{ secrets.REGISTRY_TOKEN }} - name: Push uses: docker/build-push-action@v3 From 039149f2841a8af310f8bb3bb817e2d05f0ec45f Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 20:14:13 -0600 Subject: [PATCH 33/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index cbafc043ea..11add6534d 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -64,7 +64,7 @@ jobs: password: ${{ secrets.REGISTRY_TOKEN }} - name: Push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: ${{ env.DOCKERFILE_CONTEXT }} push: true From 5b0efe471b06586f2ffb0fa243918bba66234206 Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 20:16:20 -0600 Subject: [PATCH 34/35] Update build-scan-and-push.yaml --- .github/workflows/build-scan-and-push.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-scan-and-push.yaml b/.github/workflows/build-scan-and-push.yaml index 11add6534d..4670f361c9 100644 --- a/.github/workflows/build-scan-and-push.yaml +++ b/.github/workflows/build-scan-and-push.yaml @@ -2,7 +2,7 @@ env: SYSDIG_SECURE_ENDPOINT: "https://app.us4.sysdig.com/" REGISTRY_HOST: "ghcr.io" IMAGE_NAME: "dockersamples" - IMAGE_TAG: "latest" + IMAGE_TAG: "vote" DOCKERFILE_CONTEXT: "https://github.com/DannyJS-933/example-voting-app.git#main:vote" name: Container build, scan and push @@ -64,7 +64,7 @@ jobs: password: ${{ secrets.REGISTRY_TOKEN }} - name: Push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v3 with: context: ${{ env.DOCKERFILE_CONTEXT }} push: true From bbc6b6e11f95ffeff22563c942662d781814ad4f Mon Sep 17 00:00:00 2001 From: DannyJS-933 <84547068+DannyJS-933@users.noreply.github.com> Date: Wed, 29 Nov 2023 22:45:08 -0600 Subject: [PATCH 35/35] test --- .github/workflows/call-docker-build-vote.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/call-docker-build-vote.yaml b/.github/workflows/call-docker-build-vote.yaml index cb4a484a2a..460fa041bf 100644 --- a/.github/workflows/call-docker-build-vote.yaml +++ b/.github/workflows/call-docker-build-vote.yaml @@ -80,3 +80,4 @@ jobs: ### Create a PR comment with image tags and labels ### defaults to false # comment-enable: false +