From 40b18433b38d7a6a8d2c83e57a303b611f691fea Mon Sep 17 00:00:00 2001 From: Anton Tetov Johansson <anton@tetov.se> Date: Thu, 11 Aug 2022 09:14:57 +0000 Subject: [PATCH] Update to use docker executor. --- gitlab-ci.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 435467f..7d10af4 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -3,10 +3,12 @@ variables: CANVAS_COURSE_CODE: 0 # Update this value to the correct course code -# Used if docker runner is needed, currently we run locally on a designated computer with this installed -#image: "python:3.7" -#before_script: -# - python3 -m pip install canvasapi +default: + tags: + - docker-executor + image: "python:3.9" + before_script: + - python3 -m pip install canvasapi canvas_push: script: @@ -14,8 +16,5 @@ canvas_push: git clone --depth=1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.control.lth.se/regler/canvassync.git python3 canvassync/canvas_sync.py stage: deploy - only: - refs: - - master - #changes: - # - to_canvas/ + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # run only for pushes to main/master -- GitLab