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
d43dd1e0
Verified
Commit
d43dd1e0
authored
Apr 09, 2019
by
Sébastiaan Versteeg
Browse files
Build in between docker images with dev requirements
parent
1bafbc2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
d43dd1e0
...
...
@@ -182,42 +182,33 @@ build docker image:
image
:
thalia/docker-compose
tags
:
-
docker
except
:
-
tags
before_script
:
-
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=
0
--build-arg source_commit=$(git rev-parse HEAD) web
-
docker-compose build --build-arg install_dev_requirements=
$DEV_REQUIREMENTS
--build-arg source_commit=$(git rev-parse HEAD) web
-
docker-compose run --rm web test
-
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
tag docker image
:
stage
:
deploy
services
:
-
docker:dind
image
:
docker:git
tags
:
-
docker
build production docker image
:
extends
:
build docker image
only
:
-
tags
dependencies
:
-
build docker image
before_script
:
-
echo $DOCKER_REGISTRY_PASSWORD | docker login --username thaliawww --password-stdin registry.hub.docker.com
script
:
-
docker pull $DOCKER_TAG
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 push $DOCKER_LATEST
variables
:
DOCKER_TAG
:
registry.hub.docker.com/thalia/concrexit:$CI_COMMIT_SHA
DOCKER_TAG_PRODUCTION
:
registry.hub.docker.com/thalia/concrexit:$CI_COMMIT_TAG
DOCKER_LATEST
:
registry.hub.docker.com/thalia/concrexit:latest
DEV_REQUIREMENTS
:
0
cache
:
key
:
"
$CI_JOB_NAME"
...
...
pyproject.toml
View file @
d43dd1e0
...
...
@@ -29,7 +29,6 @@ django-bootstrap4 = "^0.0.7"
firebase-admin
=
"^2.15"
sentry-sdk
=
"^0.7.3"
django-sendfile2
=
"^0.4.2"
factory_boy
=
"^2.11"
# docs requirements
recommonmark
=
{
version
=
"^0.5.0"
,
optional
=
true
}
...
...
@@ -40,6 +39,7 @@ docs = ["recommonmark", "sphinx"]
[tool.poetry.dev-dependencies]
django-template-check
=
"^0.3.1"
factory_boy
=
"^2.11"
flake8
=
"^3.7"
pydenticon
=
"^0.3.1"
pylint
=
"^2.2"
...
...
Write
Preview
Supports
Markdown
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