-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename ci job to be consistent with other repos workflows (#197)
- Loading branch information
Showing
1 changed file
with
23 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ env: | |
|
||
jobs: | ||
|
||
kosli-trail: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
image_tag: ${{ steps.variables.outputs.image_tag }} | ||
|
@@ -52,7 +52,7 @@ jobs: | |
pull-request: | ||
needs: [kosli-trail] | ||
needs: [setup] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
|
@@ -74,7 +74,7 @@ jobs: | |
|
||
|
||
lint: | ||
needs: [kosli-trail] | ||
needs: [setup] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -104,10 +104,10 @@ jobs: | |
build-image: | ||
needs: [kosli-trail] | ||
needs: [setup] | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_NAME: ${{ needs.kosli-trail.outputs.image_name }} | ||
IMAGE_NAME: ${{ needs.setup.outputs.image_name }} | ||
outputs: | ||
kosli_fingerprint: ${{ steps.variables.outputs.kosli_fingerprint }} | ||
steps: | ||
|
@@ -123,7 +123,7 @@ jobs: | |
with: | ||
context: . | ||
push: true | ||
tags: ${{ needs.kosli-trail.outputs.image_name }} | ||
tags: ${{ needs.setup.outputs.image_name }} | ||
build-args: | ||
COMMIT_SHA=${{ github.sha }} | ||
|
||
|
@@ -157,7 +157,7 @@ jobs: | |
snyk-container-scan: | ||
needs: [build-image, kosli-trail] | ||
needs: [build-image, setup] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -172,7 +172,7 @@ jobs: | |
|
||
- name: Run Snyk container scan and report results to Kosli Trail | ||
env: | ||
IMAGE_NAME: ${{ needs.kosli-trail.outputs.image_name }} | ||
IMAGE_NAME: ${{ needs.setup.outputs.image_name }} | ||
KOSLI_FINGERPRINT: ${{ needs.build-image.outputs.kosli_fingerprint }} | ||
KOSLI_ATTACHMENTS: /tmp/kosli_attachments | ||
SARIF_FILENAME: snyk.container.scan.json | ||
|
@@ -195,7 +195,7 @@ jobs: | |
snyk-code-scan: | ||
needs: [build-image, kosli-trail] | ||
needs: [build-image, setup] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -210,7 +210,7 @@ jobs: | |
|
||
- name: Run Snyk code scan and report results to Kosli Trail | ||
env: | ||
IMAGE_NAME: ${{ needs.kosli-trail.outputs.image_name }} | ||
IMAGE_NAME: ${{ needs.setup.outputs.image_name }} | ||
KOSLI_ATTACHMENTS: /tmp/kosli_attachments | ||
KOSLI_FINGERPRINT: ${{ needs.build-image.outputs.kosli_fingerprint }} | ||
SARIF_FILENAME: snyk.code.scan.json | ||
|
@@ -233,7 +233,7 @@ jobs: | |
sonarcloud-scan: | ||
needs: [kosli-trail, build-image] | ||
needs: [setup, build-image] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -253,10 +253,10 @@ jobs: | |
sdlc-control-gate: | ||
needs: [lint, pull-request, unit-tests, snyk-container-scan, snyk-code-scan, kosli-trail, build-image, sonarcloud-scan] | ||
needs: [lint, pull-request, unit-tests, snyk-container-scan, snyk-code-scan, setup, build-image, sonarcloud-scan] | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_NAME: ${{ needs.kosli-trail.outputs.image_name }} | ||
IMAGE_NAME: ${{ needs.setup.outputs.image_name }} | ||
KOSLI_FINGERPRINT: ${{ needs.build-image.outputs.kosli_fingerprint }} | ||
steps: | ||
- name: Setup Kosli CLI | ||
|
@@ -270,13 +270,13 @@ jobs: | |
|
||
|
||
approve-deployment-to-beta: | ||
needs: [sdlc-control-gate, kosli-trail, build-image] | ||
needs: [sdlc-control-gate, setup, build-image] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: staging | ||
url: https://beta.cyber-dojo.org | ||
env: | ||
IMAGE_NAME: ${{ needs.kosli-trail.outputs.image_name }} | ||
IMAGE_NAME: ${{ needs.setup.outputs.image_name }} | ||
KOSLI_FINGERPRINT: ${{ needs.build-image.outputs.kosli_fingerprint }} | ||
KOSLI_ENVIRONMENT: aws-beta | ||
steps: | ||
|
@@ -295,20 +295,20 @@ jobs: | |
--approver="${{ github.actor }}" | ||
|
||
deploy-to-beta: | ||
needs: [approve-deployment-to-beta, kosli-trail] | ||
needs: [approve-deployment-to-beta, setup] | ||
uses: ./.github/workflows/sub_deploy_to_beta.yml | ||
with: | ||
IMAGE_TAG: ${{ needs.kosli-trail.outputs.image_tag }} | ||
IMAGE_TAG: ${{ needs.setup.outputs.image_tag }} | ||
|
||
|
||
approve-deployment-to-prod: | ||
needs: [deploy-to-beta, kosli-trail, build-image] | ||
needs: [deploy-to-beta, setup, build-image] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: production | ||
url: https://cyber-dojo.org | ||
env: | ||
IMAGE_NAME: ${{ needs.kosli-trail.outputs.image_name }} | ||
IMAGE_NAME: ${{ needs.setup.outputs.image_name }} | ||
KOSLI_FINGERPRINT: ${{ needs.build-image.outputs.kosli_fingerprint }} | ||
KOSLI_ENVIRONMENT: aws-prod | ||
steps: | ||
|
@@ -328,10 +328,10 @@ jobs: | |
|
||
|
||
deploy-to-prod: | ||
needs: [approve-deployment-to-prod, kosli-trail] | ||
needs: [approve-deployment-to-prod, setup] | ||
uses: ./.github/workflows/sub_deploy_to_prod.yml | ||
with: | ||
IMAGE_TAG: ${{ needs.kosli-trail.outputs.image_tag }} | ||
IMAGE_TAG: ${{ needs.setup.outputs.image_tag }} | ||
|
||
|
||
# The cyberdojo/versioner refresh-env.sh script | ||
|
@@ -342,10 +342,10 @@ jobs: | |
# - use the 1st 7 chars of the SHA as a latest-equivalent tag | ||
|
||
push-latest: | ||
needs: [deploy-to-prod, kosli-trail] | ||
needs: [deploy-to-prod, setup] | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_NAME: ${{ needs.kosli-trail.outputs.image_name }} | ||
IMAGE_NAME: ${{ needs.setup.outputs.image_name }} | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
|