forked from Madoshakalaka/pipenv-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Madoshakalaka#75] add initial CI config
still needs rules to run on scheduled/manual triggers Signed-off-by: Bryant Finney <finneybp@gmail.com>
- Loading branch information
1 parent
16ee940
commit 5b6bed2
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |