diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f252eaa021b73343c453dde4fcca7f562c4313da..6b233e5d39cac21714896e36cbf146603443a809 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -166,8 +166,8 @@ build-helm: - echo "$CI_GPG_KEYRING" | base64 -d > ./secring.gpg - echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY_URL script: - - apk add sed helm curl - - helm package ./helm/dbrepo --destination ./build + - apk add --no-cache helm + - make build-helm deploy-staging: image: docker.io/alpine:${ALPINE_VERSION} @@ -180,10 +180,7 @@ deploy-staging: before_script: - apk add --no-cache helm kubectl - echo ${CI_K8S_CONFIG} | base64 -d > ./kubecfg - - helm dependency update ./helm/seaweedfs - - helm package ./helm/seaweedfs --destination ./build - - helm dependency update ./helm/dbrepo - - helm package ./helm/dbrepo --destination ./build + - make build-helm - helm -n ${CI_ENV_STAGING_NAMESPACE} uninstall ${CI_ENV_STAGING_RELEASE_NAME} --ignore-not-found - kubectl -n ${CI_ENV_STAGING_NAMESPACE} delete pvc --all script: @@ -388,14 +385,15 @@ release-helm: dependencies: - build-helm before_script: + - "apk add sed helm" - "docker logout ${CI_REGISTRY_URL}" - "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}" - "docker logout ${CI_REGISTRY2_URL}" - "echo ${CI_REGISTRY2_PASSWORD} | docker login --username ${CI_REGISTRY2_USER} --password-stdin ${CI_REGISTRY2_URL}" - - "apk add sed helm curl" - "mkdir -p ~/.gnupg" - echo "$CI_GPG_KEYRING" | base64 -d > ~/.gnupg/secring.gpg - echo "$CI_GPG_KEYRING2" | base64 -d > ~/.gnupg/pubring.gpg + - make build-helm - "helm package ./helm/dbrepo --sign --key 'Martin Weise' --keyring ~/.gnupg/secring.gpg --destination ./build" - "helm plugin install https://github.com/sigstore/helm-sigstore" script: diff --git a/make/build.mk b/make/build.mk index ca8c9057c5a89a60d759e45552309ad8bd319c38..64a85fc21f0c00236b93989471d4335b0d310cd1 100644 --- a/make/build.mk +++ b/make/build.mk @@ -31,9 +31,7 @@ build-lib: ## Build the Python Library. .PHONY: build-helm build-helm: ## Build the DBRepo and DBRepo MariaDB Galera Helm Charts. - ./.scripts/check-helm.sh helm dependency update ./helm/seaweedfs helm package ./helm/seaweedfs --destination ./build helm dependency update ./helm/dbrepo helm package ./helm/dbrepo --destination ./build - helm schema -input ./helm/dbrepo/values.yaml -output ./helm/dbrepo/values.schema.json diff --git a/make/gen.mk b/make/gen.mk index 5875f1a73700c3760aeb79a03a4773a2d22fe24b..ed10c7e123e292816bd550aba66faf214dcfb81b 100644 --- a/make/gen.mk +++ b/make/gen.mk @@ -9,6 +9,8 @@ gen-swagger-doc: build-images ## Generate Swagger documentation and fetch. .PHONY: gen-helm-doc gen-helm-doc: build-helm ## Generate Helm documentation and schema + ./.scripts/check-helm.sh + helm schema -input ./helm/dbrepo/values.yaml -output ./helm/dbrepo/values.schema.json readme-generator --readme ./helm/dbrepo/README.md --values ./helm/dbrepo/values.yaml .PHONY: gen-dbrepo-doc