gitops 1.1.0__tar.gz → 1.1.2__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.
- {gitops-1.1.0 → gitops-1.1.2}/.github/workflows/release-please.yaml +1 -2
- gitops-1.1.2/.release-please-manifest.json +5 -0
- {gitops-1.1.0 → gitops-1.1.2}/CHANGELOG.md +4 -35
- {gitops-1.1.0 → gitops-1.1.2}/PKG-INFO +1 -1
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/CHANGELOG.md +14 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/Chart.yaml +1 -1
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/templates/deployment.yml +0 -2
- {gitops-1.1.0 → gitops-1.1.2}/gitops/__init__.py +1 -1
- gitops-1.1.2/gitops_server/version.py +1 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/workers/deployer/deploy.py +52 -24
- {gitops-1.1.0 → gitops-1.1.2}/pyproject.toml +1 -1
- {gitops-1.1.0 → gitops-1.1.2}/release-please-config.json +1 -1
- gitops-1.1.0/.release-please-manifest.json +0 -5
- gitops-1.1.0/gitops_server/version.py +0 -1
- {gitops-1.1.0 → gitops-1.1.2}/.dockerignore +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/.github/workflows/test.yml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/.gitignore +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/.mise.toml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/.pre-commit-config.yaml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/Dockerfile +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/LICENSE +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/README.md +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/.helmignore +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/README.md +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/templates/_helpers.tpl +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/templates/certificate.yml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/templates/environment.yml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/templates/ingress.yml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/templates/issuer.yml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/templates/secrets.yml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/templates/service.yml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/templates/serviceaccount.yaml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/charts/gitops/values.yaml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/docker-compose.yml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/common/__init__.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/common/app.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/common/utils.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/core.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/main.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/py.typed +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/settings.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/shorthands.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/utils/__init__.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/utils/apps.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/utils/async_runner.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/utils/cli.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/utils/exceptions.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/utils/images.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/utils/kube.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/utils/tags.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops/utils/yaml.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/CHANGELOG.md +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/README.md +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/__init__.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/app.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/main.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/settings.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/types.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/utils/__init__.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/utils/git.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/utils/github.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/utils/slack.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/workers/__init__.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/workers/deployer/__init__.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/workers/deployer/hooks.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/workers/deployer/worker.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/workers/status_updater/__init__.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/gitops_server/workers/status_updater/worker.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/release.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/ruff.toml +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/secrets.example.env +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/setup.cfg +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/__init__.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/conftest.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/sample_data.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/test_app.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/test_core.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/test_deploy.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/test_git.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/test_gitops_server.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/test_utils.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/utils.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/tests/webhook_sample_data.py +0 -0
- {gitops-1.1.0 → gitops-1.1.2}/uv.lock +0 -0
|
@@ -22,7 +22,6 @@ jobs:
|
|
|
22
22
|
cli-release-created: ${{ steps.release.outputs['release_created'] }}
|
|
23
23
|
server-release-created: ${{ steps.release.outputs['release_created'] }}
|
|
24
24
|
helm-release-created: ${{ steps.release.outputs['charts/gitops--release_created'] }}
|
|
25
|
-
cli-version: ${{ steps.release.outputs['tag_name'] }}
|
|
26
25
|
server-version: ${{ steps.release.outputs['tag_name'] }}
|
|
27
26
|
helm-version: ${{ steps.release.outputs['charts/gitops--tag_name'] }}
|
|
28
27
|
sha: ${{ steps.release.outputs.sha }}
|
|
@@ -67,7 +66,7 @@ jobs:
|
|
|
67
66
|
name: Build and Push Docker Image
|
|
68
67
|
uses: uptick/actions/.github/workflows/ci.yaml@main
|
|
69
68
|
needs: release-please
|
|
70
|
-
if: ${{ needs.release-please.outputs.server-
|
|
69
|
+
if: ${{ needs.release-please.outputs.server-release-created}}
|
|
71
70
|
secrets:
|
|
72
71
|
SECRET_ENV: "${{ secrets.CLUSTER_KEY }}"
|
|
73
72
|
#https://github.com/uptick/actions/blob/main/.github/workflows/ci.yaml
|
|
@@ -1,49 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [1.1.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
### Features
|
|
7
|
-
|
|
8
|
-
* bump to 1.1 please ([4ed8ed3](https://github.com/uptick/gitops/commit/4ed8ed38ae94103c559caed9054e8dcc2ddd7868))
|
|
9
|
-
* maybe we can just modify the release-please-manifest ([e374d14](https://github.com/uptick/gitops/commit/e374d14982f073fb4f776295a6975ef0714d501e))
|
|
3
|
+
## [1.1.2](https://github.com/uptick/gitops/compare/gitops-v1.1.1...gitops-v1.1.2) (2025-02-14)
|
|
10
4
|
|
|
11
5
|
|
|
12
6
|
### Bug Fixes
|
|
13
7
|
|
|
14
|
-
*
|
|
15
|
-
* fix broken gitops server release process by merging with regular gitops cli release ([739ead0](https://github.com/uptick/gitops/commit/739ead04ac77d5d2798d4d243aee2d90cffeb645))
|
|
16
|
-
* trigger build ([7afa38f](https://github.com/uptick/gitops/commit/7afa38f2cda0260cee0d28224c20d02baa3461a1))
|
|
17
|
-
* trigger gitops build ([0345a3b](https://github.com/uptick/gitops/commit/0345a3be7db914ca6e6499c4b7aa737c13fd112c))
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Miscellaneous Chores
|
|
21
|
-
|
|
22
|
-
* trigger release for [gitops_server] ([8ec041a](https://github.com/uptick/gitops/commit/8ec041a8f7d20916e84bce04d6e9669ec07829e7))
|
|
23
|
-
* trigger release for [gitops_server] ([1389531](https://github.com/uptick/gitops/commit/13895316fb92b837e08c6b591cc420ec46a79ca3))
|
|
8
|
+
* **helm:** if a roll back is required; rollback before upgrading ([762cdb3](https://github.com/uptick/gitops/commit/762cdb388162c6b8645ec01f0d1c94c20d948b9f))
|
|
24
9
|
|
|
25
|
-
## [1.
|
|
10
|
+
## [1.1.1](https://github.com/uptick/gitops/compare/gitops-v1.1.0...gitops-v1.1.1) (2025-01-24)
|
|
26
11
|
|
|
27
12
|
|
|
28
13
|
### Bug Fixes
|
|
29
14
|
|
|
30
|
-
*
|
|
31
|
-
* fix broken gitops server release process by merging with regular gitops cli release ([739ead0](https://github.com/uptick/gitops/commit/739ead04ac77d5d2798d4d243aee2d90cffeb645))
|
|
32
|
-
* trigger build ([7afa38f](https://github.com/uptick/gitops/commit/7afa38f2cda0260cee0d28224c20d02baa3461a1))
|
|
33
|
-
* trigger gitops build ([0345a3b](https://github.com/uptick/gitops/commit/0345a3be7db914ca6e6499c4b7aa737c13fd112c))
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
### Miscellaneous Chores
|
|
37
|
-
|
|
38
|
-
* trigger release for [gitops_server] ([8ec041a](https://github.com/uptick/gitops/commit/8ec041a8f7d20916e84bce04d6e9669ec07829e7))
|
|
39
|
-
* trigger release for [gitops_server] ([1389531](https://github.com/uptick/gitops/commit/13895316fb92b837e08c6b591cc420ec46a79ca3))
|
|
40
|
-
|
|
41
|
-
## [1.0.1](https://github.com/uptick/gitops/compare/cli-v1.0.1...cli-v1.0.1) (2025-01-23)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Miscellaneous Chores
|
|
45
|
-
|
|
46
|
-
* trigger release for [gitops_server] ([1389531](https://github.com/uptick/gitops/commit/13895316fb92b837e08c6b591cc420ec46a79ca3))
|
|
15
|
+
* releases should be dot formatted ([d1469e8](https://github.com/uptick/gitops/commit/d1469e8cdbded06dbd5194e9ca7f0b2f52d7ff3e))
|
|
47
16
|
|
|
48
17
|
## [1.0.1](https://github.com/uptick/gitops/compare/cli-v1.0.0...cli-v1.0.1) (2025-01-23)
|
|
49
18
|
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.2](https://github.com/uptick/gitops/compare/helm-v1.1.1...helm-v1.1.2) (2025-02-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* remove gitops resource limits ([fcd9680](https://github.com/uptick/gitops/commit/fcd9680f6e94e5cb7a286c269aeaa1626c95a181))
|
|
9
|
+
|
|
10
|
+
## [1.1.1](https://github.com/uptick/gitops/compare/helm-v1.1.0...helm-v1.1.1) (2025-01-24)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Release-As: 1.1.1 ([1543396](https://github.com/uptick/gitops/commit/1543396593d14ead283e8d1f7a60eca9f36d3e57))
|
|
16
|
+
|
|
3
17
|
## [1.1.0](https://github.com/uptick/gitops/compare/helm-v0.13.3...helm-v1.1.0) (2025-01-23)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.1.2"
|
|
@@ -11,7 +11,7 @@ from opentelemetry import trace
|
|
|
11
11
|
|
|
12
12
|
from gitops.common.app import App
|
|
13
13
|
from gitops_server import settings
|
|
14
|
-
from gitops_server.types import AppDefinitions, UpdateAppResult
|
|
14
|
+
from gitops_server.types import AppDefinitions, RunOutput, UpdateAppResult
|
|
15
15
|
from gitops_server.utils import get_repo_name_from_url, github, run, slack
|
|
16
16
|
from gitops_server.utils.git import temp_repo
|
|
17
17
|
|
|
@@ -133,6 +133,17 @@ class Deployer:
|
|
|
133
133
|
)
|
|
134
134
|
return update_result
|
|
135
135
|
|
|
136
|
+
async def rollback_deployment(self, app: App) -> None:
|
|
137
|
+
with tracer.start_as_current_span("rollback_deployment", attributes={"app": app.name}):
|
|
138
|
+
logger.warning(
|
|
139
|
+
"Rolling back %s deployment due to previous failed helm install",
|
|
140
|
+
app.name,
|
|
141
|
+
)
|
|
142
|
+
await run(
|
|
143
|
+
f"helm rollback --namespace={app.namespace} {app.name}",
|
|
144
|
+
suppress_errors=True,
|
|
145
|
+
)
|
|
146
|
+
|
|
136
147
|
async def update_app_deployment(self, app: App) -> UpdateAppResult | None:
|
|
137
148
|
app.set_value("deployment.labels.gitops/deploy_id", self.deploy_id)
|
|
138
149
|
app.set_value("deployment.labels.gitops/status", github.STATUSES.in_progress)
|
|
@@ -155,6 +166,40 @@ class Deployer:
|
|
|
155
166
|
os.fsync(cfg.fileno())
|
|
156
167
|
|
|
157
168
|
with tracer.start_as_current_span("helm_upgrade"):
|
|
169
|
+
|
|
170
|
+
async def upgrade_helm_git() -> RunOutput:
|
|
171
|
+
result = await run(
|
|
172
|
+
"helm secrets upgrade --create-namespace"
|
|
173
|
+
f" --history-max {MAX_HELM_HISTORY}"
|
|
174
|
+
" --install"
|
|
175
|
+
" --timeout=600s"
|
|
176
|
+
f"{' --set skip_migrations=true' if self.skip_migrations else ''}"
|
|
177
|
+
f" -f {cfg.name}"
|
|
178
|
+
f" --namespace={app.namespace}"
|
|
179
|
+
f" {app.name}"
|
|
180
|
+
f" {chart_folder_path}",
|
|
181
|
+
suppress_errors=True,
|
|
182
|
+
)
|
|
183
|
+
return result
|
|
184
|
+
|
|
185
|
+
result = await upgrade_helm_git()
|
|
186
|
+
if result["exit_code"] != 0 and "is in progress" in result["output"]:
|
|
187
|
+
await self.rollback_deployment(app)
|
|
188
|
+
result = await upgrade_helm_git()
|
|
189
|
+
|
|
190
|
+
elif app.chart.type == "helm":
|
|
191
|
+
span.set_attribute("gitops.chart.type", "helm")
|
|
192
|
+
with tempfile.NamedTemporaryFile(suffix=".yml") as cfg:
|
|
193
|
+
cfg.write(json.dumps(app.values).encode())
|
|
194
|
+
cfg.flush()
|
|
195
|
+
os.fsync(cfg.fileno())
|
|
196
|
+
chart_version_arguments = f" --version={app.chart.version}" if app.chart.version else ""
|
|
197
|
+
with tracer.start_as_current_span("helm_repo_add"):
|
|
198
|
+
await run(f"helm repo add {app.chart.helm_repo} {app.chart.helm_repo_url}")
|
|
199
|
+
|
|
200
|
+
with tracer.start_as_current_span("helm_upgrade"):
|
|
201
|
+
|
|
202
|
+
async def upgrade_helm_chart() -> RunOutput:
|
|
158
203
|
result = await run(
|
|
159
204
|
"helm secrets upgrade --create-namespace"
|
|
160
205
|
f" --history-max {MAX_HELM_HISTORY}"
|
|
@@ -164,32 +209,15 @@ class Deployer:
|
|
|
164
209
|
f" -f {cfg.name}"
|
|
165
210
|
f" --namespace={app.namespace}"
|
|
166
211
|
f" {app.name}"
|
|
167
|
-
f" {
|
|
212
|
+
f" {app.chart.helm_chart} {chart_version_arguments}",
|
|
168
213
|
suppress_errors=True,
|
|
169
214
|
)
|
|
170
|
-
|
|
171
|
-
span.set_attribute("gitops.chart.type", "helm")
|
|
172
|
-
with tempfile.NamedTemporaryFile(suffix=".yml") as cfg:
|
|
173
|
-
cfg.write(json.dumps(app.values).encode())
|
|
174
|
-
cfg.flush()
|
|
175
|
-
os.fsync(cfg.fileno())
|
|
176
|
-
chart_version_arguments = f" --version={app.chart.version}" if app.chart.version else ""
|
|
177
|
-
with tracer.start_as_current_span("helm_repo_add"):
|
|
178
|
-
await run(f"helm repo add {app.chart.helm_repo} {app.chart.helm_repo_url}")
|
|
215
|
+
return result
|
|
179
216
|
|
|
180
|
-
|
|
181
|
-
result
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
" --install"
|
|
185
|
-
" --timeout=600s"
|
|
186
|
-
f"{' --set skip_migrations=true' if self.skip_migrations else ''}"
|
|
187
|
-
f" -f {cfg.name}"
|
|
188
|
-
f" --namespace={app.namespace}"
|
|
189
|
-
f" {app.name}"
|
|
190
|
-
f" {app.chart.helm_chart} {chart_version_arguments}",
|
|
191
|
-
suppress_errors=True,
|
|
192
|
-
)
|
|
217
|
+
result = await upgrade_helm_chart()
|
|
218
|
+
if result["exit_code"] != 0 and "is in progress" in result["output"]:
|
|
219
|
+
await self.rollback_deployment(app)
|
|
220
|
+
result = await upgrade_helm_chart()
|
|
193
221
|
else:
|
|
194
222
|
logger.warning("Local is not implemented yet")
|
|
195
223
|
return None
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.1.0"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|