mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-27 09:44:20 +00:00
abuild: rootbld: reflect build branch in the builder hostname
This commit is contained in:
parent
4736a56c8e
commit
545eed3a24
16
abuild.in
16
abuild.in
@ -2078,6 +2078,12 @@ rootbld() {
|
|||||||
cp /etc/abuild.conf /etc/group /etc/passwd "$BUILD_ROOT/etc"
|
cp /etc/abuild.conf /etc/group /etc/passwd "$BUILD_ROOT/etc"
|
||||||
cp /etc/apk/keys/* "$BUILD_ROOT/etc/apk/keys"
|
cp /etc/apk/keys/* "$BUILD_ROOT/etc/apk/keys"
|
||||||
|
|
||||||
|
local version="edge" buildhost="edge" gitref
|
||||||
|
if gitref="$(expr "$(git symbolic-ref --short HEAD)" : '\([0-9]\+\(\.[0-9]\+\)*\)-')"; then
|
||||||
|
version=v${gitref}
|
||||||
|
buildhost=${gitref/./-}
|
||||||
|
fi
|
||||||
|
|
||||||
local repo_template=$aportsgit/$repo/.rootbld-repositories
|
local repo_template=$aportsgit/$repo/.rootbld-repositories
|
||||||
[ -s "$repo_template" ] || die "rootbld: $repo_template does not exist"
|
[ -s "$repo_template" ] || die "rootbld: $repo_template does not exist"
|
||||||
(
|
(
|
||||||
@ -2090,14 +2096,6 @@ rootbld() {
|
|||||||
export mirror version
|
export mirror version
|
||||||
[ "$mirror" ] || mirror=http://dl-cdn.alpinelinux.org/alpine
|
[ "$mirror" ] || mirror=http://dl-cdn.alpinelinux.org/alpine
|
||||||
|
|
||||||
if [ -z "$version" ]; then
|
|
||||||
version=$(git symbolic-ref --short HEAD)
|
|
||||||
[ "$version" ] && \
|
|
||||||
version=$(expr "$version" : '\([0-9]\+\(\.[0-9]\+\)*\)-') && \
|
|
||||||
version=v${version}
|
|
||||||
[ "$version" ] || version=edge
|
|
||||||
fi
|
|
||||||
|
|
||||||
envsubst
|
envsubst
|
||||||
echo "$REPODEST/$repo"
|
echo "$REPODEST/$repo"
|
||||||
) < "$repo_template" > "$BUILD_ROOT/etc/apk/repositories"
|
) < "$repo_template" > "$BUILD_ROOT/etc/apk/repositories"
|
||||||
@ -2119,7 +2117,7 @@ rootbld() {
|
|||||||
--bind "$BUILD_ROOT/tmp/pkg" "$pkgbasedir" \
|
--bind "$BUILD_ROOT/tmp/pkg" "$pkgbasedir" \
|
||||||
--bind "$BUILD_ROOT/tmp" /tmp \
|
--bind "$BUILD_ROOT/tmp" /tmp \
|
||||||
--bind "$REPODEST" "$REPODEST" \
|
--bind "$REPODEST" "$REPODEST" \
|
||||||
--hostname "build-edge-$CARCH" \
|
--hostname "build-$buildhost-$CARCH" \
|
||||||
--chdir "$startdir" \
|
--chdir "$startdir" \
|
||||||
--setenv PATH /bin:/usr/bin:/sbin:/usr/sbin \
|
--setenv PATH /bin:/usr/bin:/sbin:/usr/sbin \
|
||||||
/usr/bin/abuild $force rootbld_actions
|
/usr/bin/abuild $force rootbld_actions
|
||||||
|
Loading…
Reference in New Issue
Block a user