Skip to content

Commit abb71d2

Browse files
committed
ELI-452: Moves non workflows to helpers
1 parent 89b0127 commit abb71d2

12 files changed

+13
-14
lines changed

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
3939
echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4040
echo "version=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
41-
# echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
4241
- name: "Check if pull request exists for this branch"
4342
id: pr_exists
4443
env:
@@ -65,11 +64,11 @@ jobs:
6564
export VERSION="${{ steps.variables.outputs.version }}"
6665
export DOES_PULL_REQUEST_EXIST="${{ steps.pr_exists.outputs.does_pull_request_exist }}"
6766
make list-variables
68-
commit-stage: # Recommended maximum execution time is 2 minutes
67+
commit-stage:
6968
name: "Commit stage"
7069
if: github.event.pull_request.draft == false
7170
needs: [metadata]
72-
uses: ./.github/workflows/stage-1-commit.yaml
71+
uses: ./.github/workflows/helpers/stage-1-commit.yaml
7372
with:
7473
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
7574
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
@@ -79,11 +78,11 @@ jobs:
7978
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
8079
version: "${{ needs.metadata.outputs.version }}"
8180
secrets: inherit
82-
test-stage: # Recommended maximum execution time is 5 minutes
81+
test-stage:
8382
name: "Test stage"
8483
if: github.event.pull_request.draft == false
8584
needs: [metadata, commit-stage]
86-
uses: ./.github/workflows/stage-2-test.yaml
85+
uses: ./.github/workflows/helpers/stage-2-test.yaml
8786
with:
8887
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
8988
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
@@ -93,10 +92,10 @@ jobs:
9392
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
9493
version: "${{ needs.metadata.outputs.version }}"
9594
secrets: inherit
96-
build-stage: # Recommended maximum execution time is 3 minutes
95+
build-stage:
9796
name: "Build stage"
9897
needs: [metadata, test-stage]
99-
uses: ./.github/workflows/stage-3-build.yaml
98+
uses: ./.github/workflows/helpers/stage-3-build.yaml
10099
if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
101100
with:
102101
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
@@ -107,10 +106,10 @@ jobs:
107106
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
108107
version: "${{ needs.metadata.outputs.version }}"
109108
secrets: inherit
110-
acceptance-stage: # Recommended maximum execution time is 10 minutes
109+
acceptance-stage:
111110
name: "Acceptance stage"
112111
needs: [metadata, build-stage]
113-
uses: ./.github/workflows/stage-4-acceptance.yaml
112+
uses: ./.github/workflows/helpers/stage-4-acceptance.yaml
114113
if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
115114
with:
116115
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"

.github/workflows/cicd-2-publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
regression-tests:
134134
name: "Regression Tests"
135135
needs: publish
136-
uses: ./.github/workflows/regression-tests.yml
136+
uses: ./.github/workflows/helpers/regression-tests.yml
137137
with:
138138
ENVIRONMENT: "dev"
139139
VERSION_NUMBER: "main"

.github/workflows/cicd-3-test-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
regression-tests:
109109
name: "Regression Tests"
110110
needs: deploy
111-
uses: ./.github/workflows/regression-tests.yml
111+
uses: ./.github/workflows/helpers/regression-tests.yml
112112
with:
113113
ENVIRONMENT: "test"
114114
VERSION_NUMBER: "main"

.github/workflows/cicd-4-preprod-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on:
2424

2525
jobs:
2626
call:
27-
uses: ./.github/workflows/base-deploy.yml
27+
uses: ./.github/workflows/helpers/base-deploy.yml
2828
with:
2929
environment: preprod
3030
ref: ${{ inputs.ref }}

.github/workflows/cicd-5-prod-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
jobs:
1515
call:
16-
uses: ./.github/workflows/base-deploy.yml
16+
uses: ./.github/workflows/helpers/base-deploy.yml
1717
with:
1818
environment: prod
1919
ref: ${{ inputs.ref }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ jobs:
168168
name: "Regression Tests"
169169
if: ${{ needs.metadata.outputs.environment == 'preprod' }}
170170
needs: deploy
171-
uses: ./.github/workflows/regression-tests.yml
171+
uses: ./.github/workflows/helpers/regression-tests.yml
172172
with:
173173
ENVIRONMENT: "preprod"
174174
VERSION_NUMBER: "main"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)