generic-gitlab-cicd 0.3.3__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/PKG-INFO +77 -95
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/README.md +76 -94
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/__init__.py +1 -1
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_gitlab_cicd.egg-info/PKG-INFO +77 -95
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/pyproject.toml +1 -1
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/__main__.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/cli.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/compiler.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/config.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/dependencies.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/models.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/runtime.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/setup.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/sources.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/workflows/__init__.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/workflows/compiler.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/workflows/ecosystems.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/workflows/helm.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/workflows/models.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/workflows/publication.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_ci/workflows/runtime.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_gitlab_cicd.egg-info/SOURCES.txt +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_gitlab_cicd.egg-info/dependency_links.txt +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_gitlab_cicd.egg-info/entry_points.txt +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_gitlab_cicd.egg-info/requires.txt +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_gitlab_cicd.egg-info/top_level.txt +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/setup.cfg +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/tests/test_chart.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/tests/test_framework.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/tests/test_product.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/tests/test_publication.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/tests/test_review.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/tests/test_setup.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/tests/test_sources.py +0 -0
- {generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/tests/test_workflows.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: generic-gitlab-cicd
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: Validated project configuration and reproducible GitLab delivery pipelines
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -19,129 +19,111 @@ The package is named `generic-gitlab-cicd`; the command is `generic-ci`. GitLab
|
|
|
19
19
|
|
|
20
20
|
[Quick start](#quick-start) · [Workflow guide](docs/workflows-revision-one.md) · [CLI reference](docs/cli-reference.md) · [Examples](examples/workflows) · [Documentation](docs/README.md)
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## One repository. Tests, packages, and deployment.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Keep your shared Python package and API together. Generic CI tests them, publishes the package on release, and deploys the API to OpenShift.
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- **Connect monorepo work explicitly.** Declare which projects are affected by upstream changes and which jobs need upstream artifacts. Artifact receipts verify the producing commit, pipeline, configuration, and file checksums.
|
|
29
|
-
- **Support internal infrastructure.** Use prepared runtime images, internal package services, and cached configuration sources. Consumer jobs have no automatic public toolkit bootstrap.
|
|
30
|
-
- **Review generated changes before execution.** Commit the generated YAML alongside its inputs; validate configuration and detect generation drift locally or in CI.
|
|
31
|
-
|
|
32
|
-
For a repository with a few standalone jobs, handwritten GitLab CI may be sufficient. This toolkit is most useful when repeated release, dependency, and deployment rules are becoming difficult to maintain consistently.
|
|
33
|
-
|
|
34
|
-
## How it works
|
|
35
|
-
|
|
36
|
-
| File | What belongs here |
|
|
37
|
-
| --- | --- |
|
|
38
|
-
| `delivery.yml` | Projects, commands, workflow selection, builds, and deployments |
|
|
39
|
-
| `ci-platform.yml` | Runtime images, runner tags, registry locations, and deployment targets |
|
|
40
|
-
| `.gitlab-ci.yml` | Generated pipeline; regenerate after editing the inputs |
|
|
41
|
-
| `generic-ci.yml` + `generic-ci.lock.json` | Optional organization source configuration and its pinned commit |
|
|
42
|
-
|
|
43
|
-
Run `generic-ci validate`, inspect `generic-ci explain`, then run `generic-ci render`. Commit the inputs and generated pipeline together. GitLab executes a planner and the selected runtime jobs using your prepared images.
|
|
44
|
-
|
|
45
|
-
## Quick start
|
|
46
|
-
|
|
47
|
-
Install the CLI as shown below, then run **`generic-ci setup`** from your application repository. It walks you through organization templates or standalone configuration, validates the result, and previews files before writing. It never overwrites existing files or installs a pre-commit hook.
|
|
26
|
+
```yaml
|
|
27
|
+
version: 1
|
|
48
28
|
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
projects:
|
|
30
|
+
sdk:
|
|
31
|
+
path: packages/sdk
|
|
32
|
+
python: {}
|
|
33
|
+
checks:
|
|
34
|
+
tests:
|
|
35
|
+
script: [uv run --no-sync pytest]
|
|
36
|
+
package:
|
|
37
|
+
index: internal
|
|
38
|
+
release:
|
|
39
|
+
tag: v{version}
|
|
40
|
+
workflows:
|
|
41
|
+
merge-request:
|
|
42
|
+
checks: [tests]
|
|
43
|
+
release:
|
|
44
|
+
checks: [tests]
|
|
45
|
+
publish: true
|
|
46
|
+
|
|
47
|
+
api:
|
|
48
|
+
path: services/api
|
|
49
|
+
depends-on: [sdk]
|
|
50
|
+
python: {}
|
|
51
|
+
checks:
|
|
52
|
+
tests:
|
|
53
|
+
script: [uv run --no-sync pytest]
|
|
54
|
+
container:
|
|
55
|
+
dockerfile: Dockerfile
|
|
56
|
+
release:
|
|
57
|
+
tag: v{version}
|
|
58
|
+
needs: [sdk]
|
|
59
|
+
workflows:
|
|
60
|
+
merge-request:
|
|
61
|
+
checks: [tests]
|
|
62
|
+
release:
|
|
63
|
+
checks: [tests]
|
|
64
|
+
build: [container]
|
|
65
|
+
|
|
66
|
+
deployments:
|
|
67
|
+
api:
|
|
68
|
+
target: production
|
|
69
|
+
chart:
|
|
70
|
+
path: deploy/chart
|
|
71
|
+
values: [deploy/values.yaml]
|
|
72
|
+
images:
|
|
73
|
+
- from: api.build-image
|
|
74
|
+
set:
|
|
75
|
+
repository: apps.api.image.repository
|
|
76
|
+
tag: apps.api.image.tag
|
|
77
|
+
workflows:
|
|
78
|
+
release:
|
|
79
|
+
when: manual
|
|
51
80
|
```
|
|
52
81
|
|
|
53
|
-
|
|
82
|
+
**What you get:**
|
|
54
83
|
|
|
55
|
-
|
|
84
|
+
- **On merge requests:** test affected projects. SDK changes also select the API for testing.
|
|
85
|
+
- **On a release tag:** run checks, publish the SDK, and build the API image. The API release depends on SDK publication; its tests and image build can run independently.
|
|
86
|
+
- **When you approve deployment:** deploy the built API image through Helm to OpenShift.
|
|
56
87
|
|
|
57
|
-
|
|
88
|
+
Both projects use a shared version: projects at `1.2.0` release under the protected tag `v1.2.0`. Dependency installation follows each project's declared dependencies and committed lockfile; `depends-on` selects work, not package replacements.
|
|
58
89
|
|
|
59
|
-
|
|
90
|
+
Your organization supplies prepared runtime images, registry settings, and the production target in `ci-platform.yml`. The application's `deploy/chart` and `deploy/values.yaml` describe the deployment. Start with the [shared chart](charts/generic-app) and [values example](examples/helm-values.yaml); configure the named `internal` publishing index and CI credentials through your platform.
|
|
60
91
|
|
|
61
|
-
|
|
92
|
+
## Quick start
|
|
62
93
|
|
|
63
|
-
Use Python **3.11 or newer**. From a checkout of this
|
|
94
|
+
Use Python **3.11 or newer**. From a checkout of this toolkit, install the CLI into an isolated environment:
|
|
64
95
|
|
|
65
96
|
```sh
|
|
66
97
|
python -m venv .venv
|
|
67
98
|
. .venv/bin/activate
|
|
68
99
|
python -m pip install .
|
|
69
|
-
generic-ci --help
|
|
70
100
|
```
|
|
71
101
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
The install command uses your configured package sources. In an air-gapped environment, prepare the wheel and all dependencies internally first.
|
|
75
|
-
|
|
76
|
-
### 2. Provide the runtime configuration
|
|
102
|
+
Then, from your application repository:
|
|
77
103
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
```yaml
|
|
81
|
-
version: 1
|
|
82
|
-
defaults:
|
|
83
|
-
tags: [internal-linux]
|
|
84
|
-
images:
|
|
85
|
-
python: registry.example.internal/ci/python-toolkit:0.3.3
|
|
86
|
-
container-builder:
|
|
87
|
-
engine: buildah
|
|
88
|
-
image: registry.example.internal/ci/buildah-toolkit:0.3.3
|
|
89
|
-
registries:
|
|
90
|
-
containers: registry.example.internal/apps
|
|
91
|
-
previews: registry.example.internal/previews
|
|
92
|
-
allowed-hosts:
|
|
93
|
-
- registry.example.internal
|
|
94
|
-
- gitlab.example.internal
|
|
95
|
-
variables:
|
|
96
|
-
UV_PYTHON_DOWNLOADS: never
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**Replace the example addresses and tags with your platform's values.** These images are placeholders, not publicly available toolkit images. The Python image needs Python, Git, uv, the matching toolkit, and your internal package/CA configuration. The builder image needs Buildah and the matching Python toolkit runtime. Builder and registry settings are required by the platform schema even though this test-only example does not build or push an image.
|
|
100
|
-
|
|
101
|
-
If your organization already provides a platform file or configuration source, use it. Platform maintainers can start with the [image-factory setup guide](starters/image-factory/CI-SETUP.md). Installing the CLI on your laptop does not prepare runner images.
|
|
102
|
-
|
|
103
|
-
### 3. Define the checks
|
|
104
|
-
|
|
105
|
-
Create `delivery.yml` in the application repository:
|
|
106
|
-
|
|
107
|
-
```yaml
|
|
108
|
-
version: 1
|
|
109
|
-
projects:
|
|
110
|
-
app:
|
|
111
|
-
path: .
|
|
112
|
-
python:
|
|
113
|
-
groups: all
|
|
114
|
-
checks:
|
|
115
|
-
unit:
|
|
116
|
-
script:
|
|
117
|
-
- uv run --no-sync pytest
|
|
118
|
-
workflows:
|
|
119
|
-
push:
|
|
120
|
-
checks: [unit]
|
|
121
|
-
merge-request:
|
|
122
|
-
checks: [unit]
|
|
104
|
+
```sh
|
|
105
|
+
generic-ci setup
|
|
123
106
|
```
|
|
124
107
|
|
|
125
|
-
|
|
108
|
+
Setup guides you through organization templates or standalone configuration, previews files before writing, and includes local editor schemas. Start with its single-app configuration and add projects as needed, or choose an organization template for your monorepo. See the [setup guide](docs/setup-revision-one.md) for prepared images, unattended options, and editor integration.
|
|
126
109
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### 4. Validate, inspect, and generate
|
|
130
|
-
|
|
131
|
-
Run these commands from the application repository using the installed CLI:
|
|
110
|
+
After editing your configuration:
|
|
132
111
|
|
|
133
112
|
```sh
|
|
134
113
|
generic-ci validate
|
|
135
|
-
generic-ci explain -o ci-explain.json
|
|
136
114
|
generic-ci render -o .gitlab-ci.yml
|
|
137
|
-
generic-ci render --check -o .gitlab-ci.yml
|
|
138
115
|
```
|
|
139
116
|
|
|
140
|
-
Review
|
|
117
|
+
Review and commit `delivery.yml`, your platform configuration, and the generated `.gitlab-ci.yml` together. Validate the generated pipeline with your GitLab CI Lint, then push your branch.
|
|
118
|
+
|
|
119
|
+
**Prefer autocomplete?** Setup exports the schemas automatically. You can also refresh them from the installed CLI:
|
|
141
120
|
|
|
142
|
-
|
|
121
|
+
```sh
|
|
122
|
+
generic-ci schema -o .generic-ci/delivery.schema.json
|
|
123
|
+
generic-ci schema --platform-schema -o .generic-ci/platform.schema.json
|
|
124
|
+
```
|
|
143
125
|
|
|
144
|
-
|
|
126
|
+
Associate them with `delivery.yml` and `ci-platform.yml` in your editor. The [editor guide](docs/setup-revision-one.md#editor-completion-and-validation) includes PyCharm instructions.
|
|
145
127
|
|
|
146
128
|
## Add the delivery features you need
|
|
147
129
|
|
|
@@ -8,129 +8,111 @@ The package is named `generic-gitlab-cicd`; the command is `generic-ci`. GitLab
|
|
|
8
8
|
|
|
9
9
|
[Quick start](#quick-start) · [Workflow guide](docs/workflows-revision-one.md) · [CLI reference](docs/cli-reference.md) · [Examples](examples/workflows) · [Documentation](docs/README.md)
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## One repository. Tests, packages, and deployment.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Keep your shared Python package and API together. Generic CI tests them, publishes the package on release, and deploys the API to OpenShift.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **Connect monorepo work explicitly.** Declare which projects are affected by upstream changes and which jobs need upstream artifacts. Artifact receipts verify the producing commit, pipeline, configuration, and file checksums.
|
|
18
|
-
- **Support internal infrastructure.** Use prepared runtime images, internal package services, and cached configuration sources. Consumer jobs have no automatic public toolkit bootstrap.
|
|
19
|
-
- **Review generated changes before execution.** Commit the generated YAML alongside its inputs; validate configuration and detect generation drift locally or in CI.
|
|
20
|
-
|
|
21
|
-
For a repository with a few standalone jobs, handwritten GitLab CI may be sufficient. This toolkit is most useful when repeated release, dependency, and deployment rules are becoming difficult to maintain consistently.
|
|
22
|
-
|
|
23
|
-
## How it works
|
|
24
|
-
|
|
25
|
-
| File | What belongs here |
|
|
26
|
-
| --- | --- |
|
|
27
|
-
| `delivery.yml` | Projects, commands, workflow selection, builds, and deployments |
|
|
28
|
-
| `ci-platform.yml` | Runtime images, runner tags, registry locations, and deployment targets |
|
|
29
|
-
| `.gitlab-ci.yml` | Generated pipeline; regenerate after editing the inputs |
|
|
30
|
-
| `generic-ci.yml` + `generic-ci.lock.json` | Optional organization source configuration and its pinned commit |
|
|
31
|
-
|
|
32
|
-
Run `generic-ci validate`, inspect `generic-ci explain`, then run `generic-ci render`. Commit the inputs and generated pipeline together. GitLab executes a planner and the selected runtime jobs using your prepared images.
|
|
33
|
-
|
|
34
|
-
## Quick start
|
|
35
|
-
|
|
36
|
-
Install the CLI as shown below, then run **`generic-ci setup`** from your application repository. It walks you through organization templates or standalone configuration, validates the result, and previews files before writing. It never overwrites existing files or installs a pre-commit hook.
|
|
15
|
+
```yaml
|
|
16
|
+
version: 1
|
|
37
17
|
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
projects:
|
|
19
|
+
sdk:
|
|
20
|
+
path: packages/sdk
|
|
21
|
+
python: {}
|
|
22
|
+
checks:
|
|
23
|
+
tests:
|
|
24
|
+
script: [uv run --no-sync pytest]
|
|
25
|
+
package:
|
|
26
|
+
index: internal
|
|
27
|
+
release:
|
|
28
|
+
tag: v{version}
|
|
29
|
+
workflows:
|
|
30
|
+
merge-request:
|
|
31
|
+
checks: [tests]
|
|
32
|
+
release:
|
|
33
|
+
checks: [tests]
|
|
34
|
+
publish: true
|
|
35
|
+
|
|
36
|
+
api:
|
|
37
|
+
path: services/api
|
|
38
|
+
depends-on: [sdk]
|
|
39
|
+
python: {}
|
|
40
|
+
checks:
|
|
41
|
+
tests:
|
|
42
|
+
script: [uv run --no-sync pytest]
|
|
43
|
+
container:
|
|
44
|
+
dockerfile: Dockerfile
|
|
45
|
+
release:
|
|
46
|
+
tag: v{version}
|
|
47
|
+
needs: [sdk]
|
|
48
|
+
workflows:
|
|
49
|
+
merge-request:
|
|
50
|
+
checks: [tests]
|
|
51
|
+
release:
|
|
52
|
+
checks: [tests]
|
|
53
|
+
build: [container]
|
|
54
|
+
|
|
55
|
+
deployments:
|
|
56
|
+
api:
|
|
57
|
+
target: production
|
|
58
|
+
chart:
|
|
59
|
+
path: deploy/chart
|
|
60
|
+
values: [deploy/values.yaml]
|
|
61
|
+
images:
|
|
62
|
+
- from: api.build-image
|
|
63
|
+
set:
|
|
64
|
+
repository: apps.api.image.repository
|
|
65
|
+
tag: apps.api.image.tag
|
|
66
|
+
workflows:
|
|
67
|
+
release:
|
|
68
|
+
when: manual
|
|
40
69
|
```
|
|
41
70
|
|
|
42
|
-
|
|
71
|
+
**What you get:**
|
|
43
72
|
|
|
44
|
-
|
|
73
|
+
- **On merge requests:** test affected projects. SDK changes also select the API for testing.
|
|
74
|
+
- **On a release tag:** run checks, publish the SDK, and build the API image. The API release depends on SDK publication; its tests and image build can run independently.
|
|
75
|
+
- **When you approve deployment:** deploy the built API image through Helm to OpenShift.
|
|
45
76
|
|
|
46
|
-
|
|
77
|
+
Both projects use a shared version: projects at `1.2.0` release under the protected tag `v1.2.0`. Dependency installation follows each project's declared dependencies and committed lockfile; `depends-on` selects work, not package replacements.
|
|
47
78
|
|
|
48
|
-
|
|
79
|
+
Your organization supplies prepared runtime images, registry settings, and the production target in `ci-platform.yml`. The application's `deploy/chart` and `deploy/values.yaml` describe the deployment. Start with the [shared chart](charts/generic-app) and [values example](examples/helm-values.yaml); configure the named `internal` publishing index and CI credentials through your platform.
|
|
49
80
|
|
|
50
|
-
|
|
81
|
+
## Quick start
|
|
51
82
|
|
|
52
|
-
Use Python **3.11 or newer**. From a checkout of this
|
|
83
|
+
Use Python **3.11 or newer**. From a checkout of this toolkit, install the CLI into an isolated environment:
|
|
53
84
|
|
|
54
85
|
```sh
|
|
55
86
|
python -m venv .venv
|
|
56
87
|
. .venv/bin/activate
|
|
57
88
|
python -m pip install .
|
|
58
|
-
generic-ci --help
|
|
59
89
|
```
|
|
60
90
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
The install command uses your configured package sources. In an air-gapped environment, prepare the wheel and all dependencies internally first.
|
|
64
|
-
|
|
65
|
-
### 2. Provide the runtime configuration
|
|
91
|
+
Then, from your application repository:
|
|
66
92
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
```yaml
|
|
70
|
-
version: 1
|
|
71
|
-
defaults:
|
|
72
|
-
tags: [internal-linux]
|
|
73
|
-
images:
|
|
74
|
-
python: registry.example.internal/ci/python-toolkit:0.3.3
|
|
75
|
-
container-builder:
|
|
76
|
-
engine: buildah
|
|
77
|
-
image: registry.example.internal/ci/buildah-toolkit:0.3.3
|
|
78
|
-
registries:
|
|
79
|
-
containers: registry.example.internal/apps
|
|
80
|
-
previews: registry.example.internal/previews
|
|
81
|
-
allowed-hosts:
|
|
82
|
-
- registry.example.internal
|
|
83
|
-
- gitlab.example.internal
|
|
84
|
-
variables:
|
|
85
|
-
UV_PYTHON_DOWNLOADS: never
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**Replace the example addresses and tags with your platform's values.** These images are placeholders, not publicly available toolkit images. The Python image needs Python, Git, uv, the matching toolkit, and your internal package/CA configuration. The builder image needs Buildah and the matching Python toolkit runtime. Builder and registry settings are required by the platform schema even though this test-only example does not build or push an image.
|
|
89
|
-
|
|
90
|
-
If your organization already provides a platform file or configuration source, use it. Platform maintainers can start with the [image-factory setup guide](starters/image-factory/CI-SETUP.md). Installing the CLI on your laptop does not prepare runner images.
|
|
91
|
-
|
|
92
|
-
### 3. Define the checks
|
|
93
|
-
|
|
94
|
-
Create `delivery.yml` in the application repository:
|
|
95
|
-
|
|
96
|
-
```yaml
|
|
97
|
-
version: 1
|
|
98
|
-
projects:
|
|
99
|
-
app:
|
|
100
|
-
path: .
|
|
101
|
-
python:
|
|
102
|
-
groups: all
|
|
103
|
-
checks:
|
|
104
|
-
unit:
|
|
105
|
-
script:
|
|
106
|
-
- uv run --no-sync pytest
|
|
107
|
-
workflows:
|
|
108
|
-
push:
|
|
109
|
-
checks: [unit]
|
|
110
|
-
merge-request:
|
|
111
|
-
checks: [unit]
|
|
93
|
+
```sh
|
|
94
|
+
generic-ci setup
|
|
112
95
|
```
|
|
113
96
|
|
|
114
|
-
|
|
97
|
+
Setup guides you through organization templates or standalone configuration, previews files before writing, and includes local editor schemas. Start with its single-app configuration and add projects as needed, or choose an organization template for your monorepo. See the [setup guide](docs/setup-revision-one.md) for prepared images, unattended options, and editor integration.
|
|
115
98
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
### 4. Validate, inspect, and generate
|
|
119
|
-
|
|
120
|
-
Run these commands from the application repository using the installed CLI:
|
|
99
|
+
After editing your configuration:
|
|
121
100
|
|
|
122
101
|
```sh
|
|
123
102
|
generic-ci validate
|
|
124
|
-
generic-ci explain -o ci-explain.json
|
|
125
103
|
generic-ci render -o .gitlab-ci.yml
|
|
126
|
-
generic-ci render --check -o .gitlab-ci.yml
|
|
127
104
|
```
|
|
128
105
|
|
|
129
|
-
Review
|
|
106
|
+
Review and commit `delivery.yml`, your platform configuration, and the generated `.gitlab-ci.yml` together. Validate the generated pipeline with your GitLab CI Lint, then push your branch.
|
|
107
|
+
|
|
108
|
+
**Prefer autocomplete?** Setup exports the schemas automatically. You can also refresh them from the installed CLI:
|
|
130
109
|
|
|
131
|
-
|
|
110
|
+
```sh
|
|
111
|
+
generic-ci schema -o .generic-ci/delivery.schema.json
|
|
112
|
+
generic-ci schema --platform-schema -o .generic-ci/platform.schema.json
|
|
113
|
+
```
|
|
132
114
|
|
|
133
|
-
|
|
115
|
+
Associate them with `delivery.yml` and `ci-platform.yml` in your editor. The [editor guide](docs/setup-revision-one.md#editor-completion-and-validation) includes PyCharm instructions.
|
|
134
116
|
|
|
135
117
|
## Add the delivery features you need
|
|
136
118
|
|
{generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_gitlab_cicd.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: generic-gitlab-cicd
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: Validated project configuration and reproducible GitLab delivery pipelines
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -19,129 +19,111 @@ The package is named `generic-gitlab-cicd`; the command is `generic-ci`. GitLab
|
|
|
19
19
|
|
|
20
20
|
[Quick start](#quick-start) · [Workflow guide](docs/workflows-revision-one.md) · [CLI reference](docs/cli-reference.md) · [Examples](examples/workflows) · [Documentation](docs/README.md)
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## One repository. Tests, packages, and deployment.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Keep your shared Python package and API together. Generic CI tests them, publishes the package on release, and deploys the API to OpenShift.
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- **Connect monorepo work explicitly.** Declare which projects are affected by upstream changes and which jobs need upstream artifacts. Artifact receipts verify the producing commit, pipeline, configuration, and file checksums.
|
|
29
|
-
- **Support internal infrastructure.** Use prepared runtime images, internal package services, and cached configuration sources. Consumer jobs have no automatic public toolkit bootstrap.
|
|
30
|
-
- **Review generated changes before execution.** Commit the generated YAML alongside its inputs; validate configuration and detect generation drift locally or in CI.
|
|
31
|
-
|
|
32
|
-
For a repository with a few standalone jobs, handwritten GitLab CI may be sufficient. This toolkit is most useful when repeated release, dependency, and deployment rules are becoming difficult to maintain consistently.
|
|
33
|
-
|
|
34
|
-
## How it works
|
|
35
|
-
|
|
36
|
-
| File | What belongs here |
|
|
37
|
-
| --- | --- |
|
|
38
|
-
| `delivery.yml` | Projects, commands, workflow selection, builds, and deployments |
|
|
39
|
-
| `ci-platform.yml` | Runtime images, runner tags, registry locations, and deployment targets |
|
|
40
|
-
| `.gitlab-ci.yml` | Generated pipeline; regenerate after editing the inputs |
|
|
41
|
-
| `generic-ci.yml` + `generic-ci.lock.json` | Optional organization source configuration and its pinned commit |
|
|
42
|
-
|
|
43
|
-
Run `generic-ci validate`, inspect `generic-ci explain`, then run `generic-ci render`. Commit the inputs and generated pipeline together. GitLab executes a planner and the selected runtime jobs using your prepared images.
|
|
44
|
-
|
|
45
|
-
## Quick start
|
|
46
|
-
|
|
47
|
-
Install the CLI as shown below, then run **`generic-ci setup`** from your application repository. It walks you through organization templates or standalone configuration, validates the result, and previews files before writing. It never overwrites existing files or installs a pre-commit hook.
|
|
26
|
+
```yaml
|
|
27
|
+
version: 1
|
|
48
28
|
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
projects:
|
|
30
|
+
sdk:
|
|
31
|
+
path: packages/sdk
|
|
32
|
+
python: {}
|
|
33
|
+
checks:
|
|
34
|
+
tests:
|
|
35
|
+
script: [uv run --no-sync pytest]
|
|
36
|
+
package:
|
|
37
|
+
index: internal
|
|
38
|
+
release:
|
|
39
|
+
tag: v{version}
|
|
40
|
+
workflows:
|
|
41
|
+
merge-request:
|
|
42
|
+
checks: [tests]
|
|
43
|
+
release:
|
|
44
|
+
checks: [tests]
|
|
45
|
+
publish: true
|
|
46
|
+
|
|
47
|
+
api:
|
|
48
|
+
path: services/api
|
|
49
|
+
depends-on: [sdk]
|
|
50
|
+
python: {}
|
|
51
|
+
checks:
|
|
52
|
+
tests:
|
|
53
|
+
script: [uv run --no-sync pytest]
|
|
54
|
+
container:
|
|
55
|
+
dockerfile: Dockerfile
|
|
56
|
+
release:
|
|
57
|
+
tag: v{version}
|
|
58
|
+
needs: [sdk]
|
|
59
|
+
workflows:
|
|
60
|
+
merge-request:
|
|
61
|
+
checks: [tests]
|
|
62
|
+
release:
|
|
63
|
+
checks: [tests]
|
|
64
|
+
build: [container]
|
|
65
|
+
|
|
66
|
+
deployments:
|
|
67
|
+
api:
|
|
68
|
+
target: production
|
|
69
|
+
chart:
|
|
70
|
+
path: deploy/chart
|
|
71
|
+
values: [deploy/values.yaml]
|
|
72
|
+
images:
|
|
73
|
+
- from: api.build-image
|
|
74
|
+
set:
|
|
75
|
+
repository: apps.api.image.repository
|
|
76
|
+
tag: apps.api.image.tag
|
|
77
|
+
workflows:
|
|
78
|
+
release:
|
|
79
|
+
when: manual
|
|
51
80
|
```
|
|
52
81
|
|
|
53
|
-
|
|
82
|
+
**What you get:**
|
|
54
83
|
|
|
55
|
-
|
|
84
|
+
- **On merge requests:** test affected projects. SDK changes also select the API for testing.
|
|
85
|
+
- **On a release tag:** run checks, publish the SDK, and build the API image. The API release depends on SDK publication; its tests and image build can run independently.
|
|
86
|
+
- **When you approve deployment:** deploy the built API image through Helm to OpenShift.
|
|
56
87
|
|
|
57
|
-
|
|
88
|
+
Both projects use a shared version: projects at `1.2.0` release under the protected tag `v1.2.0`. Dependency installation follows each project's declared dependencies and committed lockfile; `depends-on` selects work, not package replacements.
|
|
58
89
|
|
|
59
|
-
|
|
90
|
+
Your organization supplies prepared runtime images, registry settings, and the production target in `ci-platform.yml`. The application's `deploy/chart` and `deploy/values.yaml` describe the deployment. Start with the [shared chart](charts/generic-app) and [values example](examples/helm-values.yaml); configure the named `internal` publishing index and CI credentials through your platform.
|
|
60
91
|
|
|
61
|
-
|
|
92
|
+
## Quick start
|
|
62
93
|
|
|
63
|
-
Use Python **3.11 or newer**. From a checkout of this
|
|
94
|
+
Use Python **3.11 or newer**. From a checkout of this toolkit, install the CLI into an isolated environment:
|
|
64
95
|
|
|
65
96
|
```sh
|
|
66
97
|
python -m venv .venv
|
|
67
98
|
. .venv/bin/activate
|
|
68
99
|
python -m pip install .
|
|
69
|
-
generic-ci --help
|
|
70
100
|
```
|
|
71
101
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
The install command uses your configured package sources. In an air-gapped environment, prepare the wheel and all dependencies internally first.
|
|
75
|
-
|
|
76
|
-
### 2. Provide the runtime configuration
|
|
102
|
+
Then, from your application repository:
|
|
77
103
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
```yaml
|
|
81
|
-
version: 1
|
|
82
|
-
defaults:
|
|
83
|
-
tags: [internal-linux]
|
|
84
|
-
images:
|
|
85
|
-
python: registry.example.internal/ci/python-toolkit:0.3.3
|
|
86
|
-
container-builder:
|
|
87
|
-
engine: buildah
|
|
88
|
-
image: registry.example.internal/ci/buildah-toolkit:0.3.3
|
|
89
|
-
registries:
|
|
90
|
-
containers: registry.example.internal/apps
|
|
91
|
-
previews: registry.example.internal/previews
|
|
92
|
-
allowed-hosts:
|
|
93
|
-
- registry.example.internal
|
|
94
|
-
- gitlab.example.internal
|
|
95
|
-
variables:
|
|
96
|
-
UV_PYTHON_DOWNLOADS: never
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**Replace the example addresses and tags with your platform's values.** These images are placeholders, not publicly available toolkit images. The Python image needs Python, Git, uv, the matching toolkit, and your internal package/CA configuration. The builder image needs Buildah and the matching Python toolkit runtime. Builder and registry settings are required by the platform schema even though this test-only example does not build or push an image.
|
|
100
|
-
|
|
101
|
-
If your organization already provides a platform file or configuration source, use it. Platform maintainers can start with the [image-factory setup guide](starters/image-factory/CI-SETUP.md). Installing the CLI on your laptop does not prepare runner images.
|
|
102
|
-
|
|
103
|
-
### 3. Define the checks
|
|
104
|
-
|
|
105
|
-
Create `delivery.yml` in the application repository:
|
|
106
|
-
|
|
107
|
-
```yaml
|
|
108
|
-
version: 1
|
|
109
|
-
projects:
|
|
110
|
-
app:
|
|
111
|
-
path: .
|
|
112
|
-
python:
|
|
113
|
-
groups: all
|
|
114
|
-
checks:
|
|
115
|
-
unit:
|
|
116
|
-
script:
|
|
117
|
-
- uv run --no-sync pytest
|
|
118
|
-
workflows:
|
|
119
|
-
push:
|
|
120
|
-
checks: [unit]
|
|
121
|
-
merge-request:
|
|
122
|
-
checks: [unit]
|
|
104
|
+
```sh
|
|
105
|
+
generic-ci setup
|
|
123
106
|
```
|
|
124
107
|
|
|
125
|
-
|
|
108
|
+
Setup guides you through organization templates or standalone configuration, previews files before writing, and includes local editor schemas. Start with its single-app configuration and add projects as needed, or choose an organization template for your monorepo. See the [setup guide](docs/setup-revision-one.md) for prepared images, unattended options, and editor integration.
|
|
126
109
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### 4. Validate, inspect, and generate
|
|
130
|
-
|
|
131
|
-
Run these commands from the application repository using the installed CLI:
|
|
110
|
+
After editing your configuration:
|
|
132
111
|
|
|
133
112
|
```sh
|
|
134
113
|
generic-ci validate
|
|
135
|
-
generic-ci explain -o ci-explain.json
|
|
136
114
|
generic-ci render -o .gitlab-ci.yml
|
|
137
|
-
generic-ci render --check -o .gitlab-ci.yml
|
|
138
115
|
```
|
|
139
116
|
|
|
140
|
-
Review
|
|
117
|
+
Review and commit `delivery.yml`, your platform configuration, and the generated `.gitlab-ci.yml` together. Validate the generated pipeline with your GitLab CI Lint, then push your branch.
|
|
118
|
+
|
|
119
|
+
**Prefer autocomplete?** Setup exports the schemas automatically. You can also refresh them from the installed CLI:
|
|
141
120
|
|
|
142
|
-
|
|
121
|
+
```sh
|
|
122
|
+
generic-ci schema -o .generic-ci/delivery.schema.json
|
|
123
|
+
generic-ci schema --platform-schema -o .generic-ci/platform.schema.json
|
|
124
|
+
```
|
|
143
125
|
|
|
144
|
-
|
|
126
|
+
Associate them with `delivery.yml` and `ci-platform.yml` in your editor. The [editor guide](docs/setup-revision-one.md#editor-completion-and-validation) includes PyCharm instructions.
|
|
145
127
|
|
|
146
128
|
## Add the delivery features you need
|
|
147
129
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "generic-gitlab-cicd"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.4"
|
|
8
8
|
description = "Validated project configuration and reproducible GitLab delivery pipelines"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_gitlab_cicd.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_gitlab_cicd.egg-info/requires.txt
RENAMED
|
File without changes
|
{generic_gitlab_cicd-0.3.3 → generic_gitlab_cicd-0.3.4}/generic_gitlab_cicd.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|