File tree Expand file tree Collapse file tree 10 files changed +47
-14
lines changed
Expand file tree Collapse file tree 10 files changed +47
-14
lines changed Original file line number Diff line number Diff line change 2323 uses : wisemen-digital/devops-ga-changed-paths-filter@main
2424 with :
2525 filter-file : .github/k8s-rollout-filters.yaml
26+ - name : Ensure access to private repositories
27+ shell : bash
28+ run : |
29+ AUTH="x-access-token:${{ secrets.K8S_MODULES_SECRET }}"
30+ git config --global url."https://${AUTH}@github.com/".insteadOf "git@github.com:"
2631 - name : Generate diffs
2732 id : preview
2833 run : |
Original file line number Diff line number Diff line change 2020 AZURE_CREDENTIALS :
2121 description : Json string for login with an Azure service principal
2222 required : true
23+ K8S_MODULES_SECRET :
24+ description : Token to access github modules repositories
25+ required : true
2326
2427jobs :
2528 generate-matrix :
5154 vendor : azure
5255 cluster-id : ${{ vars.K8S_CLUSTER_ID }}
5356 config-path : ${{ matrix.deployment.path }}
57+ github-access-token : ${{ secrets.K8S_MODULES_SECRET }}
5458 azure-credentials : ${{ secrets.AZURE_CREDENTIALS }}
5559 azure-resource-group : ${{ vars.AZURE_RESOURCE_GROUP }}
Original file line number Diff line number Diff line change 1919 DIGITALOCEAN_API_TOKEN :
2020 description : DigitalOcean API token
2121 required : true
22+ K8S_MODULES_SECRET :
23+ description : Token to access github modules repositories
24+ required : true
2225
2326jobs :
2427 generate-matrix :
5053 vendor : digitalocean
5154 cluster-id : ${{ vars.K8S_CLUSTER_ID }}
5255 config-path : ${{ matrix.deployment.path }}
56+ github-access-token : ${{ secrets.K8S_MODULES_SECRET }}
5357 digitalocean-api-token : ${{ secrets.DIGITALOCEAN_API_TOKEN }}
Original file line number Diff line number Diff line change 1919 required : true
2020 type : string
2121 secrets :
22+ K8S_MODULES_SECRET :
23+ description : Token to access github modules repositories
24+ required : true
2225 SCALEWAY_ACCESS_KEY :
2326 description : Scaleway API key ID
2427 required : true
5659 vendor : scaleway
5760 cluster-id : ${{ vars.K8S_CLUSTER_ID }}
5861 config-path : ${{ matrix.deployment.path }}
62+ github-access-token : ${{ secrets.K8S_MODULES_SECRET }}
5963 scaleway-organization-id : ${{ vars.SCALEWAY_ORGANIZATION_ID }}
6064 scaleway-project-id : ${{ vars.SCALEWAY_PROJECT_ID }}
6165 scaleway-region : ${{ vars.SCALEWAY_REGION }}
Original file line number Diff line number Diff line change 7272 with :
7373 name : app-build
7474 path : dist.tar.gz
75+ retention-days : 7
7576 test :
7677 name : Test Application
7778 needs : build
Original file line number Diff line number Diff line change @@ -63,21 +63,40 @@ jobs:
6363 xml-lint :
6464 name : Lint XML
6565 runs-on : ubuntu-latest
66+ container : alpine:latest
6667 steps :
6768 - name : Checkout
6869 uses : actions/checkout@v4
6970 - name : Install xmllint
7071 if : ${{ hashFiles('s3/**/*.xml') != '' }}
71- run : sudo apt-get -qq install -y libxml2-utils
72- - name : Configure XML reporter
73- if : ${{ hashFiles('s3/**/*.xml') != '' }}
74- uses : korelstar/xmllint-problem-matcher@v1
72+ run : apk add --no-cache libxml2-utils
7573 - name : Validate S3 CORS configurations
7674 if : ${{ hashFiles('s3/**/cors.xml') != '' }}
7775 run : |
76+ echo '${{ env.aws-xmllint-matcher-json }}' > "aws-xmllint-matcher.json"
7877 echo '${{ env.aws-xsd }}' > "aws.xsd"
78+
79+ echo '::add-matcher::aws-xmllint-matcher.json'
7980 find s3 -name "cors.xml" -print0 | xargs -0 xmllint --schema aws.xsd --noout
81+ echo '::remove-matcher owner=aws-xmllint::'
8082 env :
83+ aws-xmllint-matcher-json : >-
84+ {
85+ "problemMatcher": [
86+ {
87+ "owner": "aws-xmllint",
88+ "pattern": [
89+ {
90+ "regexp": "^(.+):(\\d+):\\s+(.+)\\s+:\\s+(.+)$",
91+ "file": 1,
92+ "line": 2,
93+ "code": 3,
94+ "message": 4
95+ }
96+ ]
97+ }
98+ ]
99+ }
81100 aws-xsd : >-
82101 <?xml version="1.0" encoding="UTF-8"?>
83102 <xsd:schema
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ jobs:
115115 path : |
116116 dist
117117 _build
118+ retention-days : 3
118119 prep-test :
119120 name : Prepare Test Services
120121 runs-on : ubuntu-latest
@@ -123,7 +124,6 @@ jobs:
123124 nats-image : ${{ steps.data.outputs.nats-image }}
124125 redis-image : ${{ steps.data.outputs.redis-image }}
125126 typesense-image : ${{ steps.data.outputs.typesense-image }}
126- typesense-health : ${{ steps.data.outputs.typesense-health }}
127127 steps :
128128 - name : Prepare Test Services
129129 id : data
@@ -145,9 +145,6 @@ jobs:
145145 fi
146146 if [ "${{ inputs.test-typesense-enabled }}" == "true" ]; then
147147 echo "typesense-image=${{ inputs.test-typesense-image }}" >> "$GITHUB_OUTPUT"
148- echo "typesense-health=apt-get update && \
149- apt-get install -y curl && \
150- curl http://127.0.0.1:8108/health" >> "$GITHUB_OUTPUT"
151148 else
152149 echo "typesense-image=" >> "$GITHUB_OUTPUT"
153150 fi
@@ -203,7 +200,7 @@ jobs:
203200 TYPESENSE_DATA_DIR : ' /home'
204201 TYPESENSE_API_KEY : ' api_key'
205202 options : >-
206- --health-cmd "${{ needs.prep-test.outputs.typesense-health }} "
203+ --health-cmd="bash -c 'exec 3<>/dev/tcp/localhost/8108 && printf \"GET /health HTTP/1.1\r\nConnection: close\r\n\r\n\" >&3 && head -n1 <&3 | grep 200 && exec 3>&-' "
207204 --health-interval 10s
208205 --health-timeout 10s
209206 --health-retries 5
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ jobs:
115115 path : |
116116 dist
117117 _build
118+ retention-days : 3
118119 prep-test :
119120 name : Prepare Test Services
120121 runs-on : ubuntu-latest
@@ -123,7 +124,6 @@ jobs:
123124 nats-image : ${{ steps.data.outputs.nats-image }}
124125 redis-image : ${{ steps.data.outputs.redis-image }}
125126 typesense-image : ${{ steps.data.outputs.typesense-image }}
126- typesense-health : ${{ steps.data.outputs.typesense-health }}
127127 steps :
128128 - name : Prepare Test Services
129129 id : data
@@ -145,9 +145,6 @@ jobs:
145145 fi
146146 if [ "${{ inputs.test-typesense-enabled }}" == "true" ]; then
147147 echo "typesense-image=${{ inputs.test-typesense-image }}" >> "$GITHUB_OUTPUT"
148- echo "typesense-health=apt-get update && \
149- apt-get install -y curl && \
150- curl http://127.0.0.1:8108/health" >> "$GITHUB_OUTPUT"
151148 else
152149 echo "typesense-image=" >> "$GITHUB_OUTPUT"
153150 fi
@@ -203,7 +200,7 @@ jobs:
203200 TYPESENSE_DATA_DIR : ' /home'
204201 TYPESENSE_API_KEY : ' api_key'
205202 options : >-
206- --health-cmd "${{ needs.prep-test.outputs.typesense-health }} "
203+ --health-cmd="bash -c 'exec 3<>/dev/tcp/localhost/8108 && printf \"GET /health HTTP/1.1\r\nConnection: close\r\n\r\n\" >&3 && head -n1 <&3 | grep 200 && exec 3>&-' "
207204 --health-interval 10s
208205 --health-timeout 10s
209206 --health-retries 5
Original file line number Diff line number Diff line change 7171 name : app-build
7272 include-hidden-files : true
7373 path : ${{ inputs.build-output-path }}
74+ retention-days : 3
7475
7576 # Then test
7677 test :
Original file line number Diff line number Diff line change 9494 name : app-build
9595 path : |
9696 dist
97+ retention-days : 3
9798 - name : Prep. Playwright if needed
9899 id : prep-playwright
99100 run : |
You can’t perform that action at this time.
0 commit comments