Logo
Explore Help
Sign In
mirrors/ceph-csi
1
0
Fork 0
You've already forked ceph-csi
mirror of https://github.com/ceph/ceph-csi.git synced 2025-06-01 11:26:41 +00:00
Code Issues Packages Projects Releases Wiki Activity
ceph-csi/deploy/checkout-repo.sh

18 lines
335 B
Bash
Raw Normal View History

add scripts and configuration to deploy with Jenkins Job Builder These files make it possible to - build a container image that includes Jenkins Job Builder - store the container image in the OpenShift ImageStream - use the container to validate or deploy the Jenkins Jobs More details about the files are included in the README.md. Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-04-01 13:35:10 +02:00
#!/bin/sh
fail() {
echo "${@}" > /dev/stderr
exit 1
}
[ -n "${GIT_REPO}" ] || fail 'GIT_REPO environment variable not set'
[ -n "${GIT_REF}" ] || fail 'GIT_REF environment variable not set'
# exit in case a command fails
set -e
git init .
git remote add origin "${GIT_REPO}"
git fetch origin "${GIT_REF}"
ci: checkout FETCH_HEAD instead of GIT_REF GIT_REF can point to a ref that it not part of a branch and can not easily be checked out (like a GitHub PR). Checking out FETCH_HEAD after fetching the GIT_REF works. Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-22 11:25:51 +02:00
git checkout FETCH_HEAD
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 20ms Template: 0ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API