Skip to content

Commit

Permalink
jjb: ensure /log files are writable for deletion
Browse files Browse the repository at this point in the history
Bazel output of the action that compiles `DumpPlatformClassPath` is
written in a non -writable directory. When we wipe the `log` directory
with `find log/ --delete` that results in:

/usr/bin/find: cannot delete ‘/workspace/log/execroot/eventsWikimedia
 /bazel-out/k8-fastbuild/bin/external/bazel_tools/tools/jdk
 /platformclasspath_classes/DumpPlatformClassPath.class’: Permission denied

Unconditionally create the `log` directory and ensure all files are
writables before deletion.

Update gerrit-events-wikimedia-bazel-docker

Bazel issue bazelbuild/bazel#15616

Bug: T320251
Change-Id: Ia6dafa3e9bacd81c03e9ec35644c8a2893368e03
  • Loading branch information
hashar committed Jan 5, 2023
1 parent 444d7f7 commit be555e8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions jjb/job-templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@
builders:
- docker-castor-load
- docker-src-dir

# Ensure /log files are writable before deleting - T320251
- shell: |
mkdir -m 2777 -p "log"
- docker-run:
image: docker-registry.wikimedia.org/buster:latest
entrypoint: /bin/chmod
options: >-
--volume "$WORKSPACE/log":/log
args: >-
-R u+w /log
- docker-log-dir
- docker-ci-src-setup-simple
- docker-run-with-log-cache-src:
Expand Down

0 comments on commit be555e8

Please sign in to comment.