Skip to content
Snippets Groups Projects
Commit 7cc1482b authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

deploy wiki

parent 93eaf0d8
No related branches found
No related tags found
1 merge request!7K8s deploy
Pipeline #111318 failed
This commit is part of merge request !7. Comments created here will be created in the context of that merge request.
# The Docker image that will be used to build your app
image: node:19.5-bullseye-slim
# Functions that should be executed before the build script is run # Functions that should be executed before the build script is run
variables:
HELM_VERSION: "3.9.3"
IMAGE_NAME: "df-wiki"
cache: cache:
paths: paths:
- node_modules/ - node_modules/
...@@ -10,7 +12,6 @@ stages: ...@@ -10,7 +12,6 @@ stages:
- build - build
- deploy - deploy
.build: .build:
stage: build stage: build
image: docker:24 image: docker:24
...@@ -24,7 +25,6 @@ stages: ...@@ -24,7 +25,6 @@ stages:
- docker build --pull -t "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA" --build-arg="BUILD_OPTIONS=$OPTIONS" -f $DOCKERFILE $CONTEXT - docker build --pull -t "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA" --build-arg="BUILD_OPTIONS=$OPTIONS" -f $DOCKERFILE $CONTEXT
- docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA" - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA"
# build: # build:
# stage: build # stage: build
# before_script: # before_script:
...@@ -38,23 +38,49 @@ stages: ...@@ -38,23 +38,49 @@ stages:
# when: on_success # when: on_success
# expire_in: "30 days" # expire_in: "30 days"
build:dev:
build:dev:nuxt:
extends: .build extends: .build
variables:
IMAGE_NAME: "df-wiki"
rules: rules:
- if: $CI_COMMIT_BRANCH != "main" - if: $CI_COMMIT_BRANCH != "main"
# pages: .deploy:
# stage: deploy stage: deploy
# only: image: harbor.pasteur.fr/kube-system/helm-kubectl:$HELM_VERSION
# - main variables:
# script: CI_DEBUG_TRACE: "true"
# - NUXT_APP_BASE_URL=/wiki npm run generate TEAM_ID: "df"
# - rm -rf public script:
# - mv .output/public public - >
# artifacts: helm upgrade --install $CI_PROJECT_NAME-$CI_ENVIRONMENT_NAME ./deploy/ --namespace=${KUBE_NAMESPACE}
# paths: --set registry.image=${CI_REGISTRY_IMAGE}
# # The folder that contains the files to be exposed at the Page URL --set registry.username=${DEPLOY_USER}
# - public --set registry.password=${DEPLOY_TOKEN}
--set registry.host=${CI_REGISTRY}
--set imagePullSecrets[0].name="registry-pull-secret-${CI_COMMIT_REF_SLUG}"
--set ingress.enabled="true"
--set ingress.hosts[0].host="${PUBLIC_URL}"
--set ingress.hosts[0].paths[0].path="/"
--set ingress.annotations."kubernetes\.io/ingress\.class"="$INGRESS_CLASS"
--set image.repository="$CI_REGISTRY_IMAGE/$IMAGE_NAME"
--set image.tag="$CI_COMMIT_SHORT_SHA"
--set image.pullPolicy='Always'
--set env="$ENV"
deploy:dev:
extends: .deploy
rules:
- if: $CI_COMMIT_BRANCH != "main"
needs:
- "build:dev"
variables:
NODE_ENV: "development"
KUBE_NAMESPACE: "defense-finder-dev"
PUBLIC_URL: "defense-finder.dev.pasteur.cloud"
INGRESS_CLASS: "internal"
AUTOSCALE: "true"
AUTSCALING_MIN_REPLICAS: "1"
AUTSCALING_MAX_REPLICAS: "4"
ENV: "development"
environment:
name: k8sdev-01
url: "https://defense-finder.dev.pasteur.cloud"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment