Skip to content

Commit

Permalink
Fixed host ownership after container builds
Browse files Browse the repository at this point in the history
Inside of the container build we chown all files to jenkins:jenkins but this results
in the host having incorrect ownership after the run which then causes problems
when CI comes back again to checkout with git.

Fix is to chown back to the local uid/gid regardless of outcome of run.sh (the build).

Ticket: ENT-10474
Changelog: none
  • Loading branch information
craigcomstock committed Aug 18, 2023
1 parent d1b22b0 commit 8f6e1c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/build/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ true "${PACKAGE_UPLOAD_DIRECTORY?undefined}"
true "${PACKAGE_BUILD?undefined}"

c=$(buildah from -v $PWD:/nt docs-revamp-22)
trap "buildah run $c bash -c 'sudo chmod -R a+rwX /nt'; buildah rm $c >/dev/null" EXIT
trap "buildah run $c bash -c 'sudo chown -R root:root /nt; sudo chmod -R a+rwX /nt'; buildah rm $c >/dev/null" EXIT
buildah run $c bash -x documentation/generator/build/main.sh $BRANCH $PACKAGE_JOB $PACKAGE_UPLOAD_DIRECTORY $PACKAGE_BUILD
buildah run $c bash -x documentation/generator/_scripts/_publish.sh $BRANCH

0 comments on commit 8f6e1c0

Please sign in to comment.