Skip to content
Snippets Groups Projects
Commit 52bd2fe8 authored by Olivér FACKLAM's avatar Olivér FACKLAM
Browse files

Remove Docker build from gitlab CI

parent 62764df7
No related branches found
No related tags found
No related merge requests found
...@@ -8,13 +8,6 @@ services: ...@@ -8,13 +8,6 @@ services:
- postgres - postgres
variables: variables:
DOCKER_DRIVER: overlay2
CI_APPLICATION_REPOSITORY: ${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}
CI_APPLICATION_TAG: ${CI_COMMIT_SHA}
CI_CONTAINER_NAME: ci_job_build_${CI_JOB_ID}
# Nécessaire pour accéder docker depuis le container du runner
# cf. https://gitlab.com/gitlab-org/gitlab-runner/blob/master/docs/executors/kubernetes.md
DOCKER_HOST: "tcp://localhost:2375"
# This folder is cached between builds # This folder is cached between builds
cache: cache:
...@@ -25,7 +18,6 @@ cache: ...@@ -25,7 +18,6 @@ cache:
stages: stages:
- build - build
- tests - tests
- docker
### Jobs ### ### Jobs ###
...@@ -46,23 +38,4 @@ tests: ...@@ -46,23 +38,4 @@ tests:
script: script:
- echo '{"dn":"dn", "passwd":"passwd"}' >> ldap_credentials.json - echo '{"dn":"dn", "passwd":"passwd"}' >> ldap_credentials.json
- npm i - npm i
- npm run test - npm run test
\ No newline at end of file
docker:build:
dependencies:
- build:transpile
stage: docker
image: docker:latest
services:
- docker:dind
script:
- echo $LDAP_CONN_CONFIG > ldap_credentials.json
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- echo "Building Dockerfile..."
- docker build --pull -t ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG} -t ${CI_APPLICATION_REPOSITORY}:latest --build-arg DB_PASSWD=${DB_PASSWD} .
- echo "Pushing to GitLab Container registry $CI_APPLICATION_REPOSITORY with tags '${CI_APPLICATION_TAG}' and 'latest'"
- docker push ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG}
- docker push ${CI_APPLICATION_REPOSITORY}:latest
only:
- master
- stable
\ No newline at end of file
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