forked from containers/podman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cirrus: Fix ownership of repos. to keep git happy
Newer versions of git are much more pedantic about who owns the repository files. When setting up to run rootless, prior to this commit, the repo. ownership was changed from root. This causes all subsequent git-operations as root to fail: ``` fatal: unsafe repository ('<$GOSRC>' is owned by someone else) ``` Fix this by re-ordering operations, such that the change in ownership is done immediately before executing as a user. Also disable the git-ownership check on the source repository assuming the CI environment is disposable. Signed-off-by: Chris Evich <[email protected]>
- Loading branch information
Showing
3 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,8 @@ cp hack/podman-registry /bin | |
_gc='git config --file /root/.gitconfig' | ||
$_gc user.email "[email protected]" | ||
$_gc user.name "Testy McTestface" | ||
# Bypass git safety/security checks when operating in a throwaway environment | ||
git config --system --add safe.directory $GOSRC | ||
|
||
# Ensure that all lower-level contexts and child-processes have | ||
# ready access to higher level orchestration (e.g Cirrus-CI) | ||
|
@@ -304,6 +306,9 @@ case "$TEST_FLAVOR" in | |
# Guarantee the docker daemon can't be started, even by accident | ||
rm -vf $(type -P dockerd) | ||
|
||
msg "Recursively chowning source to $ROOTLESS_USER" | ||
chown -R $ROOTLESS_USER:$ROOTLESS_USER "$GOPATH" "$GOSRC" | ||
|
||
msg "Obtaining necessary gitlab-runner testing bits" | ||
slug="gitlab.com/gitlab-org/gitlab-runner" | ||
helper_fqin="registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-latest-pwsh" | ||
|