mirror of
https://github.com/containers/podman.git
synced 2025-05-21 09:05:56 +08:00
Cirrus: Reuse shared clone script on Mac
The `Makefile` makes assumptions about git repo. clone details. Because fixing the `Makefile` would likely be problematic, fix the clone operation used on the Mac so that it matches what's used on Linux. Also, simplify git repo clone operations. At some point in the distant past, a git identity was required for CI to function properly. That has since changed, so remove the unnecessary complexities. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -133,6 +133,7 @@ build_task:
|
|||||||
# the 'origin' remote must be defined, and all remote branches/tags
|
# the 'origin' remote must be defined, and all remote branches/tags
|
||||||
# must be available for reference from CI scripts.
|
# must be available for reference from CI scripts.
|
||||||
clone_script: &full_clone |
|
clone_script: &full_clone |
|
||||||
|
set -exuo pipefail
|
||||||
cd /
|
cd /
|
||||||
rm -rf $CIRRUS_WORKING_DIR
|
rm -rf $CIRRUS_WORKING_DIR
|
||||||
mkdir -p $CIRRUS_WORKING_DIR
|
mkdir -p $CIRRUS_WORKING_DIR
|
||||||
@ -145,10 +146,6 @@ build_task:
|
|||||||
else
|
else
|
||||||
git reset --hard $CIRRUS_CHANGE_IN_REPO
|
git reset --hard $CIRRUS_CHANGE_IN_REPO
|
||||||
fi
|
fi
|
||||||
# Some test operations & checks require a git "identity"
|
|
||||||
_gc='git config --file /root/.gitconfig'
|
|
||||||
$_gc user.email "TMcTestFace@example.com"
|
|
||||||
$_gc user.name "Testy McTestface"
|
|
||||||
# Attempt to prevent flakes by confirming basic environment expectations,
|
# Attempt to prevent flakes by confirming basic environment expectations,
|
||||||
# network service connectivity and essential container image availability.
|
# network service connectivity and essential container image availability.
|
||||||
prebuild_script: &prebuild $SCRIPT_BASE/prebuild.sh
|
prebuild_script: &prebuild $SCRIPT_BASE/prebuild.sh
|
||||||
@ -462,6 +459,7 @@ osx_alt_build_task:
|
|||||||
GOCACHE: "$CIRRUS_WORKING_DIR/.go/cache"
|
GOCACHE: "$CIRRUS_WORKING_DIR/.go/cache"
|
||||||
GOENV: "$CIRRUS_WORKING_DIR/.go/support"
|
GOENV: "$CIRRUS_WORKING_DIR/.go/support"
|
||||||
GOSRC: "$HOME/ci/task-${CIRRUS_TASK_ID}"
|
GOSRC: "$HOME/ci/task-${CIRRUS_TASK_ID}"
|
||||||
|
clone_script: *full_clone
|
||||||
# This host is/was shared with potentially many other CI tasks.
|
# This host is/was shared with potentially many other CI tasks.
|
||||||
# The previous task may have been canceled or aborted.
|
# The previous task may have been canceled or aborted.
|
||||||
prep_script: &mac_cleanup "contrib/cirrus/mac_cleanup.sh"
|
prep_script: &mac_cleanup "contrib/cirrus/mac_cleanup.sh"
|
||||||
|
@ -31,3 +31,10 @@ echo "TMPDIR=/private/tmp/ci" >> $CIRRUS_ENV
|
|||||||
|
|
||||||
# Removed completely during cleanup.
|
# Removed completely during cleanup.
|
||||||
mkdir -p /private/tmp/ci
|
mkdir -p /private/tmp/ci
|
||||||
|
|
||||||
|
# Some test operations & checks require a git "identity"
|
||||||
|
# N/B: $HOME in this context does not include the /ci part automatically
|
||||||
|
# (see above) but it will when the next Cirrus-CI "_script" section
|
||||||
|
# takes over.
|
||||||
|
git config --file "$HOME/ci/.gitconfig" \
|
||||||
|
--add safe.directory $CIRRUS_WORKING_DIR
|
||||||
|
@ -40,12 +40,8 @@ done
|
|||||||
|
|
||||||
cp hack/podman-registry /bin
|
cp hack/podman-registry /bin
|
||||||
|
|
||||||
# Some test operations & checks require a git "identity"
|
|
||||||
_gc='git config --file /root/.gitconfig'
|
|
||||||
showrun $_gc user.email "TMcTestFace@example.com"
|
|
||||||
showrun $_gc user.name "Testy McTestface"
|
|
||||||
# Bypass git safety/security checks when operating in a throwaway environment
|
# Bypass git safety/security checks when operating in a throwaway environment
|
||||||
showrun git config --system --add safe.directory $GOSRC
|
showrun git config --global --add safe.directory $GOSRC
|
||||||
|
|
||||||
# Ensure that all lower-level contexts and child-processes have
|
# Ensure that all lower-level contexts and child-processes have
|
||||||
# ready access to higher level orchestration (e.g Cirrus-CI)
|
# ready access to higher level orchestration (e.g Cirrus-CI)
|
||||||
|
Reference in New Issue
Block a user