Compare commits
18 Commits
a4ced9e4b4
...
v0.7.3
Author | SHA1 | Date | |
---|---|---|---|
3c141a2d40 | |||
0999fdf705 | |||
6c71c5f364 | |||
c551a242c7 | |||
ec36309d8d | |||
93ff24ac73 | |||
614fda9b7d | |||
78b8d6872a | |||
d09d09e526 | |||
806757a913 | |||
d40f35a2d6 | |||
c61bc4fc8d | |||
cbd981cf19 | |||
f4457a1275 | |||
377885f802 | |||
2538247718 | |||
361a85592e | |||
e83b98e116 |
29
.drone.yml
29
.drone.yml
@ -47,23 +47,23 @@ steps:
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
export VALID_TAG=$(cat .version 2> /dev/null) && [ -n "$VALID_TAG" ] || (echo 'No release tag - exiting'; exit 0)
|
||||
- |
|
||||
wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq
|
||||
chmod +x /bin/jq
|
||||
- |
|
||||
/bin/jq '.auths["https://bv11-cr01.bessems.eu/v2/"].auth="'"$(echo -n $DOCKER_USERNAME':'$DOCKER_PASSWORD | base64)"'"' --null-input > /kaniko/.docker/config.json
|
||||
- |
|
||||
export IMAGE_TAG=$(cat .version)
|
||||
/bin/jq '.auths["https://bv11-cr01.bessems.eu/v2/"].auth="'"$(echo -n $HARBOR_USERNAME':'$HARBOR_PASSWORD | base64)"'"' --null-input > /kaniko/.docker/config.json
|
||||
- |
|
||||
/kaniko/executor \
|
||||
--dockerfile=Dockerfile \
|
||||
--context=dir://. \
|
||||
--destination=bv11-cr01.bessems.eu/library/json-server:latest \
|
||||
--destination=bv11-cr01.bessems.eu/library/json-server:$IMAGE_TAG
|
||||
--destination=bv11-cr01.bessems.eu/library/json-server:$VALID_TAG
|
||||
environment:
|
||||
DOCKER_USERNAME:
|
||||
HARBOR_USERNAME:
|
||||
from_secret: harbor_username
|
||||
DOCKER_PASSWORD:
|
||||
HARBOR_PASSWORD:
|
||||
from_secret: harbor_password
|
||||
|
||||
- name: Container image (docker.io)
|
||||
@ -72,11 +72,11 @@ steps:
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
export VALID_TAG=$(cat .version 2> /dev/null) && [ -n "$VALID_TAG" ] || (echo 'No release tag - exiting'; exit 0)
|
||||
- |
|
||||
wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq
|
||||
chmod +x /bin/jq
|
||||
- |
|
||||
export IMAGE_TAG=$(cat .version)
|
||||
- |
|
||||
/bin/jq '.auths["https://index.docker.io/v1/"].auth="'"$(echo -n $DOCKER_USERNAME':'$DOCKER_PASSWORD | base64)"'"' --null-input > /kaniko/.docker/config.json
|
||||
- |
|
||||
@ -84,7 +84,7 @@ steps:
|
||||
--dockerfile=Dockerfile \
|
||||
--context=dir://. \
|
||||
--destination=docker.io/djpbessems/json-server:latest \
|
||||
--destination=docker.io/djpbessems/json-server:$IMAGE_TAG
|
||||
--destination=docker.io/djpbessems/json-server:$VALID_TAG
|
||||
environment:
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
@ -98,8 +98,9 @@ steps:
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
export CHART_VERSION=$(cat .version)
|
||||
sed -i 's/{{ chart_version }}/'$CHART_VERSION'/g' charts/json-server/Chart.yaml
|
||||
export VALID_TAG=$(cat .version 2> /dev/null) && [ -n "$VALID_TAG" ] || (echo 'No release tag - exiting'; exit 0)
|
||||
sed -i 's/{{ chart_version }}/'$VALID_TAG'/g' charts/json-server/Chart.yaml
|
||||
sed -i 's/{{ image_tag }}/'$VALID_TAG'/g' charts/json-server/values.yaml
|
||||
- |
|
||||
helm package ./charts/json-server
|
||||
- |
|
||||
@ -127,6 +128,8 @@ steps:
|
||||
image: bv11-cr01.bessems.eu/proxy/library/node:20-slim
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
export VALID_TAG=$(cat .version 2> /dev/null) && [ -n "$VALID_TAG" ] || (echo 'No release tag - exiting'; exit 0)
|
||||
- |
|
||||
apt-get update
|
||||
- |
|
||||
@ -136,6 +139,7 @@ steps:
|
||||
- |
|
||||
npm install \
|
||||
semantic-release \
|
||||
@semantic-release/changelog \
|
||||
@semantic-release/commit-analyzer \
|
||||
@semantic-release/git \
|
||||
@semantic-release/release-notes-generator
|
||||
@ -145,8 +149,7 @@ steps:
|
||||
npx semantic-release \
|
||||
--branches ${DRONE_BRANCH} \
|
||||
--tag-format "v\$${version}" \
|
||||
--dry-run \
|
||||
--plugins @semantic-release/commit-analyzer,@semantic-release/release-notes-generator,@semantic-release/git
|
||||
--plugins @semantic-release/commit-analyzer,@semantic-release/release-notes-generator,@semantic-release/changelog,@semantic-release/git
|
||||
environment:
|
||||
GIT_APIKEY:
|
||||
from_secret: git_apikey
|
||||
|
27
CHANGELOG.md
Normal file
27
CHANGELOG.md
Normal file
@ -0,0 +1,27 @@
|
||||
## [0.7.3](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/compare/v0.7.2...v0.7.3) (2023-07-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Missing period in chart template ([0999fdf](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/commit/0999fdf7051d6e8a2161333980bd1aedd9f180ef))
|
||||
|
||||
## [0.7.2](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/compare/v0.7.1...v0.7.2) (2023-07-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Adhere to naming convention in templates ([c551a24](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/commit/c551a242c7a49a445da68ba6e1e5966eeb5ce7d7))
|
||||
|
||||
## [0.7.1](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/compare/v0.7.0...v0.7.1) (2023-07-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Adhere to naming convention in values.yaml ([614fda9](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/commit/614fda9b7d284862bd84a1eab62ba8144f798199))
|
||||
|
||||
# [0.7.0](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/compare/v0.6.0...v0.7.0) (2023-07-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add sidecar for continuous polling ([806757a](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/commit/806757a9135341d919b31d4183a84e3870c24f3f))
|
8
charts/json-server/templates/clusterrole.yaml
Normal file
8
charts/json-server/templates/clusterrole.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-clusterrole
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list"]
|
12
charts/json-server/templates/clusterrolebinding.yaml
Normal file
12
charts/json-server/templates/clusterrolebinding.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-clusterrolebinding
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "json-server.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ .Release.Name }}-clusterrole
|
||||
apiGroup: rbac.authorization.k8s.io
|
@ -1,4 +1,4 @@
|
||||
{{- if not .Values.seedData.existingConfigMap }}
|
||||
{{- if not .Values.jsonServer.seedData.existingConfigMap }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
@ -55,5 +55,5 @@ data:
|
||||
</body>
|
||||
</html>
|
||||
db.json: |
|
||||
{{ include "common.tplvalues.render" ( dict "value" .Values.seedData.configInline "context" $) | indent 4 }}
|
||||
{{ include "common.tplvalues.render" ( dict "value" .Values.jsonServer.seedData.configInline "context" $) | indent 4 }}
|
||||
{{- end -}}
|
||||
|
@ -29,8 +29,8 @@ spec:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
image: "{{ .Values.jsonServer.image.repository }}:{{ .Values.jsonServer.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.jsonServer.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
@ -52,6 +52,17 @@ spec:
|
||||
- name: {{ .Release.Name }}-configmap
|
||||
mountPath: /usr/local/lib/node_modules/json-server/public/index.html
|
||||
subPath: index.html
|
||||
- name: {{ .Chart.Name }}-sidecar
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.sidecar.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- sleep infinity
|
||||
volumes:
|
||||
- name: {{ .Release.Name }}-configmap
|
||||
configMap:
|
||||
|
@ -1,18 +1,25 @@
|
||||
# Default values for json-server.
|
||||
|
||||
seedData:
|
||||
# Not implemented yet
|
||||
# existingConfigMap: ""
|
||||
configInline: {}
|
||||
jsonServer:
|
||||
seedData:
|
||||
# Not implemented yet
|
||||
# existingConfigMap: ""
|
||||
configInline: {}
|
||||
|
||||
image:
|
||||
repository: bv11-cr01.bessems.eu/library/json-server
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: {{ image_tag }}
|
||||
|
||||
sidecar:
|
||||
image:
|
||||
repository: alpine/helm
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 3.12.1
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: bv11-cr01.bessems.eu/library/json-server
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: latest
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
6923
package-lock.json
generated
Normal file
6923
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
10
package.json
Normal file
10
package.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/commit-analyzer": "^10.0.1",
|
||||
"@semantic-release/exec": "^6.0.3",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@semantic-release/release-notes-generator": "^11.0.4",
|
||||
"semantic-release": "^21.0.7"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user