From c0392f596b8e50b05cf896a8b1707d70614120c7 Mon Sep 17 00:00:00 2001 From: Yoshiki Fujikane Date: Thu, 7 Nov 2024 15:39:15 +0900 Subject: [PATCH] Update RELEASE and docs to v0.49.3 Signed-off-by: Yoshiki Fujikane --- RELEASE | 2 +- .../user-guide/command-line-tool.md | 2 ++ .../docs-v0.49.x/user-guide/event-watcher.md | 32 +++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/RELEASE b/RELEASE index 8ac900219f..87c93577a4 100644 --- a/RELEASE +++ b/RELEASE @@ -1,6 +1,6 @@ # Generated by `make release` command. # DO NOT EDIT. -tag: v0.49.2 +tag: v0.49.3 releaseNoteGenerator: showCommitter: false diff --git a/docs/content/en/docs-v0.49.x/user-guide/command-line-tool.md b/docs/content/en/docs-v0.49.x/user-guide/command-line-tool.md index 66615fa6fd..5133fbc0de 100644 --- a/docs/content/en/docs-v0.49.x/user-guide/command-line-tool.md +++ b/docs/content/en/docs-v0.49.x/user-guide/command-line-tool.md @@ -328,6 +328,8 @@ pipectl event register \ --data=gcr.io/pipecd/example:v0.1.0 ``` +See more on [usage of Event Watcher](./event-watcher.md). + ### Encrypting the data you want to use when deploying Encrypt the plaintext entered either in stdin or via the `--input-file` flag. diff --git a/docs/content/en/docs-v0.49.x/user-guide/event-watcher.md b/docs/content/en/docs-v0.49.x/user-guide/event-watcher.md index b24c63e67a..3af7adf3b5 100644 --- a/docs/content/en/docs-v0.49.x/user-guide/event-watcher.md +++ b/docs/content/en/docs-v0.49.x/user-guide/event-watcher.md @@ -165,6 +165,38 @@ pipectl event register \ Note that it is considered a match only when labels are an exact match. +### [optional] Using contexts + +You can also attach additional metadata to the event. +This information can be added as a trailer to the git commit when Event Watcher using the GIT_UPDATE handler. +This can be useful when attaching information from the source code repository to the manifest repository. + +For example, you can attach the source code commit link to the manifest repository. + +```bash +pipectl event register \ + --address=CONTROL_PLANE_API_ADDRESS \ + --api-key=API_KEY \ + --name=sample \ + --data=gcr.io/pipecd/helloworld:v0.48.0 \ + --contexts Source-Commit-Hash=xxxxxxx,Source-Commit-URL=https://github.com/pipe-cd/pipecd/commit/xxxxxxx +``` + +```bash +# In manifest repository +$ git show +commit ff46cdc9a3ce87a9a66436269251a4870ac55183 (HEAD -> main, origin/main, origin/HEAD) +Author: ffjlabo +Date: Wed Oct 30 16:56:36 2024 +0900 + + Replace values with "gcr.io/pipecd/helloworld:v0.48.0" set by Event "simple" + + Source-Commit-Hash: xxxxxxx + Source-Commit-URL: https://github.com/pipe-cd/pipecd/commit/xxxxxxx +``` + +![](/images/event-watcher-contexts.png) + ## Examples Suppose you want to update your configuration file after releasing a new Helm chart.