[glib: 4/5] ci: Add "--push" argument to run-docker.sh help script
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/5] ci: Add "--push" argument to run-docker.sh help script
- Date: Fri, 22 Jun 2018 17:21:17 +0000 (UTC)
commit ca2fc30dea08268fbeb36c395f8a0c394fe0b712
Author: Xavier Claessens <xavier claessens collabora com>
Date: Fri Jun 22 11:24:24 2018 -0400
ci: Add "--push" argument to run-docker.sh help script
Also there is no need to run docker as root, the user just needs to be
in the "docker" group.
.gitlab-ci/run-docker.sh | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
index 19a670cae..aeb878c9e 100755
--- a/.gitlab-ci/run-docker.sh
+++ b/.gitlab-ci/run-docker.sh
@@ -4,8 +4,14 @@ set -e
TAG="registry.gitlab.gnome.org/gnome/glib/master:v4"
-sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
+docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
--file "Dockerfile" .
-sudo docker run --rm \
- --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
- --tty --interactive "${TAG}" bash
+
+if [ "$1" = "--push" ]; then
+ docker login registry.gitlab.gnome.org
+ docker push $TAG
+else
+ docker run --rm \
+ --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
+ --tty --interactive "${TAG}" bash
+fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]