This repository was archived by the owner on Aug 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed
Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 11from gcip import Pipeline
2- from gcip .addons .python import sequences as python
2+ from gcip .addons .python import jobs as python
3+ from gcip .addons .docker import jobs as docker
4+ from gcip import PredefinedVariables
35
46pipeline = Pipeline ()
57pipeline .initialize_image ("python:3.9-slim" )
6- pipeline .add_tags ("environment-prd" )
78
89pipeline .add_children (
9- python .full_stack (
10- dev_repository_url = "<pypi-repo-url-dev>" ,
11- dev_user = "$ARTIFACTORY_DEV_USER" ,
12- varname_dev_password = "$ARTIFACTORY_DEV_PASSWORD" ,
13- stable_repository_url = "<pypi-repo-url-stable>" ,
14- stable_user = "$ARTIFACTORY_PRD_USER" ,
15- varname_stable_password = "$ARTIFACTORY_PRD_PASSWORD" ,
16- mypy_package_dir = "./gcip"
17- ),
10+ python .isort (),
11+ python .flake8 (),
12+ python .pytest (),
13+ python .evaluate_git_tag_pep404_conformity (),
14+ docker .build (repository = "thomass/gcip" , tag = PredefinedVariables .CI_COMMIT_REF_SLUG ),
1815)
1916
17+ if PredefinedVariables .CI_COMMIT_TAG or PredefinedVariables .CI_COMMIT_BRANCH == "master" :
18+ pipeline .add_children (
19+ docker .push (
20+ image = "thomass/gcip" ,
21+ tag = PredefinedVariables .CI_COMMIT_REF_SLUG ,
22+ user_env_var = "DOCKER_USER" ,
23+ login_env_var = "DOCKER_LOGIN" ,
24+ )
25+ )
26+
2027pipeline .write_yaml ()
Original file line number Diff line number Diff line change @@ -4,12 +4,10 @@ generate-pipeline:
44 image : python:3.9-slim
55 script :
66 - pip3 install -r requirements.txt
7- - python3 .gitlab-ci.py > generated-config.yml
7+ - python3 .gitlab-ci.py
88 artifacts :
99 paths :
1010 - generated-config.yml
11- tags :
12- - environment-prd
1311
1412run-pipeline :
1513 stage : deploy
You can’t perform that action at this time.
0 commit comments