Skip to content

nightly

nightly #769

---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: nightly
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs daily
schedule:
- cron: '0 0 * * *'
# Dispatch: allows for manual trigger via GH UI
workflow_dispatch:
jobs:
# -----------------------------------------------------------------------------------------------
# (1/4) Determine parameter settings
# -----------------------------------------------------------------------------------------------
params:
uses: ./.github/workflows/params.yml
# -----------------------------------------------------------------------------------------------
# (2/4) Configure Build and Deploy Matrices
# -----------------------------------------------------------------------------------------------
configure:
needs: [params]
uses: devilbox/github-actions/.github/workflows/docker-multistage-configure.yml@master
with:
enabled: true
can_deploy: true
versions: ${{ needs.params.outputs.versions }}
refs: ${{ needs.params.outputs.refs }}
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
configure-awskops:
needs: [params]
uses: devilbox/github-actions/.github/workflows/docker-multistage-configure.yml@master
with:
enabled: true
can_deploy: true
versions: ${{ needs.params.outputs.versions }}
refs: ${{ needs.params.outputs.refs }}
fields_build: '[{"VERSION":"VERSION"}, {"FLAVOUR":"FLAVOUR"}, {"KOPS":"EXTRA"}, {"ARCH":"ARCH"}]'
fields_deploy: '[{"VERSION":"VERSION"}, {"FLAVOUR":"FLAVOUR"}, {"KOPS":"EXTRA"}]'
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
configure-awshelm:
needs: [params]
uses: devilbox/github-actions/.github/workflows/docker-multistage-configure.yml@master
with:
enabled: true
can_deploy: true
versions: ${{ needs.params.outputs.versions }}
refs: ${{ needs.params.outputs.refs }}
fields_build: '[{"VERSION":"VERSION"}, {"FLAVOUR":"FLAVOUR"}, {"HELM":"EXTRA"}, {"ARCH":"ARCH"}]'
fields_deploy: '[{"VERSION":"VERSION"}, {"FLAVOUR":"FLAVOUR"}, {"HELM":"EXTRA"}]'
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (3/4) Build & Test
# -----------------------------------------------------------------------------------------------
build-base:
needs:
- configure
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
upload_artifact: true
pull_base_image: true
push_image: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
run_tests: true
matrix: ${{ needs.configure.outputs.matrix_build }}
stage: base
stage_prev: ''
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
build-tools:
needs:
- configure
- build-base
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
upload_artifact: true
pull_base_image: false
push_image: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
run_tests: true
matrix: ${{ needs.configure.outputs.matrix_build }}
stage: tools
stage_prev: base
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
build-aws:
needs:
- configure
- build-tools
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
upload_artifact: true
pull_base_image: false
push_image: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
run_tests: true
matrix: ${{ needs.configure.outputs.matrix_build }}
stage: aws
stage_prev: tools
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
build-azure:
needs:
- configure
- build-tools
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
upload_artifact: true
pull_base_image: false
push_image: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
run_tests: true
matrix: ${{ needs.configure.outputs.matrix_build }}
stage: azure
stage_prev: tools
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
build-infra:
needs:
- configure
- build-tools
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
upload_artifact: true
pull_base_image: false
push_image: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
run_tests: true
matrix: ${{ needs.configure.outputs.matrix_build }}
stage: infra
stage_prev: tools
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
build-awsk8s:
needs:
- configure
- build-aws
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
upload_artifact: true
pull_base_image: false
push_image: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
run_tests: true
matrix: ${{ needs.configure.outputs.matrix_build }}
stage: awsk8s
stage_prev: aws
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# Note: awskops is special
build-awskops:
needs:
- configure-awskops
- build-awsk8s
uses: ./.github/workflows/docker-multistage-build-extra.yml
with:
has_refs: ${{ needs.configure-awskops.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure-awskops.outputs.artifact_prefix }}
upload_artifact: true
pull_base_image: false
push_image: ${{ needs.configure-awskops.outputs.can_login == 'true' && needs.configure-awskops.outputs.can_push == 'true' }}
run_tests: true
matrix: ${{ needs.configure-awskops.outputs.matrix_build }}
stage: awskops
stage_prev: awsk8s
extra_make_var_name: KOPS
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# Note: awshelm is special
build-awshelm:
needs:
- configure-awshelm
- build-awsk8s
uses: ./.github/workflows/docker-multistage-build-extra.yml
with:
has_refs: ${{ needs.configure-awshelm.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure-awshelm.outputs.artifact_prefix }}
upload_artifact: true
pull_base_image: false
push_image: ${{ needs.configure-awshelm.outputs.can_login == 'true' && needs.configure-awshelm.outputs.can_push == 'true' }}
run_tests: true
matrix: ${{ needs.configure-awshelm.outputs.matrix_build }}
stage: awshelm
stage_prev: awsk8s
extra_make_var_name: HELM
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (4/4) Push Manifests
# -----------------------------------------------------------------------------------------------
manifest-base:
needs:
- configure
- build-base
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
matrix: ${{ needs.configure.outputs.matrix_deploy }}
versions: ${{ needs.configure.outputs.versions }}
stage: base
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
manifest-tools:
needs:
- configure
- build-tools
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
matrix: ${{ needs.configure.outputs.matrix_deploy }}
versions: ${{ needs.configure.outputs.versions }}
stage: tools
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
manifest-infra:
needs:
- configure
- build-infra
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
matrix: ${{ needs.configure.outputs.matrix_deploy }}
versions: ${{ needs.configure.outputs.versions }}
stage: infra
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
manifest-azure:
needs:
- configure
- build-azure
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
matrix: ${{ needs.configure.outputs.matrix_deploy }}
versions: ${{ needs.configure.outputs.versions }}
stage: azure
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
manifest-aws:
needs:
- configure
- build-aws
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
matrix: ${{ needs.configure.outputs.matrix_deploy }}
versions: ${{ needs.configure.outputs.versions }}
stage: aws
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
manifest-awsk8s:
needs:
- configure
- build-awsk8s
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
matrix: ${{ needs.configure.outputs.matrix_deploy }}
versions: ${{ needs.configure.outputs.versions }}
stage: awsk8s
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# Note: awskops is special
manifest-awskops:
needs:
- configure-awskops
- build-awskops
uses: ./.github/workflows/docker-multistage-push-manifest-kops.yml
with:
can_deploy: ${{ needs.configure-awskops.outputs.can_login == 'true' && needs.configure-awskops.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure-awskops.outputs.has_refs == 'true' }}
matrix: ${{ needs.configure-awskops.outputs.matrix_deploy }}
versions: ${{ needs.configure-awskops.outputs.versions }}
stage: awskops
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# Note: awshelm is special
manifest-awshelm:
needs:
- configure-awshelm
- build-awshelm
uses: ./.github/workflows/docker-multistage-push-manifest-helm.yml
with:
can_deploy: ${{ needs.configure-awshelm.outputs.can_login == 'true' && needs.configure-awshelm.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure-awshelm.outputs.has_refs == 'true' }}
matrix: ${{ needs.configure-awshelm.outputs.matrix_deploy }}
versions: ${{ needs.configure-awshelm.outputs.versions }}
stage: awshelm
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}