Skip to content

Commit c121e69

Browse files
committed
Provide permissions to modify dependabot-core directory
- The dependaot user in jenkins currently cannot create directories inside tmp - Provide access to create directories inside all of dependabot-core
1 parent 4dc09d7 commit c121e69

File tree

11 files changed

+12
-85
lines changed

11 files changed

+12
-85
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ vendor
3030
coverage/
3131
.ruby-gemset
3232
.ruby-version
33+
/.ssh

bin/docker-execute

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,7 @@ docker run -dit \
220220
-v "$(pwd)/omnibus/lib:$CODE_DIR/omnibus/lib" \
221221
-v "$(pwd)/omnibus/spec:$CODE_DIR/omnibus/spec" \
222222
-v "$(pwd)/omnibus/script:$CODE_DIR/omnibus/script" \
223-
-v "$(pwd)/tmp:/$CODE_DIR/tmp" \
224-
-v "${HOME}/.ssh:/home/dependabot/.ssh" \
223+
-v "$(pwd)/tmp:/$CODE_DIR/tmp" \
225224
--name "$CONTAINER_NAME" \
226225
-e SSH_AUTH_SOCK=$SSH_AUTH_SOCK \
227226
-e PACKAGE_NAME=$PACKAGE_NAME \
@@ -233,7 +232,13 @@ docker run -dit \
233232
"$IMAGE_NAME" "${CONTAINER_ARGS[@]}"
234233

235234
#docker exec ${CONTAINER_NAME} bash -c 'echo $SSH_AUTH_SOCK'
236-
docker exec ${CONTAINER_NAME} bash -c 'eval $(ssh-agent);
235+
236+
#docker exec ${CONTAINER_NAME} bash -c 'chmod dependabot:dependabot /home/dependabot/dependabot-core/tmp';
237+
docker exec ${CONTAINER_NAME} bash -c 'ls -ald /home/dependabot/dependabot-core/tmp;
238+
ls -ald /home/dependabot/dependabot-core;
239+
whoami;
240+
chmod 777 /home/dependabot/dependabot-core;
241+
eval $(ssh-agent);
237242
for c in $(ssh -p 29418 [email protected] gerrit query --current-patch-set project:${REPO_NAME} branch:feature/dependabot | grep revision | tr -s " " | cut -d " " -f 3); \
238243
239244
do ssh -p 29418 [email protected] gerrit review $c --abandon; \

bin/dry-run.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,13 +515,13 @@ def handle_dependabot_error(error:, dependency:)
515515

516516
# checkout to feature branch so that all commits are made in this branch.
517517
Dir.chdir($repo_contents_path) do
518-
518+
519519

520520
system("git checkout -b feature/dependabot")
521521
system("git merge --no-ff --no-commit origin/master")
522522
system("mkdir .github")
523523
# system("git commit -m ")
524-
524+
525525
end
526526

527527
# Dir.chdir("tmp/aadhar/.github") do

common/lib/dependabot/file_fetchers/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ def _clone_repo_contents(target_directory:)
518518
br_opt = " --branch #{source.branch} --single-branch" if source.branch
519519
SharedHelpers.run_shell_command(
520520
<<~CMD
521-
git clone --no-tags ssh://gerrit/#{source.repo}.git #{path}
521+
git clone --no-tags ssh://gerrit.helpshift.com/#{source.repo}.git #{path}
522522
523523
CMD
524524
)

ssh/config

Lines changed: 0 additions & 17 deletions
This file was deleted.

ssh/id_rsa

Lines changed: 0 additions & 39 deletions
This file was deleted.

ssh/id_rsa.pub

Lines changed: 0 additions & 1 deletion
This file was deleted.

ssh/known_hosts

Lines changed: 0 additions & 10 deletions
This file was deleted.

ssh/known_hosts.old

Lines changed: 0 additions & 3 deletions
This file was deleted.

ssh/podman-machine-default

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)