Skip to content

Commit

Permalink
- Upgrade dependencies
Browse files Browse the repository at this point in the history
- Related to magda-io/magda#3229, Use magda-common for docker image related logic
  • Loading branch information
t83714 committed Oct 11, 2021
1 parent a9592d4 commit 330fef2
Show file tree
Hide file tree
Showing 11 changed files with 1,080 additions and 1,928 deletions.
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
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 1.0.0

- Upgrade dependencies
- Upgrade CI scripts
- Related to https://github.com/magda-io/magda/issues/3229, Use magda-common for docker image related logic
6 changes: 6 additions & 0 deletions deploy/magda-project-open-data-connector/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-11T17:06:36.102675+11:00"
6 changes: 6 additions & 0 deletions deploy/magda-project-open-data-connector/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ version: "0.0.57-0"
kubeVersion: ">= 1.14.0-0"
home: "https://github.com/magda-io/magda-project-open-data-connector"
sources: ["https://github.com/magda-io/magda-project-open-data-connector"]
annotations:
magdaModuleType: "connector"
dependencies:
- name: magda-common
version: "1.0.0-alpha.4"
repository: "https://charts.magda.io"
13 changes: 3 additions & 10 deletions deploy/magda-project-open-data-connector/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,11 @@ spec:
metadata:
name: connector-{{ .Values.config.id }}
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.connectors.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.connectors.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 10 }}
containers:
- name: connector-{{ .Values.config.id }}
image: "{{ .Values.image.repository | default .Values.global.connectors.image.repository | default .Values.global.image.repository | default .Values.defaultImage.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Values.global.connectors.image.tag | default .Values.global.image.tag | default .Values.defaultImage.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.connectors.image.pullPolicy | default .Values.global.image.pullPolicy | default .Values.defaultImage.pullPolicy }}
image: {{ include "magda.image" . | quote }}
imagePullPolicy: {{ include "magda.imagePullPolicy" . | quote }}
command:
- "node"
- "/usr/src/app/component/dist/index.js"
Expand Down
13 changes: 3 additions & 10 deletions deploy/magda-project-open-data-connector/templates/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,11 @@ spec:
metadata:
name: connector-{{ .Values.config.id }}
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.connectors.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.connectors.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: connector-{{ .Values.config.id }}
image: "{{ .Values.image.repository | default .Values.global.connectors.image.repository | default .Values.global.image.repository | default .Values.defaultImage.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Values.global.connectors.image.tag | default .Values.global.image.tag | default .Values.defaultImage.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.connectors.image.pullPolicy | default .Values.global.image.pullPolicy | default .Values.defaultImage.pullPolicy }}
image: {{ include "magda.image" . | quote }}
imagePullPolicy: {{ include "magda.imagePullPolicy" . | quote }}
command:
- "node"
- "/usr/src/app/component/dist/index.js"
Expand Down
2 changes: 0 additions & 2 deletions deploy/magda-project-open-data-connector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ global:
# image setting loadding order: (from higher priority to lower priority)
# - Values.image.x
# - Values.global.connectors.image.x
# - Values.global.image.x
# - Values.defaultImage.x
# You can set `imagePullSecret` value to `false` (bool) to reset the value (see example below)

Expand All @@ -19,7 +18,6 @@ image:

defaultImage:
repository: docker.io/data61
tag: 0.0.57-0
pullPolicy: IfNotPresent
imagePullSecret: false

Expand Down
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@
"docker-build-prod": "create-docker-context-for-node-component --build --push --tag auto",
"retag-and-push": "retag-and-push",
"helm-lint": "helm lint deploy/magda-project-open-data-connector -f deploy/test-deploy.yaml",
"test": "mocha --require ts-node/register --require tsconfig-paths/register \"src/test/**/*.spec.ts\""
"test": "mocha --require ts-node/register --require tsconfig-paths/register \"src/test/**/*.spec.ts\"",
"helm-docs": "helm-docs -t ./README.md.gotmpl -o ../../README.md",
"update-all-charts": "helm dep up ./deploy/magda-project-open-data-connector",
"add-all-chart-version-changes": "git ls-files -m | grep Chart.yaml | xargs git add && git ls-files -m | grep Chart.lock | xargs git add",
"add-all-helm-docs-changes": "yarn helm-docs && git ls-files -m | grep -i readme.md | xargs git add",
"version": "yarn update-helm-chart-version && yarn update-all-charts && yarn add-all-chart-version-changes && yarn add-all-helm-docs-changes"
},
"devDependencies": {
"@magda/scripts": "^0.0.57-0",
"@magda/ci-utils": "^1.0.2",
"@magda/docker-utils": "^0.0.60",
"@types/jsonpath": "^0.1.29",
"@types/lodash": "^4.14.66",
"@types/read-pkg-up": "^3.0.1",
"@types/request": "^2.48.1",
"@types/turndown": "^5.0.0",
"@types/urijs": "^1.15.34",
"@types/yargs": "^12.0.8",
"@types/chai": "^4.2.8",
"@types/mocha": "^7.0.1",
Expand All @@ -41,12 +46,12 @@
"typescript": "^3.7.2",
"webpack": "^4.28.3",
"webpack-cli": "^3.3.10",
"@magda/connector-test-utils": "^0.0.57-0"
"@magda/connector-test-utils": "^0.0.60"
},
"dependencies": {
"@magda/connector-sdk": "^0.0.57-0",
"@magda/registry-aspects": "^0.0.57-0",
"@magda/utils": "^0.0.57-0",
"@magda/connector-sdk": "^0.0.60",
"@magda/registry-aspects": "^0.0.60",
"@magda/utils": "^0.0.60",
"@types/to-markdown": "^3.0.0",
"jsonpath": "^1.0.0",
"lodash": "^4.17.4",
Expand Down
2 changes: 1 addition & 1 deletion src/test/get-license.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe("when distributions have a license as a custom URL", function(this: Moc

registry = new Registry({
jwtSecret: "secret",
userId: "",
userId: "00000000-0000-4000-8000-000000000000",
baseUrl: "http://registry.example.com",
tenantId: MAGDA_ADMIN_PORTAL_ID
});
Expand Down
Loading

0 comments on commit 330fef2

Please sign in to comment.