mirror of
https://gitlab.jonasled.de/jonasled/discordbot
synced 2024-10-21 08:49:30 +02:00
fix yaml syntax
This commit is contained in:
parent
8ee322a20c
commit
cd369a44c1
1 changed files with 24 additions and 24 deletions
|
@ -1,32 +1,32 @@
|
||||||
image: docker
|
image: docker
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
script:
|
script:
|
||||||
- echo "building branch $CI_COMMIT_REF_NAME, Version $version"
|
- echo "building branch $CI_COMMIT_REF_NAME, Version $version"
|
||||||
- git config --global user.name "build"
|
- git config --global user.name "build"
|
||||||
- git config --global user.email "noreply@jonasled.de"
|
- git config --global user.email "noreply@jonasled.de"
|
||||||
- sudo docker images prune -f
|
- sudo docker images prune -f
|
||||||
- sudo docker pull python:3
|
- sudo docker pull python:3
|
||||||
- sudo docker build -t gitlab.jonasled.de/jonasled/discordbot
|
- sudo docker build -t gitlab.jonasled.de/jonasled/discordbot
|
||||||
- sudo docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
- sudo docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
- sudo docker push gitlab.jonasled.de/jonasled/discordbot
|
- sudo docker push gitlab.jonasled.de/jonasled/discordbot
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
script:
|
script:
|
||||||
- sudo apt-get install -y python-pip #install pip, this is needed to install docker-compose in the next step
|
- sudo apt-get install -y python-pip #install pip, this is needed to install docker-compose in the next step
|
||||||
- sudo pip install docker-compose #Install docker-compose with pip
|
- sudo pip install docker-compose #Install docker-compose with pip
|
||||||
- sudo docker-compose up -d #Start the new container
|
- sudo docker-compose up -d #Start the new container
|
||||||
environment: master
|
environment: master
|
||||||
|
|
Loading…
Reference in a new issue