Update .gitlab-ci.yml file
This commit is contained in:
@@ -67,16 +67,25 @@ qodana:
|
|||||||
paths:
|
paths:
|
||||||
- ".qodana/results/"
|
- ".qodana/results/"
|
||||||
|
|
||||||
build:
|
docker-build:
|
||||||
|
image: docker:latest
|
||||||
|
needs: ['pytest', 'qodana']
|
||||||
stage: build
|
stage: build
|
||||||
needs: [ 'pytest' ]
|
services:
|
||||||
|
- docker:dind
|
||||||
before_script:
|
before_script:
|
||||||
- df
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
- cat /etc/resolv.conf
|
|
||||||
- cat /etc/hosts
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- docker build -t disord-bot-pisya .
|
- |
|
||||||
|
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
|
||||||
|
tag=""
|
||||||
|
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
|
||||||
|
else
|
||||||
|
tag=":$CI_COMMIT_REF_SLUG"
|
||||||
|
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
|
||||||
|
fi
|
||||||
|
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
|
||||||
|
|
||||||
|
|
||||||
push:
|
push:
|
||||||
|
|||||||
Reference in New Issue
Block a user