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

specify commit sha in kubernetes spec

parent 2eb85154
Pipeline #31833 passed with stages
in 3 minutes and 12 seconds
#!/bin/sh
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
docker build -t "$CI_REGISTRY_IMAGE/frontend:${CI_COMMIT_REF_NAME}" --build-arg VUE_APP_GIT_COMMIT=${CI_COMMIT_SHORT_SHA} frontend/
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}"
......@@ -21,6 +21,8 @@ spec:
env:
- name: NODE_ENV
value: "production"
- name: VUE_APP_GIT_COMMIT
value: ${CI_COMMIT_SHORT_SHA}
ports:
- containerPort: 80
resources:
......
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