From 4494b662a11555b1b3dff9fe184951c6284eda54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20S=C4=99k?= Date: Sun, 19 Jan 2020 01:41:16 +0100 Subject: [PATCH] Fix travis --- .travis.yml | 3 +-- backup/pvc/Dockerfile | 5 +++-- backup/pvc/Makefile | 2 +- backup/pvc/config.env | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b2d5b2c..ff5bd125 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,7 @@ jobs: - stage: pvc_e2e name: "Backup PVC - e2e" script: - - travis_wait 10 chmod -R 777 backup/pvc/e2e - - travis_wait 10 make -C backup/pvc/ docker-e2e + - travis_wait 10 make -C backup/pvc/ docker-e2e UID=$(id -u) GID=$(id -g) - stage: e2e name: "Jenkins Operator - e2e" script: diff --git a/backup/pvc/Dockerfile b/backup/pvc/Dockerfile index 3f4ebbc5..c562aab4 100644 --- a/backup/pvc/Dockerfile +++ b/backup/pvc/Dockerfile @@ -1,8 +1,9 @@ FROM debian:buster-slim +ARG UID +ARG GID + ENV USER=user -ENV UID=1000 -ENV GID=1000 RUN addgroup --gid "$GID" "$USER" && \ adduser \ diff --git a/backup/pvc/Makefile b/backup/pvc/Makefile index eb8faad2..7a187f28 100644 --- a/backup/pvc/Makefile +++ b/backup/pvc/Makefile @@ -83,7 +83,7 @@ docker-login: ## Log in into the Docker repository .PHONY: docker-build docker-build: check-env ## Build the container @echo "+ $@" - docker build . -t $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) --file Dockerfile + docker build . --build-arg UID=$(UID) --build-arg GID=$(GID) -t $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) --file Dockerfile .PHONY: docker-images docker-images: ## List all local containers diff --git a/backup/pvc/config.env b/backup/pvc/config.env index 901674a9..c2cfd97d 100644 --- a/backup/pvc/config.env +++ b/backup/pvc/config.env @@ -1,4 +1,6 @@ # Setup variables for the Makefile NAME=pvc DOCKER_ORGANIZATION=virtuslab -DOCKER_REGISTRY=jenkins-operator-backup \ No newline at end of file +DOCKER_REGISTRY=jenkins-operator-backup +UID=1000 +GID=1000 \ No newline at end of file