Commit 8424100a authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

Closes #42 add link to commit and update sh to build

parent 1c2795c9
Pipeline #31861 passed with stages
in 3 minutes and 3 seconds
#!/bin/sh
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
# Test create .env for build stage
# First create .env for build stage
echo VUE_APP_GIT_COMMIT=${CI_COMMIT_SHORT_SHA} > frontend/.env
echo VUE_APP_TITLE=${VUE_APP_TITLE} >> frontend/.env
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
docker build -t "$CI_REGISTRY_IMAGE/frontend:${CI_COMMIT_REF_NAME}" frontend/
docker tag "$CI_REGISTRY_IMAGE/frontend:${CI_COMMIT_REF_NAME}" "$CI_REGISTRY_IMAGE/frontend:latest"
docker push "$CI_REGISTRY_IMAGE/frontend:${CI_COMMIT_REF_NAME}"
......@@ -45,7 +45,7 @@ services:
- postgresql
environment:
NODE_ENV: development
VUE_APP_GIT_COMMIT: "local-dev-env"
VUE_APP_GIT_COMMIT: "dev"
VUE_APP_TITLE: "[LOC] MetageneDB"
nginx:
......
......@@ -11,7 +11,7 @@
<v-spacer></v-spacer>
<div>Metagenomics Signature group, Institut Pasteur. <span class="font-italic font-weight-light">This work is founded by <a target="_blank" href="https://www.bpifrance.fr/">bpifrance</a></span></div>
<v-spacer></v-spacer>
<span class="font-italic font-weight-light">{{commitHash}}</span>
<span class="font-weight-light"><a :href="commitURL" target="_blank">{{commitHash}}</a></span>
</v-footer>
</v-app>
</template>
......@@ -31,6 +31,9 @@ export default {
commitHash() {
return process.env.VUE_APP_GIT_COMMIT;
},
commitURL() {
return `https://gitlab.pasteur.fr/metagenomics/metagenedb/-/tree/${this.commitHash}`;
},
baseTitle() {
return process.env.VUE_APP_TITLE;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment