Skip to content

Commit

Permalink
[Madoshakalaka#75] add initial CI config
Browse files Browse the repository at this point in the history
still needs rules to run on scheduled/manual triggers

Signed-off-by: Bryant Finney <finneybp@gmail.com>
  • Loading branch information
bryant-finney committed Nov 7, 2021
1 parent 16ee940 commit 5b6bed2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .gitlab/ci/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# -------------------------------------------------------------------------------------
# Summary: Define the root CI configuration for the project.
# Created: 2021-11-06 22:17:22
# Author: Bryant Finney (https://bryant-finney.github.io/about)
# -------------------------------------------------------------------------------------
workflow:
# avoid duplicate/detached pipelines for merge requests
rules:
- if: $CI_MERGE_REQUEST_ID
when: never
- when: always

update python images:
after_script: [docker logout $CI_REGISTRY]

before_script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD

image: docker:20.10
needs: []

parallel:
matrix:
- PY_MAJOR: 3
PY_MINOR: [6, 7, 8]

script:
- docker pull $DOCKER_IMAGE
- docker tag $DOCKER_IMAGE $CI_REGISTRY_IMAGE/$DOCKER_IMAGE
- docker push $CI_REGISTRY_IMAGE/$DOCKER_IMAGE

services: ["docker:20.10-dind"]
stage: build
variables:
DOCKER_IMAGE: python:${PY_MAJOR}.${PY_MINOR}

0 comments on commit 5b6bed2

Please sign in to comment.