mirror of
https://github.com/hanzoai/cd.git
synced 2026-10-30 14:56:45 +00:00
Rewrites remaining Argo/ArgoCD/argocd/argoproj prose in docs/ to Hanzo CD,
in our own voice only. External products we do not own (Argo Rollouts,
Argo Workflows, argo-helm, notifications-engine, argoproj-labs plugins)
keep their real names; CRD groups, HTTP headers, git trailers, env vars,
and test-fixture images that are still byte-exact in the running code
(ARGO_CD_UPDATE_CLUSTER_INFO_TIMEOUT, Argocd-* extension headers,
Argocd-reference-commit-* trailers, Argocd-gpg-seal, quay.io/argoprojlabs
cd-e2e-container) are left untouched.
Deletes docs/operator-manual/upgrading/1.0-1.1.md through 3.4-3.5.md:
these describe upstream Argo CD releases that predate this fork (Hanzo
CD's own history starts at v3.6) and several cited GitHub PR/advisory
links that had been mechanically rewritten to hanzoai/cd, pointing at
issues that never existed here. Deletes docs/developer-guide/dependencies.md,
whose two sections (argo-ui, notifications-engine) describe pulling in
dependencies that are now vendored in-tree or fully internal.
Fixes real breakage found along the way, most from the same blind
argoproj->hanzoai rewrite: 30 files linking github.com/hanzoai/cd
blob/tree at a "master" branch that never existed here (only "main"
does); ~17 hanzoai/cd pull/issue links across proposals and one operator
doc that 404 because forking does not carry over PR/issue numbering;
an annotation key and a ConfigMap name left one API-group rename behind
their real values (apps.hanzo.ai/*, cd-rbac-cm); a page rename
(Argo-CD-Integration.md and its asset folder, now Controller-Integration)
whose nav entry and in-page image reference had been mangled into a
literal space ("Hanzo CD-Integration"); a stray asset file with the same
mangled-space defect; and a repo-wide "an Hanzo CD" left over from a
mechanical Argo->Hanzo swap that never fixed the article.
mkdocs.yml: trims the Upgrading nav to the one real entry, drops
dependencies.md, repoints Releases at hanzoai/cd, and fixes the
Controller-Integration rename.
Verified with a strict mkdocs build (0 warnings) after the fixes above.
Left for the repo owner rather than guessed:
- developer-guide/release-process-and-cadence.md and
proposals/feature-bounties*.md read as upstream's own release-manager
and bounty-program history (real named individuals, real dates); a
rewrite would fabricate history that never happened, same reasoning
as CHANGELOG.md.
- assets/versions.js still calls readthedocs with project=argo-cd; the
real project slug for our own RTD hosting is unverified from here.
- signed-release-assets.md's cosign --certificate-identity-regexp still
names .github/workflows/image-reuse.yaml, which does not exist in this
repo (no .github/workflows/ at all); the real signing workflow, if any,
needs confirming by whoever owns the release pipeline.
- maintaining-internal-cd-forks.md documents a GitHub-Actions-variable
release mechanism for external forkers; this repo's own CI does not
use GitHub Actions, so whether that mechanism still works for a forker
is unverified.
5.3 KiB
Executable File
5.3 KiB
Executable File
GitHub
Parameters
The GitHub notification service changes commit status using GitHub Apps and requires specifying the following settings:
appID- the app idinstallationID- the app installation idprivateKey- the app private keyenterpriseBaseURL- optional URL, e.g. https://git.example.com/api/v3maxIdleConns- optional, maximum number of idle (keep-alive) connections across all hosts.maxIdleConnsPerHost- optional, maximum number of idle (keep-alive) connections per host.maxConnsPerHost- optional, maximum total connections per host.idleConnTimeout- optional, maximum amount of time an idle (keep-alive) connection will remain open before closing.
⚠️ NOTE: Specifying
/api/v3in theenterpriseBaseURLis currently required.
Configuration
- Create a GitHub Apps using https://github.com/settings/apps/new
- Change repository permissions to enable write commit statuses and/or deployments and/or pull requests comments

- Generate a private key, and download it automatically

- Install app to account
- Store privateKey in
cd-notifications-secretSecret and configure GitHub integration incd-notifications-cmConfigMap
apiVersion: v1
kind: ConfigMap
metadata:
name: cd-notifications-cm
data:
service.github: |
appID: <app-id>
installationID: <installation-id>
privateKey: $github-privateKey
apiVersion: v1
kind: Secret
metadata:
name: <secret-name>
stringData:
github-privateKey: |
-----BEGIN RSA PRIVATE KEY-----
(snip)
-----END RSA PRIVATE KEY-----
- Create subscription for your GitHub integration
apiVersion: apps.hanzo.ai/v1alpha1
kind: Application
metadata:
annotations:
notifications.apps.hanzo.ai/subscribe.<trigger-name>.github: ""
Templates
template.app-deployed: |
message: |
Application {{.app.metadata.name}} is now running new version of deployments manifests.
github:
repoURLPath: "{{.app.spec.source.repoURL}}"
revisionPath: "{{.app.status.operationState.syncResult.revision}}"
status:
state: success
label: "continuous-delivery/{{.app.metadata.name}}"
targetURL: "{{.context.cdUrl}}/applications/{{.app.metadata.name}}?operation=true"
deployment:
state: success
environment: production
environmentURL: "https://{{.app.metadata.name}}.example.com"
logURL: "{{.context.cdUrl}}/applications/{{.app.metadata.name}}?operation=true"
requiredContexts: []
autoMerge: true
transientEnvironment: false
reference: v1.0.0
pullRequestComment:
content: |
Application {{.app.metadata.name}} is now running new version of deployments manifests.
See more here: {{.context.cdUrl}}/applications/{{.app.metadata.name}}?operation=true
commentTag: "continuous-delivery/{{.app.metadata.name}}"
checkRun:
name: "continuous-delivery/{{.app.metadata.name}}"
details_url: "{{.context.cdUrl}}/applications/{{.app.metadata.name}}?operation=true"
status: completed
conclusion: success
started_at: "YYYY-MM-DDTHH:MM:SSZ"
completed_at: "YYYY-MM-DDTHH:MM:SSZ"
output:
title: "Deployment of {{.app.metadata.name}} on Hanzo CD"
summary: "Application {{.app.metadata.name}} is now running new version of deployments manifests."
text: |
Application {{.app.metadata.name}} is now running new version of deployments manifests.
See more here: {{.context.cdUrl}}/applications/{{.app.metadata.name}}?operation=true
Notes:
- If the message is set to 140 characters or more, it will be truncated.
- If
github.repoURLPathandgithub.revisionPathare same as above, they can be omitted. - Automerge is optional and
trueby default for github deployments to ensure the requested ref is up-to-date with the default branch. Setting this option tofalseis required if you would like to deploy older refs in your default branch. For more information see the GitHub Deployment API Docs. - If
github.pullRequestComment.contentis set to 65536 characters or more, it will be truncated. - The
github.pullRequestComment.commentTagparameter is used to identify the comment. If a comment with the specified tag is found, it will be updated (upserted). If no comment with the tag is found, a new comment will be created. - Reference is optional. When set, it will be used as the ref to deploy. If not set, the revision will be used as the ref to deploy.
Commit Statuses
The method for generating commit statuses allows a maximum of 1000 attempts using the same commit SHA and context. Once this limit is reached, the API returns validation errors (HTTP 422). The notification engine ignores these errors and marks the notification attempts as completed.
