Skip to content

Commit 6bb5d43

Browse files
committed
Demo-target build process moved to release pipeline
As requested in issue #717 the demo-targets are no longer pushed to Dockerhub on each CI Run. Instead they are only pushed with a new SCB release, i.e the release-build.yaml CI pipeline. Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
1 parent d5cf706 commit 6bb5d43

2 files changed

Lines changed: 61 additions & 64 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -538,68 +538,6 @@ jobs:
538538
echo "Operator Startup Logs"
539539
kubectl -n securecodebox-system logs deployment/securecodebox-controller-manager
540540
541-
# ---- Build | Demo-Targets | Custom ----
542-
543-
# This Section contains Demo-Targets that are developed by the secureCodeBox project
544-
# The tag for these images will be the Semver of the release
545-
546-
demo-targets:
547-
name: "Build | Custom Demo-Targets"
548-
runs-on: ubuntu-latest
549-
strategy:
550-
matrix:
551-
target:
552-
- old-joomla
553-
- old-typo3
554-
- old-wordpress
555-
steps:
556-
- name: Checkout
557-
uses: actions/checkout@v2
558-
559-
- name: Set ENV Var with Demo-Target Version
560-
uses: mikefarah/yq@v4.4.1
561-
# Notice: The current version of the demo-target is provided via the Chart.yaml to ensure
562-
# there is only one place to edit the version of a scanner
563-
with:
564-
cmd: echo targetVersion=$(yq e .appVersion demo-targets/${{ matrix.target }}/Chart.yaml) >> $GITHUB_ENV
565-
566-
- name: Docker Meta
567-
id: docker_meta
568-
uses: docker/metadata-action@v3
569-
with:
570-
images: ${{ env.DOCKER_NAMESPACE }}/${{ matrix.target }}
571-
tags: |
572-
type=sha
573-
latest
574-
${{ env.targetVersion }}
575-
576-
- name: Set up Docker Buildx
577-
uses: docker/setup-buildx-action@v1
578-
579-
- name: Login to DockerHub
580-
uses: docker/login-action@v1
581-
with:
582-
username: ${{ secrets.DOCKER_USERNAME }}
583-
password: ${{ secrets.DOCKER_TOKEN }}
584-
585-
- name: Build and Push
586-
uses: docker/build-push-action@v2
587-
with:
588-
context: ./demo-targets/${{ matrix.target }}/container
589-
file: ./demo-targets/${{ matrix.target }}/container/Dockerfile
590-
platforms: linux/amd64
591-
push: true
592-
tags: ${{ steps.docker_meta.outputs.tags }}
593-
labels: ${{ steps.docker_meta.outputs.labels }}
594-
595-
- name: Update Docker Hub Description
596-
uses: peter-evans/dockerhub-description@v2
597-
with:
598-
username: ${{ secrets.DOCKERHUB_USERNAME }}
599-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
600-
repository: ${{ env.DOCKER_NAMESPACE }}/${{ matrix.target }}
601-
readme-filepath: ./demo-targets/${{ matrix.target }}/docs/README.DockerHub-Target.md
602-
603541
# ---- Integration Tests ----
604542

605543
Integration-tests-hooks:

‎.github/workflows/release-build.yaml‎

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ env:
2121
DOCKER_NAMESPACE: ${{ secrets.DOCKER_NAMESPACE }}
2222

2323
jobs:
24-
2524
# ---- Operator & Lurcher ----
2625

2726
operator:
@@ -220,7 +219,6 @@ jobs:
220219
repository: ${{ env.DOCKER_NAMESPACE }}/hook-${{ matrix.hook }}
221220
readme-filepath: ./hooks/${{ matrix.hook }}/docs/README.DockerHub-Hook.md
222221

223-
224222
# ---- Dashboard Importer ----
225223

226224
dashboardImporter:
@@ -471,3 +469,64 @@ jobs:
471469
password: ${{ secrets.DOCKERHUB_PASSWORD }}
472470
repository: ${{ env.DOCKER_NAMESPACE }}/scanner-${{ matrix.scanner }}
473471
readme-filepath: ./scanners/${{ matrix.scanner }}/docs/README.DockerHub-Scanner.md
472+
# ---- Build | Demo-Targets | Custom ----
473+
474+
# This Section contains Demo-Targets that are developed by the secureCodeBox project
475+
# The tag for these images will be the Semver of the release
476+
477+
demo-targets:
478+
name: "Build | Custom Demo-Targets"
479+
runs-on: ubuntu-latest
480+
strategy:
481+
matrix:
482+
target:
483+
- old-joomla
484+
- old-typo3
485+
- old-wordpress
486+
steps:
487+
- name: Checkout
488+
uses: actions/checkout@v2
489+
490+
- name: Set ENV Var with Demo-Target Version
491+
uses: mikefarah/yq@v4.4.1
492+
# Notice: The current version of the demo-target is provided via the Chart.yaml to ensure
493+
# there is only one place to edit the version of a scanner
494+
with:
495+
cmd: echo targetVersion=$(yq e .appVersion demo-targets/${{ matrix.target }}/Chart.yaml) >> $GITHUB_ENV
496+
497+
- name: Docker Meta
498+
id: docker_meta
499+
uses: docker/metadata-action@v3
500+
with:
501+
images: ${{ env.DOCKER_NAMESPACE }}/${{ matrix.target }}
502+
tags: |
503+
type=sha
504+
latest
505+
${{ env.targetVersion }}
506+
507+
- name: Set up Docker Buildx
508+
uses: docker/setup-buildx-action@v1
509+
510+
- name: Login to DockerHub
511+
uses: docker/login-action@v1
512+
with:
513+
username: ${{ secrets.DOCKER_USERNAME }}
514+
password: ${{ secrets.DOCKER_TOKEN }}
515+
516+
- name: Build and Push
517+
uses: docker/build-push-action@v2
518+
with:
519+
context: ./demo-targets/${{ matrix.target }}/container
520+
file: ./demo-targets/${{ matrix.target }}/container/Dockerfile
521+
platforms: linux/amd64
522+
push: true
523+
tags: ${{ steps.docker_meta.outputs.tags }}
524+
labels: ${{ steps.docker_meta.outputs.labels }}
525+
526+
- name: Update Docker Hub Description
527+
uses: peter-evans/dockerhub-description@v2
528+
with:
529+
username: ${{ secrets.DOCKERHUB_USERNAME }}
530+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
531+
repository: ${{ env.DOCKER_NAMESPACE }}/${{ matrix.target }}
532+
readme-filepath: ./demo-targets/${{ matrix.target }}/docs/README.DockerHub-Target.md

0 commit comments

Comments
 (0)