Skip to content

Commit

Permalink
Make KOSLI_ORG a ci parameter (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonJagger committed Dec 13, 2023
1 parent 2ae613e commit ef3aca6
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@ jobs:
outputs:
image_tag: ${{ steps.vars.outputs.image_tag }}
kosli_host: ${{ steps.vars.outputs.kosli_host }}
kosli_org: ${{ steps.vars.outputs.kosli_org }}
steps:
- name: Prepare
id: vars
run: |
echo "image_tag=$(echo $GITHUB_SHA | head -c7)" >> ${GITHUB_OUTPUT}
echo "kosli_host=${{ env.KOSLI_HOST }}" >> ${GITHUB_OUTPUT}
echo "kosli_org=${{ env.KOSLI_ORG }}" >> ${GITHUB_OUTPUT}
create-kosli-flow:
needs: [variables]
uses: ./.github/workflows/sub_create_kosli_flow.yml
secrets:
KOSLI_API_TOKEN: ${{ secrets.KOSLI_API_TOKEN }}
with:
KOSLI_HOST: ${{ needs.variables.outputs.kosli_host }}
KOSLI_ORG: ${{ needs.variables.outputs.kosli_org }}

wait-for-image:
needs: [create-kosli-flow]
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sub_approve_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
default: https://app.kosli.com
required: false
type: string
KOSLI_ORG:
default: cyber-dojo
required: false
type: string
IMAGE_TAG:
required: true
type: string
Expand All @@ -21,7 +25,7 @@ on:
env:
KOSLI_DRY_RUN: ${{ vars.KOSLI_DRY_RUN }}
KOSLI_HOST: ${{ inputs.KOSLI_HOST }}
KOSLI_ORG: ${{ vars.KOSLI_ORG }}
KOSLI_ORG: ${{ inputs.KOSLI_ORG }}
KOSLI_FLOW: ${{ vars.KOSLI_FLOW }}
KOSLI_API_TOKEN: ${{ secrets.KOSLI_API_TOKEN }}

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sub_build_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ on:
default: https://app.kosli.com
required: false
type: string
KOSLI_ORG:
default: cyber-dojo
required: false
type: string
IMAGE_TAG:
required: true
type: string

env:
KOSLI_DRY_RUN: ${{ vars.KOSLI_DRY_RUN }}
KOSLI_HOST: ${{ inputs.KOSLI_HOST }}
KOSLI_ORG: ${{ vars.KOSLI_ORG }}
KOSLI_ORG: ${{ inputs.KOSLI_ORG }}
KOSLI_FLOW: ${{ vars.KOSLI_FLOW }}
KOSLI_API_TOKEN: ${{ secrets.KOSLI_API_TOKEN }}

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sub_create_kosli_flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ on:
default: https://app.kosli.com
required: false
type: string
KOSLI_ORG:
default: cyber-dojo
required: false
type: string

env:
KOSLI_DRY_RUN: ${{ vars.KOSLI_DRY_RUN }}
KOSLI_HOST: ${{ inputs.KOSLI_HOST }}
KOSLI_ORG: ${{ vars.KOSLI_ORG }}
KOSLI_ORG: ${{ inputs.KOSLI_ORG }}
KOSLI_FLOW: ${{ vars.KOSLI_FLOW }}
KOSLI_API_TOKEN: ${{ secrets.KOSLI_API_TOKEN }}

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sub_sdlc_gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ on:
default: https://app.kosli.com
required: false
type: string
KOSLI_ORG:
default: cyber-dojo
required: false
type: string
IMAGE_TAG:
required: true
type: string

env:
KOSLI_DRY_RUN: ${{ vars.KOSLI_DRY_RUN }}
KOSLI_HOST: ${{ inputs.KOSLI_HOST }}
KOSLI_ORG: ${{ vars.KOSLI_ORG }}
KOSLI_ORG: ${{ inputs.KOSLI_ORG }}
KOSLI_FLOW: ${{ vars.KOSLI_FLOW }}
KOSLI_API_TOKEN: ${{ secrets.KOSLI_API_TOKEN }}

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sub_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ on:
default: https://app.kosli.com
required: false
type: string
KOSLI_ORG:
default: cyber-dojo
required: false
type: string
IMAGE_TAG:
required: true
type: string

env:
KOSLI_DRY_RUN: ${{ vars.KOSLI_DRY_RUN }}
KOSLI_HOST: ${{ inputs.KOSLI_HOST }}
KOSLI_ORG: ${{ vars.KOSLI_ORG }}
KOSLI_ORG: ${{ inputs.KOSLI_ORG }}
KOSLI_FLOW: ${{ vars.KOSLI_FLOW }}
KOSLI_API_TOKEN: ${{ secrets.KOSLI_API_TOKEN }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
Expand Down

0 comments on commit ef3aca6

Please sign in to comment.