GitXplorerGitXplorer
h

ksnotify

public
9 stars
2 forks
2 issues

Commits

List of commits on branch main.
Verified
e247a9c00be555e8268cb1bb120f1a0eec3fcceb

feat: search notes of MR up to 300 (#44)

kkitagry committed 7 months ago
Verified
31739c760bb14c50ba67e5f0594d4bf682743ec2

fix typo (#43)

hhirosassa committed 8 months ago
Verified
bc0da2ccafda39691df0beb4eef07fdf1d36ad5a

fix release ci (#42)

hhirosassa committed 8 months ago
Verified
b6950e2ade3fbd5b9b7f1831c6af9b0f41e97e70

Separate change kinds (#41)

kkitagry committed 8 months ago
Verified
b954a74aaf7931532efa4a6f393a036c6bca8fd6

add delimiter (#40)

mmski-iksm committed 10 months ago
Verified
53b7216775b3cf64e78e0f61afe5a1daf03c18b1

feat: add ignore tag images option (#39)

kkitagry committed 10 months ago

README

The README file for this repository.

ksnotify

build codecov License: MIT

A CLI command to parse kubectl diff result and notify it to GitLab

What ksnotify does

  1. Parse the execution result of kubectl diff
  2. Notify it to GitLab

The comment posted by ksnotify is as follows:


Plan result

CI link

  • updated
    • apps.v1.Deployment.test.test-app
Details (Click me)

apps.v1.Deployment.jasmine.test-app

 @@ -5,7 +5,6 @@
     deployment.kubernetes.io/revision: "3"
+  labels:
+    app: test-app
   name: test-app
   namespace: test
 spec:
@@ -27,7 +26,6 @@
       creationTimestamp: null
       labels:
         app: test-app
-        skaffold.dev/run-id: 1234
     spec:
       containers:
       - args:

Install

GitHub Releases

Download the prebuilt binary from GitHub Releases and install it to $PATH.

aqua

Install ksnotify with aqua, which is a declarative CLI Version Manager.

$ aqua g -i hirosassa/ksnotify

Usage

prerequisites

Create and export GitLab access token to environmental variables as follows:

export KSNOTIFY_GITLAB_TOKEN="xxxxxx"

ref: Project access tokens | GitLab

Post diff results to GitLab

Basic usage is as follows:

skaffold render -p dev | kubectl diff -f - 2> /dev/null | | ksnotify --notifier gitlab --ci gitlab

If you want to update existing comment instead of create a new comment, you should add --patch flag like

skaffold render -p dev | kubectl diff -f - 2> /dev/null | | ksnotify --notifier gitlab --ci gitlab --patch

To suppress skaffold labels like skaffold.dev/run-id: 1234 automatically added by skaffold, you should add --suppress-skaffold flag like

skaffold render -p dev | kubectl diff -f - 2> /dev/null | | ksnotify --notifier gitlab --ci gitlab --suppress-skaffold

The concrete example of GitLab CI configuration is shown in example.

For developers

To run ksnotify locally, use local option for debug. For local mode, ksnotify just renders contents on stdout.

skaffold render -p dev | kubectl diff -f - 2> /dev/null | ~/Dev/ksnotify/ksnotify --ci local --notifier gitlab --suppress-skaffold

> ## Plan result
> [CI link](  )
>
> * updated
> blah
> blah