summaryrefslogtreecommitdiff
path: root/contrib/gate/entrypoint.sh
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-11-13 09:03:10 -0800
committerGitHub <noreply@github.com>2018-11-13 09:03:10 -0800
commitdd42c1dcffde9628285b4a4ee6d92bca01f3436c (patch)
treefb0dc9132bb7e1278a5c44ea4ca027f651820f0d /contrib/gate/entrypoint.sh
parent50d3199334a4cc834029bff8d7e256348daf19be (diff)
parent86d1196f9b30149fa937f7c6680d951c5e4ac997 (diff)
downloadpodman-dd42c1dcffde9628285b4a4ee6d92bca01f3436c.tar.gz
podman-dd42c1dcffde9628285b4a4ee6d92bca01f3436c.tar.bz2
podman-dd42c1dcffde9628285b4a4ee6d92bca01f3436c.zip
Merge pull request #1804 from cevich/lint_verify_image
Standardized container image for gofmt and lint
Diffstat (limited to 'contrib/gate/entrypoint.sh')
-rwxr-xr-xcontrib/gate/entrypoint.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/gate/entrypoint.sh b/contrib/gate/entrypoint.sh
new file mode 100755
index 000000000..e16094cc0
--- /dev/null
+++ b/contrib/gate/entrypoint.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+[[ -n "$SRCPATH" ]] || \
+ ( echo "ERROR: \$SRCPATH must be non-empty" && exit 1 )
+[[ -n "$GOSRC" ]] || \
+ ( echo "ERROR: \$GOSRC must be non-empty" && exit 2 )
+[[ -r "${SRCPATH}/contrib/gate/Dockerfile" ]] || \
+ ( echo "ERROR: Expecting libpod repository root at $SRCPATH" && exit 3 )
+
+# Working from a copy avoids needing to perturb the actual source files
+mkdir -p "$GOSRC"
+/usr/bin/rsync --recursive --links --quiet --safe-links \
+ --perms --times "${SRCPATH}/" "${GOSRC}/"
+cd "$GOSRC"
+make "$@"