From 01d2b16191f1a780a066fbf503cc3ef278bf7b17 Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Tue, 2 Apr 2024 21:57:07 +0200 Subject: [PATCH] add to nuxt config and set at build time short sha --- .gitlab-ci.yml | 1 + components/Footer.vue | 2 -- docker-compose.yml | 1 + nuxt.config.ts | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 438b5e8d..ec84d03b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -423,6 +423,7 @@ sync-zotero: --build-arg "BASE_URL=$BASE_URL" --build-arg "MEILI_HOST=${MEILI_HOST}" --build-arg "MEILI_API_KEY=$MEILI_API_KEY" + --build-arg "SHORT_SHA=${$CI_COMMIT_SHORT_SHA}" -f $DOCKERFILE $CONTEXT - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA" diff --git a/components/Footer.vue b/components/Footer.vue index bdc77eee..755f9554 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -1,10 +1,8 @@ <script setup lang="ts"> const runtimeConfig = useRuntimeConfig(); - </script> <template> <v-footer app text-center d-flex flex-column> - test <div class="px-4 text-center w-100"> <span> {{ runtimeConfig.public.shortSha }} </span> diff --git a/docker-compose.yml b/docker-compose.yml index c9ab11ca..dd449f22 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,7 @@ services: container_name: nuxt environment: HOST: 0.0.0.0 + NUXT_PUBLIC_SHORT_SHA: "short-sha" volumes: - .:/usr/src/app - defense-finder-wiki-node-modules:/usr/src/app/node_modules diff --git a/nuxt.config.ts b/nuxt.config.ts index a38f2c06..bd958c30 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -77,6 +77,7 @@ export default defineNuxtConfig({ runtimeConfig: { public: { + shortSha: 'xxxxx', defenseFinderWebservice: '/', hostUrl: "http://localhost:8082", meilisearchClient: { -- GitLab