Last active
November 29, 2019 08:34
-
-
Save olblak/fcc6b6074bbbe6d048e7b34d99741e87 to your computer and use it in GitHub Desktop.
release automation tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
tagname = "https://api.github.com/repos/jenkins-infra/plugin-site-api/releases/latest".tag_name, | |
if not tagname in "https://hub.docker.com/v2/repositories/jenkinsciinfra/plugin-site/tags?page_size=1000" { | |
docker build -t jenkinsinfra/pluginsite:$tagname | |
docker push | |
} | |
if tagname != "https://github.com/jenkins-infra/charts/blob/master/charts/plugin-site/values.yaml".image.repository | |
update yaml file "https://github.com/jenkins-infra/charts/blob/master/charts/plugin-site/values.yaml" | |
git add https//github.com/jenkins-infra/charts/blob/master/charts/plugin-site/values.yaml | |
git commit https//github.com/jenkins-infra/charts/blob/master/charts/plugin-site/values.yaml | |
git push | |
``` | |
# parameters: | |
* github.org: | |
* github.repository | |
* dockerhub.organisation | |
* dockerhub.repository | |
* version (default to latest) | |
# credentials: | |
git push permission | |
dockerhub credential | |
# const | |
DOCKERHUB_URL: https://hub.docker.com/v2/repositories/${dockerhub.organisation}/${dockerhub.repository}/tags?page_size=1000 | |
GITHUB_URL: https://api.github.com/repos/${github.org}/${github.repository}/releases/latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment