Files
warehouse13/.gitlab-ci.yml
Armando Diaz 7c50f0a59a fix ci var
2025-10-16 20:49:49 -05:00

59 lines
2.0 KiB
YAML

stages:
- test
- build
- deploy
# Test stage
test:
stage: test
allow_failure: true
image: containers.global.bsf.tools/node:20.11-alpine3.19
script:
- cd frontend
- npm config set registry https://deps.global.bsf.tools/artifactory/api/npm/registry.npmjs.org/
- npm config set strict-ssl false
- npm config fix
- npm install
build_container:
stage: build
image: deps.global.bsf.tools/quay.io/buildah/stable:latest
variables:
IMAGE_NAME: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
before_script:
- mkdir -p /tmp/buildah-storage
- export BUILDAH_ROOT="/tmp/buildah-storage"
- echo "$CI_REGISTRY_PASSWORD" | buildah login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
script:
- buildah bud --build-arg NPM_REGISTRY=https://deps.global.bsf.tools/artifactory/api/npm/registry.npmjs.org/ --storage-driver vfs --isolation chroot -t $IMAGE_NAME .
- buildah push --storage-driver vfs $IMAGE_NAME
deploy_helm_charts:
stage: deploy
image:
name: deps.global.bsf.tools/registry-1.docker.io/alpine/k8s:1.29.12
parallel:
matrix:
# - ENV: "prod"
# VALUES_FILE: "helm/values-prod.yaml"
# CONTEXT: "esv/bsf/bsf-services/gitlab-kaas-agent-config:services-prod-agent"
# NAMESPACE: "bsf-services-namespace"
# ONLY: "main"
- ENV: "dev"
VALUES_FILE: "helm/values.yaml"
CONTEXT: "esv/bsf/bsf-services/gitlab-kaas-agent-config:services-prod-agent"
NAMESPACE: "bsf-services-dev-namespace"
# ONLY: ["branches", "!main"]
script:
- kubectl config use-context $CONTEXT
- |
helm upgrade --install warehouse13-$CI_COMMIT_REF \
./helm/warehouse13 --namespace $NAMESPACE \
-f $VALUES_FILE \
--set api.image=$CI_REGISTRY_IMAGE \
--set api.image.tag=$CI_COMMIT_REF_NAME \
--set postgres.image.repository=containers.global.bsf.tools/postgres \
--set postgres.image.tag=15-alpine \
--set minio.image.repository=containers.global.bsf.tools/minio \
--set minio.image.tag=latest