Skip to content

Commit 0a2d096

Browse files
committed
Assign value to PRIV_KEY env variable
The content of Private key stored in ~/.ssh/gerrit is stored in an environment variable PRIV_KEY which is then passed to the container.
1 parent b42915f commit 0a2d096

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bin/docker-execute

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ REPO_NAME=$1
1212
PACKAGE_NAME=$2
1313
HELP=false
1414
REBUILD=false
15+
PRIVKEY==$(cat $HOME/.ssh/gerrit)
1516

1617
echo "package: $2"
1718
echo "Image: $IMAGE_NAME"
1819
echo "UID: $(id -u)"
1920
echo "GID: $(id -g)"
21+
echo "PRIV KEY : $PRIVKEY"
2022
# Enable docker buildkit with inline cache builds
2123
export DOCKER_BUILDKIT=1
2224

@@ -229,6 +231,7 @@ docker run --privileged=true -dit \
229231
-e PACKAGE_NAME=$PACKAGE_NAME \
230232
-e REPO_NAME=$REPO_NAME \
231233
-e SSH_KEY=$SSH_KEY \
234+
-e PRIVKEY=$PRIVKEY \
232235
--env "LOCAL_GITHUB_ACCESS_TOKEN=$LOCAL_GITHUB_ACCESS_TOKEN" \
233236
"${DOCKER_OPTS[@]}" \
234237
--cap-add=SYS_PTRACE \

0 commit comments

Comments
 (0)