From 94ecca4f1000477f5130919952d1a12270444fa2 Mon Sep 17 00:00:00 2001 From: Glenn Oppegard Date: Mon, 9 Jan 2023 10:51:57 -0700 Subject: [PATCH] Fix .m2/ perms on Jenkins --- scripts/deploy-snapshot.sh | 2 +- scripts/release.sh | 2 +- scripts/test.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/deploy-snapshot.sh b/scripts/deploy-snapshot.sh index 019cb49..51d8c54 100755 --- a/scripts/deploy-snapshot.sh +++ b/scripts/deploy-snapshot.sh @@ -11,7 +11,7 @@ REPO_DIR=$(git rev-parse --show-toplevel) cd "$REPO_DIR" sudo chmod 666 /var/run/docker.sock -mkdir -p "$WORKSPACE_TMP/.m2" +mkdir -p "$WORKSPACE_TMP/.m2" && chown -R "$(whoami)" "$WORKSPACE_TMP/.m2" # Credentials for publishing to repo.spring.io M2_SETTINGS_PATH="${M2_SETTINGS_SPRINGIO_XML}" diff --git a/scripts/release.sh b/scripts/release.sh index bd3d069..7a71419 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -12,7 +12,7 @@ REPO_DIR=$(git rev-parse --show-toplevel) cd "$REPO_DIR" sudo chmod 666 /var/run/docker.sock -mkdir -p "$WORKSPACE_TMP/.m2" +mkdir -p "$WORKSPACE_TMP/.m2" && chown -R "$(whoami)" "$WORKSPACE_TMP/.m2" if [ "${RELEASE_TYPE}" = "milestone" ]; then # Credentials for publishing Milestones/RCs to repo.spring.io diff --git a/scripts/test.sh b/scripts/test.sh index 21244ed..d57b54b 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -11,7 +11,7 @@ REPO_DIR=$(git rev-parse --show-toplevel) cd "$REPO_DIR" sudo chmod 666 /var/run/docker.sock -mkdir -p "$WORKSPACE_TMP/.m2" +mkdir -p "$WORKSPACE_TMP/.m2" && chown -R "$(whoami)" "$WORKSPACE_TMP/.m2" DOCKER_NAME="${JOB_NAME}-${BUILD_NUMBER}" docker run -t --rm --name "$DOCKER_NAME" -u 1000:1000 \