Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit 70d3b5e

Browse files
updated the gitlab ci pipeline to be run on gitlab.com
1 parent 4ee9a61 commit 70d3b5e

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

.gitlab-ci.py

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
from 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

46
pipeline = Pipeline()
57
pipeline.initialize_image("python:3.9-slim")
6-
pipeline.add_tags("environment-prd")
78

89
pipeline.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+
2027
pipeline.write_yaml()

.gitlab-ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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

1412
run-pipeline:
1513
stage: deploy

0 commit comments

Comments
 (0)