You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
argocd continously syncs the frontend-manifests repository to the cluster. The app's image tag in the frontend-manifestskustomization.yml gets updated using renovate. Furthermore, argocd creates a ephemeral preview deployment on Merge-Requests in the frontend repository using it's Pull-Request generator.
We are now wondering, if there is any way to further strengthen the interaction between Gitlab and ArgoCD....
Concrete example: it would be nice if the preview deployment's ingress and/or deployment status would be viewable from GitLab itself. Either as a Gitlab environment, or as a comment on the Merge-Request.
The best thing i've found is using ArgoCD's notification service to send webhooks to the Gitlab API.
However, implementing this seems relatively hacky and pretty complex.
Some GitLab endpoints we'd have to talk to are:
POST /projects/:id/deployments
PUT /projects/:id/deployments/:deployment_id
DELETE /projects/:id/deployments/:deployment_id
After we have created a deployment, how does the subsequent DELETE call know which deployment_id to use?
Is there some sort of shared storage/key-value database between notfications?
Any help and input is massively appreciated 🙏
Sadly,. the docs and available for this whole topic (Gitlab <-> ArgoCD) seem to be minimal. How are you approaching this?
That aside, this is what we have for now, which should theoretically work to at least create a deployment. However there seems to be some weird string problem going on, as "{{.branch_slug}}" will not be enclosed in ""in the requests JSON-body. But this may be out of scope for this discussion....
│ time="2024-12-12T14:59:34Z" level=error msg="Failed to notify recipient {gitlab } defined in resource argocd/frontend: request to {{\n \"status\": \"success\" ,\n \"environment\": branch-slug ,\n \"sha\": \"ede7f0 │
│ a3ae47abd1bbee40d029ac2829858fb892\",\n \"ref\": \"main\",\n \"tag\": \"false\"\n}\n POST https://gitlab.plaesehelp.com/api/v4/projects/123/deployments gitlab} has failed with error code 400 : Bad Request using the configuration in namespace arg │
│ ocd" resource=argocd/frontend
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
we have a pretty basic setup going, using GitLab and ArgoCD:
-
frontend
repository-
frontend-manifests
repositoryargocd
continously syncs thefrontend-manifests
repository to the cluster. The app's image tag in thefrontend-manifests
kustomization.yml
gets updated usingrenovate
. Furthermore, argocd creates a ephemeral preview deployment on Merge-Requests in thefrontend
repository using it's Pull-Request generator.We are now wondering, if there is any way to further strengthen the interaction between Gitlab and ArgoCD....
Concrete example: it would be nice if the preview deployment's ingress and/or deployment status would be viewable from GitLab itself. Either as a Gitlab environment, or as a comment on the Merge-Request.
The best thing i've found is using ArgoCD's notification service to send webhooks to the Gitlab API.
However, implementing this seems relatively hacky and pretty complex.
Some GitLab endpoints we'd have to talk to are:
After we have created a deployment, how does the subsequent
DELETE
call know whichdeployment_id
to use?Is there some sort of shared storage/key-value database between notfications?
Any help and input is massively appreciated 🙏
Sadly,. the docs and available for this whole topic (Gitlab <-> ArgoCD) seem to be minimal. How are you approaching this?
That aside, this is what we have for now, which should theoretically work to at least create a deployment. However there seems to be some weird string problem going on, as
"{{.branch_slug}}"
will not be enclosed in""
in the requests JSON-body. But this may be out of scope for this discussion....FULL FILES
Beta Was this translation helpful? Give feedback.
All reactions