Skip to content

Commit

Permalink
Related to magda-io/magda#3229, Use magda-common for docker image rel…
Browse files Browse the repository at this point in the history
…ated logic
  • Loading branch information
t83714 committed Oct 12, 2021
1 parent 3fc760d commit 1085554
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- run: yarn test

- name: helm-build-dependencies
run: helm dep up deploy/${REPO_NAME}
run: yarn update-all-charts

- run: yarn helm-lint

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 10
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 10
node-version: 12
- run: yarn install
- run: yarn build
- run: yarn test

- name: helm-build-dependencies
run: helm dep up deploy/${REPO_NAME}
run: yarn update-all-charts

- name: helm-check
run: yarn helm-lint
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ magda-tenant-api/lib/

#typescript
tsconfig.tsbuildinfo

deploy/*/charts
1 change: 1 addition & 0 deletions .helmdocsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deploy/*/charts
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
> The repo was part of [magda main repo](https://github.com/magda-io/magda). For history before v1.0.0, please check [CHANGES.md of main repo](https://github.com/magda-io/magda/blob/master/CHANGES.md).
# 1.1.0

- Related to https://github.com/magda-io/magda/issues/3229, Use magda-common for docker image related logic

# 1.0.1

- #14 Fixed: TypeError: Cannot read property 'trim' of null when processing invalid metadata
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12
FROM node:12-alpine

RUN mkdir -p /usr/src/app
COPY . /usr/src/app
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ helm repo add magda-io https://charts.magda.io

Kubernetes: `>= 1.14.0-0`

| Repository | Name | Version |
| ----------------------- | ------------ | ------------- |
| https://charts.magda.io | magda-common | 1.0.0-alpha.4 |

## Values

| Key | Type | Default | Description |
Expand Down
6 changes: 6 additions & 0 deletions deploy/magda-minion-format/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: magda-common
repository: https://charts.magda.io
version: 1.0.0-alpha.4
digest: sha256:a5dcf2df16ca5a3972f92d91434c2e78be0ce411994d2a3cb89c674a711ddc24
generated: "2021-10-12T20:34:14.484747+11:00"
6 changes: 6 additions & 0 deletions deploy/magda-minion-format/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ version: "1.0.1"
kubeVersion: ">= 1.14.0-0"
home: "https://github.com/magda-io/magda-minion-format"
sources: [ "https://github.com/magda-io/magda-minion-format" ]
annotations:
magdaModuleType: "minion"
dependencies:
- name: magda-common
version: "1.0.0-alpha.4"
repository: "https://charts.magda.io"
13 changes: 3 additions & 10 deletions deploy/magda-minion-format/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,11 @@ spec:
labels:
service: minion-format
spec:
{{- /*
See chart value file for details of the logic used to generate this setting value below.!!!
*/}}
{{- $imagePullSecret := (ne (.Values.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.image.imagePullSecret ( (ne (.Values.global.minions.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.minions.image.imagePullSecret ( (ne (.Values.global.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.image.imagePullSecret .Values.defaultImage.imagePullSecret ) ) -}}
{{- if ne ($imagePullSecret | toString) "false" }}
imagePullSecrets:
- name: {{ $imagePullSecret }}
{{- end }}
{{- include "magda.imagePullSecrets" . | indent 6 }}
containers:
- name: minion-format
image: "{{ .Values.image.repository | default .Values.global.minions.image.repository | default .Values.global.image.repository | default .Values.defaultImage.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Values.global.minions.image.tag | default .Values.global.image.tag | default .Chart.Version }}"
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.minions.image.pullPolicy | default .Values.global.image.pullPolicy | default .Values.defaultImage.pullPolicy }}
image: {{ include "magda.image" . | quote }}
imagePullPolicy: {{ include "magda.imagePullPolicy" . | quote }}
{{- if .Values.global.enableLivenessProbes }}
livenessProbe:
httpGet:
Expand Down
2 changes: 0 additions & 2 deletions deploy/magda-minion-format/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ global:
# image setting loadding order: (from higher priority to lower priority)
# - Values.image.x
# - Values.global.minions.image.x
# - Values.global.image.x
# - Values.defaultImage.x
# You can set `imagePullSecret` value to `false` (bool) to reset the value (see example below)

image:
name: "magda-minion-format"
# repository:
# tag:
# pullPolicy:
# imagePullSecret:

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@magda/ci-utils": "^1.0.2",
"@magda/docker-utils": "^0.0.60-alpha.15",
"@magda/docker-utils": "^0.0.60",
"@types/chai": "^4.2.8",
"@types/express": "4.17.9",
"@types/lodash": "^4.14.88",
Expand All @@ -44,9 +44,9 @@
"typescript": "^3.9.5"
},
"dependencies": {
"@magda/minion-sdk": "^0.0.60-alpha.15",
"@magda/registry-aspects": "^0.0.60-alpha.15",
"@magda/utils": "^0.0.60-alpha.15",
"@magda/minion-sdk": "^0.0.60",
"@magda/registry-aspects": "^0.0.60",
"@magda/utils": "^0.0.60",
"@types/escape-string-regexp": "^0.0.32",
"@types/lodash": "^4.14.88",
"escape-string-regexp": "^1.0.5",
Expand All @@ -62,7 +62,7 @@
"name": "data61/magda-minion-format",
"include": "node_modules dist Dockerfile synonyms.json package.json"
},
"jwtSecret": "squirrel",
"jwtSecret": "ZJp1yZQPwGU0WZfIydX5q1FMEZNQS2pQLy8xcF1k5ai0P4LWinzCLtGCl1hEPrlhCGeOspZV/JTncM1dPSdsX8UhDvyvsMi6ZmB4+z6dHTdQlnsNHPlMzqLxyzT5IFRVZGjysPkktLAadqq81T/MyQ7iNIbYupVbUza2Q9GN6s8=",
"userId": "00000000-0000-4000-8000-000000000000"
},
"magda": {
Expand Down

0 comments on commit 1085554

Please sign in to comment.