Skip to content
Snippets Groups Projects
Commit f477e203 authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

ci: #be build and push docker image

parent dad52b33
No related branches found
No related tags found
No related merge requests found
Pipeline #23003 passed
image: node:16-alpine variables:
DOCKER_TLS_CERTDIR: "" # HACK: see https://gitlab.com/gitlab-org/gitlab-runner/issues/4501
stages: stages:
- build
- setup - setup
be-build-job:
stage: build
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN https://$CI_REGISTRY
script:
- >
docker build
--rm --no-cache
--target production
--tag=$CI_REGISTRY_IMAGE/backend:${CI_COMMIT_SHA}
--tag=$CI_REGISTRY_IMAGE/backend:${CI_COMMIT_REF_NAME}
backend
- docker image push --all-tags $CI_REGISTRY_IMAGE/backend
only:
- main
be-setup-job: be-setup-job:
image: node:16-alpine
stage: setup stage: setup
cache: cache:
- key: - key:
...@@ -19,6 +41,7 @@ be-setup-job: ...@@ -19,6 +41,7 @@ be-setup-job:
- echo Success! - echo Success!
fe-setup-job: fe-setup-job:
image: node:16-alpine
stage: setup stage: setup
cache: cache:
- key: - key:
......
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