Skip to content

Commit 5b6bed2

Browse files
committed
[Madoshakalaka#75] add initial CI config
still needs rules to run on scheduled/manual triggers Signed-off-by: Bryant Finney <[email protected]>
1 parent 16ee940 commit 5b6bed2

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.gitlab/ci/main.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# -------------------------------------------------------------------------------------
2+
# Summary: Define the root CI configuration for the project.
3+
# Created: 2021-11-06 22:17:22
4+
# Author: Bryant Finney (https://bryant-finney.github.io/about)
5+
# -------------------------------------------------------------------------------------
6+
workflow:
7+
# avoid duplicate/detached pipelines for merge requests
8+
rules:
9+
- if: $CI_MERGE_REQUEST_ID
10+
when: never
11+
- when: always
12+
13+
update python images:
14+
after_script: [docker logout $CI_REGISTRY]
15+
16+
before_script:
17+
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
18+
19+
image: docker:20.10
20+
needs: []
21+
22+
parallel:
23+
matrix:
24+
- PY_MAJOR: 3
25+
PY_MINOR: [6, 7, 8]
26+
27+
script:
28+
- docker pull $DOCKER_IMAGE
29+
- docker tag $DOCKER_IMAGE $CI_REGISTRY_IMAGE/$DOCKER_IMAGE
30+
- docker push $CI_REGISTRY_IMAGE/$DOCKER_IMAGE
31+
32+
services: ["docker:20.10-dind"]
33+
stage: build
34+
variables:
35+
DOCKER_IMAGE: python:${PY_MAJOR}.${PY_MINOR}

0 commit comments

Comments
 (0)