Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
5dd7acaf
Commit
5dd7acaf
authored
Feb 07, 2020
by
Sébastiaan Versteeg
Browse files
Merge branch 'docker-compose-image' into 'master'
Don't build Docker image using docker-compose See merge request
!1487
parents
561c18ff
62a134b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
5dd7acaf
variables
:
POSTGRES_DB
:
thalia
POSTGRES_USER
:
postgres
POSTGRES_PASSWORD
:
"
"
# https://hub.docker.com/r/thalia/python-thalia/
# https://github.com/thaliawww/python-thalia
# Should get auto-updated with the official 'python' repository
...
...
@@ -37,6 +34,10 @@ django-tests:
stage
:
test
services
:
-
postgres:latest
variables
:
POSTGRES_DB
:
thalia
POSTGRES_USER
:
postgres
POSTGRES_PASSWORD
:
"
"
before_script
:
-
git log -1
-
poetry install --no-interaction
...
...
@@ -73,39 +74,38 @@ docs tests:
-
docs/_build
build docker image
:
stage
:
test
stage
:
"
test"
image
:
"
docker:git"
services
:
-
docker:dind
image
:
thalia/docker-compose
-
"
docker:dind"
tags
:
-
docker
-
"
docker
"
except
:
-
tags
-
"
tags
"
before_script
:
-
echo $DOCKER_REGISTRY_PASSWORD | docker login --username thaliawww --password-stdin registry.hub.docker.com
-
"
echo
$DOCKER_REGISTRY_PASSWORD
|
docker
login
--username
thaliawww
--password-stdin
registry.hub.docker.com
"
script
:
-
docker-compose config -q
-
docker-compose build --build-arg install_dev_requirements=$DEV_REQUIREMENTS --build-arg source_commit=$(git rev-parse HEAD) web
-
docker tag $DOCKER_LATEST $DOCKER_TAG
-
docker push $DOCKER_TAG
-
"
docker
build
--quiet
--build-arg
install_dev_requirements=${DEV_REQUIREMENTS}
--build-arg
source_commit=$(git
rev-parse
HEAD)
--tag
${DOCKER_LATEST}
."
-
"
docker
tag
${DOCKER_LATEST}
${DOCKER_TAG}"
-
"
docker
push
${DOCKER_TAG}"
variables
:
DEV_REQUIREMENTS
:
1
DOCKER_LATEST
:
registry.hub.docker.com/thalia/concrexit:latest
DOCKER_TAG
:
registry.hub.docker.com/thalia/concrexit:$CI_COMMIT_SHA
DOCKER_LATEST
:
"
registry.hub.docker.com/thalia/concrexit:latest
"
DOCKER_TAG
:
"
registry.hub.docker.com/thalia/concrexit:$
{
CI_COMMIT_SHA
}"
build production docker image
:
extends
:
build docker image
extends
:
"
build
docker
image
"
only
:
-
tags
-
"
tags
"
except
:
-
master
-
"
master
"
after_script
:
-
docker tag $DOCKER_TAG $DOCKER_TAG_PRODUCTION
-
docker tag $DOCKER_TAG $DOCKER_LATEST
-
docker push $DOCKER_TAG_PRODUCTION
-
docker push $DOCKER_LATEST
-
"
docker
tag
$
{
DOCKER_TAG
}
$
{
DOCKER_TAG_PRODUCTION
}"
-
"
docker
tag
$
{
DOCKER_TAG
}
$
{
DOCKER_LATEST
}"
-
"
docker
push
$
{
DOCKER_TAG_PRODUCTION
}"
-
"
docker
push
$
{
DOCKER_LATEST
}"
variables
:
DOCKER_TAG_PRODUCTION
:
registry.hub.docker.com/thalia/concrexit:$CI_COMMIT_TAG
DOCKER_TAG_PRODUCTION
:
"
registry.hub.docker.com/thalia/concrexit:$
{
CI_COMMIT_TAG
}"
DEV_REQUIREMENTS
:
0
coverage deploy
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment