1111
1212permissions :
1313 contents : read
14+ id-token : write # required for OIDC to assume the ECR-pull IAM role
1415
1516jobs :
1617 lint-test :
1718 runs-on : ubuntu-latest
19+ env :
20+ MAESTROD_ECR_REGISTRY : 111300957880.dkr.ecr.eu-west-1.amazonaws.com
21+ MAESTROD_ECR_REPOSITORY : maestrod
22+ MAESTROD_ECR_TAG : nightly
23+ AWS_REGION : eu-west-1
1824 steps :
1925 - name : Checkout
2026 uses : actions/checkout@v6
2127 with :
2228 fetch-depth : 0
2329
2430 - name : Set up Helm
25- uses : azure/setup-helm@v4
31+ uses : azure/setup-helm@v5
2632 with :
2733 version : latest
2834
4147 if [[ -n "$changed" ]]; then
4248 echo "changed=true" >> "$GITHUB_OUTPUT"
4349 fi
50+ if echo "$changed" | grep -qx 'charts/maestrod'; then
51+ echo "maestrod-changed=true" >> "$GITHUB_OUTPUT"
52+ fi
53+ if echo "$changed" | grep -v '^charts/maestrod$' | grep -q .; then
54+ echo "non-maestrod-changed=true" >> "$GITHUB_OUTPUT"
55+ fi
4456
4557 - name : Run chart-testing (lint)
4658 if : steps.list-changed.outputs.changed == 'true'
@@ -50,16 +62,34 @@ jobs:
5062 if : steps.list-changed.outputs.changed == 'true'
5163 uses : helm/kind-action@v1
5264
65+ - name : Configure AWS credentials (for ECR pull)
66+ if : steps.list-changed.outputs.maestrod-changed == 'true'
67+ uses : aws-actions/configure-aws-credentials@v6
68+ with :
69+ role-to-assume : ${{ secrets.AWS_CI_ECR_ROLE_ARN }}
70+ aws-region : ${{ env.AWS_REGION }}
71+
72+ - name : Log in to Amazon ECR
73+ if : steps.list-changed.outputs.maestrod-changed == 'true'
74+ uses : aws-actions/amazon-ecr-login@v2
75+
76+ - name : Side-load maestrod image into kind
77+ if : steps.list-changed.outputs.maestrod-changed == 'true'
78+ run : |
79+ IMAGE="${MAESTROD_ECR_REGISTRY}/${MAESTROD_ECR_REPOSITORY}:${MAESTROD_ECR_TAG}"
80+ docker pull "$IMAGE"
81+ kind load docker-image "$IMAGE" --name chart-testing
82+
5383 - name : Install Gateway API CRDs
54- if : steps.list-changed.outputs.changed == 'true'
84+ if : steps.list-changed.outputs.non-maestrod- changed == 'true'
5585 run : |
5686 kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.5.0/standard-install.yaml
5787 kubectl wait --for=condition=Established crd/gatewayclasses.gateway.networking.k8s.io --timeout=120s
5888 kubectl wait --for=condition=Established crd/gateways.gateway.networking.k8s.io --timeout=120s
5989 kubectl wait --for=condition=Established crd/httproutes.gateway.networking.k8s.io --timeout=120s
6090
6191 - name : Install CloudNativePG
62- if : steps.list-changed.outputs.changed == 'true'
92+ if : steps.list-changed.outputs.non-maestrod- changed == 'true'
6393 run : |
6494 helm repo add cnpg https://cloudnative-pg.github.io/charts
6595 helm upgrade --install cnpg \
84114 --timeout=300s
85115
86116 - name : Install Garage
87- if : steps.list-changed.outputs.changed == 'true'
117+ if : steps.list-changed.outputs.non-maestrod- changed == 'true'
88118 run : |
89119 kubectl create namespace whatever --dry-run=client -o yaml | kubectl apply -f -
90120 cat <<'EOF' | kubectl apply -f -
@@ -226,11 +256,29 @@ jobs:
226256 EOF
227257 kubectl wait --namespace whatever --for=condition=complete job/garage-create-buckets --timeout=300s
228258
229- - name : Run chart-testing (install)
230- if : steps.list-changed.outputs.changed == 'true'
259+ - name : Run chart-testing (install) — public-image charts
260+ if : steps.list-changed.outputs.non-maestrod-changed == 'true'
261+ # Public Nutrient charts (document-engine, ai-assistant, …): keep the
262+ # original `pullPolicy=Always` behaviour so the nightly tag is always
263+ # re-pulled from Docker Hub. Maestrod is excluded here and installed
264+ # separately below against its kind-loaded ECR image.
231265 run : |
232266 helm repo add nutrient https://pspdfkit.github.io/helm-charts
233267 ct install --target-branch ${{ github.event.repository.default_branch }} \
268+ --excluded-charts maestrod \
234269 --helm-extra-args "--timeout 300s" \
235270 --helm-extra-set-args "--set=image.tag=nightly" \
236271 --helm-extra-set-args "--set=image.pullPolicy=Always"
272+
273+ - name : Run chart-testing (install) — maestrod (ECR side-loaded)
274+ if : steps.list-changed.outputs.maestrod-changed == 'true'
275+ # Maestrod's image lives in a private ECR; the workflow pulls it on
276+ # the runner and side-loads it into the kind node above. We omit
277+ # `pullPolicy=Always` here so kubelet uses the loaded image
278+ # (the chart's `IfNotPresent` default) instead of trying to re-pull
279+ # from a registry kind has no credentials for.
280+ run : |
281+ ct install --target-branch ${{ github.event.repository.default_branch }} \
282+ --charts charts/maestrod \
283+ --helm-extra-args "--timeout 300s" \
284+ --helm-extra-set-args "--set=image.tag=${MAESTROD_ECR_TAG}"
0 commit comments