-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix need dependecny for jobs in staging deploy pipeline and set prope…
…r node version (#1167)
- Loading branch information
1 parent
cdd3b41
commit 141fd26
Showing
2 changed files
with
14 additions
and
9 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
echo $FILES | ||
echo "file_list=$FILES" >> $GITHUB_OUTPUT | ||
extract-version: | ||
read-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
okr-docker-image: ${{ vars.NEW_VALUE_URL }}:${{ steps.store-version.outputs.version}}-PROD | ||
|
@@ -35,7 +35,7 @@ jobs: | |
id: store-version | ||
|
||
build-docker-image: | ||
needs: extract-version | ||
needs: read-version | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -68,7 +68,7 @@ jobs: | |
with: | ||
context: . | ||
file: docker/Dockerfile | ||
tags: ${{ needs.extract-version.outputs.okr-docker-image}} | ||
tags: ${{ needs.read-version.outputs.okr-docker-image}} | ||
load: true | ||
push: false | ||
outputs: type=docker,dest=/tmp/okr-docker-image.tar | ||
|
@@ -80,12 +80,12 @@ jobs: | |
path: /tmp/okr-docker-image.tar | ||
|
||
- name: print imagetags | ||
run: echo ${{ needs.extract-version.outputs.okr-docker-image}} | ||
run: echo ${{ needs.read-version.outputs.okr-docker-image}} | ||
|
||
|
||
e2e-docker: | ||
runs-on: ubuntu-24.04 | ||
needs: [build-docker-image, extract-version, get-e2e-files] | ||
needs: [build-docker-image, read-version, get-e2e-files] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -132,7 +132,7 @@ jobs: | |
|
||
okr-deploy: | ||
runs-on: ubuntu-latest | ||
needs: [e2e-docker, extract-version] | ||
needs: [e2e-docker, read-version] | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
|
@@ -157,7 +157,7 @@ jobs: | |
password: ${{ secrets.QUAY_TOKEN }} | ||
|
||
- name: Push | ||
run: docker push ${{ needs.extract-version.outputs.okr-docker-image}} | ||
run: docker push ${{ needs.read-version.outputs.okr-docker-image}} | ||
|
||
- name: Install yq | ||
shell: bash | ||
|
@@ -174,7 +174,7 @@ jobs: | |
COMMITPREFIX: '[CTS]' | ||
run: | | ||
curl -s --header "PRIVATE-TOKEN: ${{secrets.GITLAB_ACCESS_TOKEN}}" "${{vars.TARGET_GITLAB_REPOSITORY}}/files/${{vars.GITLAB_FILEPATH}}?ref=${{vars.TARGET_GITLAB_REFERENCE}}" -H "Accept: application/json" -H "Content-Type: application/json" | jq -r '.content' | base64 --decode > response.yaml | ||
yq -i "${{vars.YAML_PATH}} = \"${{needs.extract-version.outputs.okr-docker-image}}\"" response.yaml | ||
yq -i "${{vars.YAML_PATH}} = \"${{needs.read-version.outputs.okr-docker-image}}\"" response.yaml | ||
UPDATED_CONTENT=$(cat response.yaml) | ||
curl --request PUT --header 'PRIVATE-TOKEN: ${{secrets.GITLAB_ACCESS_TOKEN}}' -F "branch=${{vars.TARGET_GITLAB_REFERENCE}}" -F "[email protected]" -F "author_name=GitLab Actions" -F "content=${UPDATED_CONTENT}" -F "commit_message=$COMMITPREFIX Automated changes to ${{vars.FILEPATH_COMMIT}}" "${{vars.TARGET_GITLAB_REPOSITORY}}/files/${{vars.GITLAB_FILEPATH}}" | ||
|
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