diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 906b2fe88440baf652fff2a6f5ce88e9a7576805..412d9ab99aa5cdccf5ca9522e3f0a52c1dd80aff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,10 @@ variables: HEROKU_APP_NAME: tdt4242-base HEROKU_REGISTRY_IMAGE: registry.heroku.com/${HEROKU_APP_NAME}/web + stages: - test - - build - - release + - deploy test: image: python:3 @@ -16,29 +16,12 @@ test: - pip install -r requirements.txt - python manage.py test -image: - name: docker/compose:latest -services: - - docker:dind - -before_script: - - docker version - - docker-compose version - -build: - - stage: build +deploy: + stage: deploy + variables: + HEROKU_APP_NAME: tdt4242-base script: - - apk add --no-cache docker-compose - - docker-compose up -d - -release: - only: - - master - image: node:10.17-alpine - stage: release - before_script: - - apk add curl bash - - curl https://cli-assets.heroku.com/install.sh | sh - script: - - heroku container:release -a tdt4242-base web + - apt-get update -qy + - apt-get install -y ruby-dev + - gem install dpl + - dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_AUTH_TOKEN