Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmage/git-build-watcher
Trigger a new OpenShift build when a new commit is available
https://github.com/dmage/git-build-watcher
builds git openshift watcher
Last synced: 9 days ago
JSON representation
Trigger a new OpenShift build when a new commit is available
- Host: GitHub
- URL: https://github.com/dmage/git-build-watcher
- Owner: dmage
- License: apache-2.0
- Created: 2020-11-06T21:23:38.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-12T21:23:57.000Z (about 4 years ago)
- Last Synced: 2023-03-24T08:46:21.428Z (over 1 year ago)
- Topics: builds, git, openshift, watcher
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Watcher for OpenShift Builds that use Git sources
`git-build-watcher` is a one-shot tool that initiates a new build for a
BuildConfig when it detects that the latest Git commitish it not built.It is useful in situations in which setting up a webhook is not feasible.
## Usage
git-build-watcher [-n ]
## How it works?
It gets the Git repository URL and the Git reference name from the build
config's `.spec.source.git`.Then it calls `git ls-remote` to get the current commitish for the Git
reference and checks if the latest build has the same commitish in
`.spec.revision.git.commit`.If the build is not found or uses a different commit, this tool triggers a new
build.## How to use it?
This repository contains manifests for a CronJob that runs `git-build-watcher`
every 5 minutes. You can create it for the BuildConfig `MY-BUILDCONFIG` in the
namespace `MY-NAMESPACE` using these commands:```console
$ git clone https://github.com/dmage/git-build-watcher.git
$ cd ./git-build-watcher
$ mkdir ./my-deployment && cat >./my-deployment/kustomization.yaml <