Skip to content

Commit aad6d71

Browse files
fix: apl deployment via GH actions (#1643)
Co-authored-by: ElderMatt <[email protected]>
1 parent fb16dcb commit aad6d71

File tree

5 files changed

+20
-18
lines changed

5 files changed

+20
-18
lines changed

.github/workflows/integration.yml

+14-12
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ env:
133133
DIGITALOCEAN_NODE_POOL_MIN_SIZE: 3
134134
CHECK_CONTEXT: continuous-integration/integration-test
135135
COMMIT_ID: '${{ github.event.pull_request.head.sha || github.sha }}'
136+
BOT_EMAIL: ${{ vars.BOT_EMAIL }}
137+
BOT_USERNAME: ${{ vars.BOT_USERNAME }}
136138

137139
jobs:
138140
preprocess-input:
@@ -283,16 +285,16 @@ jobs:
283285
run: |
284286
kubectl create secret docker-registry reg-otomi-github \
285287
--docker-server=${{ env.CACHE_REGISTRY }} \
286-
--docker-username=${{ env.GIT_USER }} \
287-
--docker-password='${{ secrets.NPM_TOKEN }}'
288+
--docker-username=${{ env.BOT_USERNAME }} \
289+
--docker-password='${{ secrets.BOT_PULL_TOKEN }}'
288290
- name: Checkout
289291
uses: actions/checkout@v4
290292
- name: Prepare Otomi chart
291293
if: ${{ inputs.install_profile != 'no-otomi' }}
292294
run: |
293295
ref=${{ github.event.pull_request.head.ref || github.ref }}
294296
tag=${ref##*/}
295-
sed --in-place "s/APP_VERSION_PLACEHOLDER/$tag/g" chart/otomi/Chart.yaml
297+
sed --in-place "s/APP_VERSION_PLACEHOLDER/$tag/g" chart/apl/Chart.yaml
296298
sed --in-place "s/CONTEXT_PLACEHOLDER/${{ env.SCALEWAY_CLUSTER_CONTEXT }}/g" tests/integration/${{ inputs.install_profile }}.yaml
297299
sed --in-place "s/OTOMI_VERSION_PLACEHOLDER/${GITHUB_REF##*/}/g" tests/integration/${{ inputs.install_profile }}.yaml
298300
touch values-container-registry.yaml
@@ -325,7 +327,7 @@ jobs:
325327
[[ '${{ inputs.certificate }}' == 'letsencrypt_staging' ]] && echo "$LETSENCRYPT_STAGING" >> values.yaml
326328
[[ '${{ inputs.certificate }}' == 'letsencrypt_production' ]] && echo "$LETSENCRYPT_PRODUCTION" >> values.yaml
327329
328-
install_args="--wait --wait-for-jobs --timeout 90m0s otomi chart/otomi \
330+
install_args="--wait --wait-for-jobs --timeout 90m0s otomi chart/apl \
329331
--values tests/integration/${{ inputs.install_profile }}.yaml \
330332
--values values-container-registry.yaml
331333
--values values.yaml \
@@ -411,16 +413,16 @@ jobs:
411413
run: |
412414
kubectl create secret docker-registry reg-otomi-github \
413415
--docker-server=${{ env.CACHE_REGISTRY }} \
414-
--docker-username=${{ env.GIT_USER }} \
415-
--docker-password='${{ secrets.NPM_TOKEN }}'
416+
--docker-username=${{ env.BOT_USERNAME }} \
417+
--docker-password='${{ secrets.BOT_PULL_TOKEN }}'
416418
- name: Checkout
417419
uses: actions/checkout@v4
418420
- name: Prepare Otomi chart
419421
if: ${{ inputs.install_profile != 'no-otomi' }}
420422
run: |
421423
ref=${{ github.event.pull_request.head.ref || github.ref }}
422424
tag=${ref##*/}
423-
sed --in-place "s/APP_VERSION_PLACEHOLDER/$tag/g" chart/otomi/Chart.yaml
425+
sed --in-place "s/APP_VERSION_PLACEHOLDER/$tag/g" chart/apl/Chart.yaml
424426
sed --in-place "s/CONTEXT_PLACEHOLDER/${{ env.DIGITALOCEAN_CLUSTER_CONTEXT }}/g" tests/integration/${{ inputs.install_profile }}.yaml
425427
sed --in-place "s/OTOMI_VERSION_PLACEHOLDER/${GITHUB_REF##*/}/g" tests/integration/${{ inputs.install_profile }}.yaml
426428
touch values-container-registry.yaml
@@ -453,7 +455,7 @@ jobs:
453455
[[ '${{ inputs.certificate }}' == 'letsencrypt_staging' ]] && echo "$LETSENCRYPT_STAGING" >> values.yaml
454456
[[ '${{ inputs.certificate }}' == 'letsencrypt_production' ]] && echo "$LETSENCRYPT_PRODUCTION" >> values.yaml
455457
456-
install_args="--wait --wait-for-jobs --timeout 90m0s otomi chart/otomi \
458+
install_args="--wait --wait-for-jobs --timeout 90m0s otomi chart/apl \
457459
--values tests/integration/${{ inputs.install_profile }}.yaml \
458460
--values values-container-registry.yaml
459461
--values values.yaml \
@@ -572,16 +574,16 @@ jobs:
572574
run: |
573575
kubectl create secret docker-registry reg-otomi-github \
574576
--docker-server=${{ env.CACHE_REGISTRY }} \
575-
--docker-username=${{ env.GIT_USER }} \
576-
--docker-password='${{ secrets.NPM_TOKEN }}'
577+
--docker-username=${{ env.BOT_USERNAME }} \
578+
--docker-password='${{ secrets.BOT_PULL_TOKEN }}'
577579
- name: Checkout
578580
uses: actions/checkout@v4
579581
- name: Prepare Otomi chart
580582
if: ${{ inputs.install_profile != 'no-otomi' }}
581583
run: |
582584
ref=${{ github.event.pull_request.head.ref || github.ref }}
583585
tag=${ref##*/}
584-
sed --in-place "s/APP_VERSION_PLACEHOLDER/$tag/g" chart/otomi/Chart.yaml
586+
sed --in-place "s/APP_VERSION_PLACEHOLDER/$tag/g" chart/apl/Chart.yaml
585587
sed --in-place "s/CONTEXT_PLACEHOLDER/${{ env.LINODE_CLUSTER_CONTEXT }}/g" tests/integration/${{ inputs.install_profile }}.yaml
586588
sed --in-place "s/OTOMI_VERSION_PLACEHOLDER/${GITHUB_REF##*/}/g" tests/integration/${{ inputs.install_profile }}.yaml
587589
touch values-container-registry.yaml
@@ -614,7 +616,7 @@ jobs:
614616
[[ '${{ inputs.certificate }}' == 'letsencrypt_staging' ]] && echo "$LETSENCRYPT_STAGING" >> values.yaml
615617
[[ '${{ inputs.certificate }}' == 'letsencrypt_production' ]] && echo "$LETSENCRYPT_PRODUCTION" >> values.yaml
616618
617-
install_args="--wait --wait-for-jobs --timeout 90m0s otomi chart/otomi \
619+
install_args="--wait --wait-for-jobs --timeout 90m0s otomi chart/apl \
618620
--values tests/integration/${{ inputs.install_profile }}.yaml \
619621
--values values-container-registry.yaml
620622
--values values.yaml \

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ node_modules/
1010
.vscode/values-schema.yaml
1111
*.env
1212
/.secrets
13-
chart/otomi/values.schema.json
14-
chart/otomi/README.md
13+
chart/apl/values.schema.json
14+
chart/apl/README.md
1515
workflow/
1616
*.new
1717
.envrc

chart/apl/localtest.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set -eu
22

33
# Run:
4-
# export ENV_DIR=/tmp/env-dir && rm -rf /tmp/env-dir && mkdir /tmp/env-dir && chart/otomi/localtest.sh
4+
# export ENV_DIR=/tmp/env-dir && rm -rf /tmp/env-dir && mkdir /tmp/env-dir && chart/apl/localtest.sh
55

66
# echo "127.0.0.1 gitea-http.gitea.svc.cluster.local" >> /etc/hosts
77

docs/setup.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ The bulk of the work in this repo consists of go templates. These are highlighte
1616

1717
A prefilled values repo with valid values can be generated quickly like this:
1818

19-
1. Create a yaml file with the [minimal chart values](https://github.com/linode/apl-core/blob/main/chart/otomi/values.yaml) (Only the 3 in `otomi.*` are sufficient)
19+
1. Create a yaml file with the [minimal chart values](https://github.com/linode/apl-core/blob/main/chart/apl/values.yaml) (Only the 3 in `otomi.*` are sufficient)
2020
2. Point to a location for the repo: `export ENV_DIR=...`
21-
3. Generate the repo: `VALUES_INPUT={location of chart values} chart/otomi/localtest.sh`
21+
3. Generate the repo: `VALUES_INPUT={location of chart values} chart/apl/localtest.sh`
2222

2323
### The CLI
2424

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"eslint:fix": "eslint --fix --ext ts .",
131131
"format": "prettier --check \"**/*.{json,md,yml,yaml}\"",
132132
"format:fix": "prettier --write \"**/*.{json,md,yml,yaml}\"",
133-
"gen:chart-schema": "js-yaml values-schema.yaml > chart/otomi/values.schema.json",
133+
"gen:chart-schema": "js-yaml values-schema.yaml > chart/apl/values.schema.json",
134134
"lint": "run-p spellcheck lint:hf lint:ts lint:types",
135135
"lint-staged": "lint-staged",
136136
"lint:fix": "prettier --write tests/**/*.yaml --write '.values/env/**/*.yaml' && npm run lint:ts:fix",

0 commit comments

Comments
 (0)