arm
Some checks failed
/ mirror (push) Has been skipped
/ build-forgejo-deb (push) Successful in 5m49s
/ multitest-bookworm-lxc (push) Has been cancelled
/ multitest-bullseye-docker (push) Successful in 29s
/ multitest-buster-docker (push) Has been cancelled
/ publish (push) Successful in 22s
Some checks failed
/ mirror (push) Has been skipped
/ build-forgejo-deb (push) Successful in 5m49s
/ multitest-bookworm-lxc (push) Has been cancelled
/ multitest-bullseye-docker (push) Successful in 29s
/ multitest-buster-docker (push) Has been cancelled
/ publish (push) Successful in 22s
This commit is contained in:
parent
3ed9644c60
commit
bcaec4cb84
4 changed files with 331 additions and 346 deletions
121
.ci-make.sh
121
.ci-make.sh
|
@ -6,7 +6,7 @@ CI_VERIFY_RETRY_TIME=120 # How long to wait in seconds before retrying if the pi
|
||||||
CI_VERIFY_RETRY_COUNT=30 # How many times to retry before giving up if the pipeline is pending
|
CI_VERIFY_RETRY_COUNT=30 # How many times to retry before giving up if the pipeline is pending
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"submodule-build")
|
"submodule-build")
|
||||||
cd "$2"
|
cd "$2"
|
||||||
LDFLAGS="$LDFLAGS -X \"code.gitea.io/gitea/modules/setting.StaticRootPath=/usr/share/forgejo\""
|
LDFLAGS="$LDFLAGS -X \"code.gitea.io/gitea/modules/setting.StaticRootPath=/usr/share/forgejo\""
|
||||||
LDFLAGS="$LDFLAGS -X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/forgejo\""
|
LDFLAGS="$LDFLAGS -X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/forgejo\""
|
||||||
|
@ -17,20 +17,21 @@ case "$1" in
|
||||||
mv gitea ../"$3"
|
mv gitea ../"$3"
|
||||||
exit $EXIT_STATUS
|
exit $EXIT_STATUS
|
||||||
;;
|
;;
|
||||||
"submodule-make")
|
"submodule-make")
|
||||||
cd "$2"
|
cd "$2"
|
||||||
shift;shift
|
shift
|
||||||
|
shift
|
||||||
make "$@"
|
make "$@"
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
"actions-prep")
|
"actions-prep")
|
||||||
case "$2" in
|
case "$2" in
|
||||||
"build-forgejo-deb")
|
"build-forgejo-deb")
|
||||||
APREP_APT_EXTRAS="debhelper devscripts sudo retry"
|
APREP_APT_EXTRAS="debhelper devscripts sudo retry"
|
||||||
;;
|
;;
|
||||||
"installtest")
|
"installtest")
|
||||||
APREP_APT_EXTRAS="sudo"
|
APREP_APT_EXTRAS="sudo"
|
||||||
if [ ! "$TEST_DEBIAN_BUSTER" ] ; then
|
if [ ! "$TEST_DEBIAN_BUSTER" ]; then
|
||||||
APREP_APT_EXTRAS="$APREP_APT_EXTRAS retry"
|
APREP_APT_EXTRAS="$APREP_APT_EXTRAS retry"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -44,15 +45,15 @@ case "$1" in
|
||||||
esac
|
esac
|
||||||
EXIT_TOTAL=0
|
EXIT_TOTAL=0
|
||||||
apt update
|
apt update
|
||||||
EXIT_TOTAL=$(($EXIT_TOTAL+$?))
|
EXIT_TOTAL=$(($EXIT_TOTAL + $?))
|
||||||
apt upgrade -y
|
apt upgrade -y
|
||||||
EXIT_TOTAL=$(($EXIT_TOTAL+$?))
|
EXIT_TOTAL=$(($EXIT_TOTAL + $?))
|
||||||
if [ "$APREP_APT_EXTRAS" ] ; then
|
if [ "$APREP_APT_EXTRAS" ]; then
|
||||||
apt install $APREP_APT_EXTRAS -y
|
apt install $APREP_APT_EXTRAS -y
|
||||||
EXIT_TOTAL=$(($EXIT_TOTAL+$?))
|
EXIT_TOTAL=$(($EXIT_TOTAL + $?))
|
||||||
fi
|
fi
|
||||||
ACTIONS_FORGEJOSHA="$(git rev-parse --short=10 HEAD)"
|
ACTIONS_FORGEJOSHA="$(git rev-parse --short=10 HEAD)"
|
||||||
if [ "$GITHUB_REF_TYPE" = "tag" ] ; then
|
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
|
||||||
echo "::set-output name=artifactlabel::$GITHUB_REF_NAME-$ACTIONS_FORGEJOSHA"
|
echo "::set-output name=artifactlabel::$GITHUB_REF_NAME-$ACTIONS_FORGEJOSHA"
|
||||||
else
|
else
|
||||||
echo "::set-output name=artifactlabel::$ACTIONS_FORGEJOSHA"
|
echo "::set-output name=artifactlabel::$ACTIONS_FORGEJOSHA"
|
||||||
|
@ -60,9 +61,9 @@ case "$1" in
|
||||||
echo "::set-output name=forgejosha::$ACTIONS_FORGEJOSHA"
|
echo "::set-output name=forgejosha::$ACTIONS_FORGEJOSHA"
|
||||||
exit $EXIT_TOTAL
|
exit $EXIT_TOTAL
|
||||||
;;
|
;;
|
||||||
"ci-verify")
|
"ci-verify")
|
||||||
RETRY_LOOPS=0
|
RETRY_LOOPS=0
|
||||||
while [ $RETRY_LOOPS -le $CI_VERIFY_RETRY_COUNT ] ; do
|
while [ $RETRY_LOOPS -le $CI_VERIFY_RETRY_COUNT ]; do
|
||||||
RETRY_LOOPS=$(($RETRY_LOOPS + 1))
|
RETRY_LOOPS=$(($RETRY_LOOPS + 1))
|
||||||
CURRENT_COMMIT=$(git submodule status "$2/" | cut -d ' ' -f2)
|
CURRENT_COMMIT=$(git submodule status "$2/" | cut -d ' ' -f2)
|
||||||
CI_VERIFY=$(curl $CI_VERIFY_API/api/v1/repos/$CI_VERIFY_REPO/commits/$CURRENT_COMMIT/status | jq --jsonargs .state)
|
CI_VERIFY=$(curl $CI_VERIFY_API/api/v1/repos/$CI_VERIFY_REPO/commits/$CURRENT_COMMIT/status | jq --jsonargs .state)
|
||||||
|
@ -83,23 +84,23 @@ case "$1" in
|
||||||
done
|
done
|
||||||
exit 255
|
exit 255
|
||||||
;;
|
;;
|
||||||
"download-binary")
|
"download-binary")
|
||||||
if [ "$GITHUB_BASE_REF" ] ; then
|
if [ "$GITHUB_BASE_REF" ]; then
|
||||||
echo "forgejo actions pull request mode"
|
echo "forgejo actions pull request mode"
|
||||||
echo "making sure you didn't break binary builds..."
|
echo "making sure you didn't break binary builds..."
|
||||||
PR_MODE=true
|
PR_MODE=true
|
||||||
fi
|
fi
|
||||||
if [ "$GITHUB_REF_TYPE" = "tag" ] ; then
|
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
|
||||||
echo "INFO: Forgejo Actions mode!"
|
echo "INFO: Forgejo Actions mode!"
|
||||||
CI_COMMIT_TAG="$GITHUB_REF_NAME"
|
CI_COMMIT_TAG="$GITHUB_REF_NAME"
|
||||||
elif [ "$GITHUB_REF_TYPE" = "branch" ] || [ $PR_MODE ] ; then
|
elif [ "$GITHUB_REF_TYPE" = "branch" ] || [ $PR_MODE ]; then
|
||||||
echo "WARNING: Not building a tag! Simulating it..."
|
echo "WARNING: Not building a tag! Simulating it..."
|
||||||
echo "(forgejo actions mode)"
|
echo "(forgejo actions mode)"
|
||||||
echo "(this will test the binary packaging without cutting a tag in the package)"
|
echo "(this will test the binary packaging without cutting a tag in the package)"
|
||||||
echo "Resolving tag..."
|
echo "Resolving tag..."
|
||||||
cd forgejo
|
cd forgejo
|
||||||
CI_COMMIT_TAG_RESOLVE=$(git tag --points-at HEAD)
|
CI_COMMIT_TAG_RESOLVE=$(git tag --points-at HEAD)
|
||||||
if [ ! $CI_COMMIT_TAG_RESOLVE ] ; then
|
if [ ! $CI_COMMIT_TAG_RESOLVE ]; then
|
||||||
echo "Failed to resolve exact tag! Getting as close as we can..."
|
echo "Failed to resolve exact tag! Getting as close as we can..."
|
||||||
git describe --tags HEAD
|
git describe --tags HEAD
|
||||||
FORGEJO_CLOSEST_TAG=$(git describe --tags HEAD --abbrev=0)
|
FORGEJO_CLOSEST_TAG=$(git describe --tags HEAD --abbrev=0)
|
||||||
|
@ -108,15 +109,15 @@ case "$1" in
|
||||||
git remote add experimental $CI_VERIFY_API/$EXPERIMENTAL_REPO
|
git remote add experimental $CI_VERIFY_API/$EXPERIMENTAL_REPO
|
||||||
git fetch experimental --tags
|
git fetch experimental --tags
|
||||||
CI_COMMIT_TAG_RESOLVE=$(git tag --points-at HEAD)
|
CI_COMMIT_TAG_RESOLVE=$(git tag --points-at HEAD)
|
||||||
if [ $CI_COMMIT_TAG_RESOLVE ] ; then
|
if [ $CI_COMMIT_TAG_RESOLVE ]; then
|
||||||
CI_VERIFY_REPO=$EXPERIMENTAL_REPO
|
CI_VERIFY_REPO=$EXPERIMENTAL_REPO
|
||||||
FORGEJO_CLOSEST_TAG=$CI_COMMIT_TAG_RESOLVE
|
FORGEJO_CLOSEST_TAG=$CI_COMMIT_TAG_RESOLVE
|
||||||
echo "Found it! Using experimental tag and downloading binary from $CI_VERIFY_REPO"
|
echo "Found it! Using experimental tag and downloading binary from $CI_VERIFY_REPO"
|
||||||
fi
|
fi
|
||||||
CI_COMMIT_TAG_RESOLVE=$FORGEJO_CLOSEST_TAG
|
CI_COMMIT_TAG_RESOLVE=$FORGEJO_CLOSEST_TAG
|
||||||
echo "Closest existing tag: $CI_COMMIT_TAG_RESOLVE"
|
echo "Closest existing tag: $CI_COMMIT_TAG_RESOLVE"
|
||||||
if [ "$CI_COMMIT_TAG_RESOLVE" != "${CI_COMMIT_TAG_RESOLVE%"-dev"}" ] || [ ! "$CI_COMMIT_TAG_RESOLVE" ] ; then
|
if [ "$CI_COMMIT_TAG_RESOLVE" != "${CI_COMMIT_TAG_RESOLVE%"-dev"}" ] || [ ! "$CI_COMMIT_TAG_RESOLVE" ]; then
|
||||||
if [ $PR_MODE ] ; then
|
if [ $PR_MODE ]; then
|
||||||
echo "I can't figure out which release version of Forgejo to build your PR against."
|
echo "I can't figure out which release version of Forgejo to build your PR against."
|
||||||
echo "Whatever you're trying to do is not yet implemented."
|
echo "Whatever you're trying to do is not yet implemented."
|
||||||
exit 97
|
exit 97
|
||||||
|
@ -129,17 +130,17 @@ case "$1" in
|
||||||
echo "Proceeding with resolved tag: $CI_COMMIT_TAG_RESOLVE"
|
echo "Proceeding with resolved tag: $CI_COMMIT_TAG_RESOLVE"
|
||||||
CI_COMMIT_TAG="$CI_COMMIT_TAG_RESOLVE"
|
CI_COMMIT_TAG="$CI_COMMIT_TAG_RESOLVE"
|
||||||
fi
|
fi
|
||||||
if [ $CI_COMMIT_TAG ] ; then
|
if [ $CI_COMMIT_TAG ]; then
|
||||||
CI_RELEASE_ASSETS=$(curl $CI_VERIFY_API/api/v1/repos/$CI_VERIFY_REPO/releases/tags/$CI_COMMIT_TAG | jq -c '.assets[]' | grep linux-amd64)
|
CI_RELEASE_ASSETS=$(curl $CI_VERIFY_API/api/v1/repos/$CI_VERIFY_REPO/releases/tags/$CI_COMMIT_TAG | jq -c '.assets[]' | grep linux-arm64)
|
||||||
CI_RELEASE_BINARY_URL=$(echo "$CI_RELEASE_ASSETS" | grep linux-amd64\" | jq -r --jsonargs .browser_download_url)
|
CI_RELEASE_BINARY_URL=$(echo "$CI_RELEASE_ASSETS" | grep linux-arm64\" | jq -r --jsonargs .browser_download_url)
|
||||||
CI_RELEASE_SHA256=$(curl $(echo "$CI_RELEASE_ASSETS" | grep linux-amd64.sha256\" | jq -r --jsonargs .browser_download_url) | cut -d ' ' -f1)
|
CI_RELEASE_SHA256=$(curl $(echo "$CI_RELEASE_ASSETS" | grep linux-arm64.sha256\" | jq -r --jsonargs .browser_download_url) | cut -d ' ' -f1)
|
||||||
wget -nv --content-disposition $CI_RELEASE_BINARY_URL
|
wget -nv --content-disposition $CI_RELEASE_BINARY_URL
|
||||||
DOWNLOAD_SHA256=$(sha256sum forgejo-*-linux-amd64 | cut -d ' ' -f1)
|
DOWNLOAD_SHA256=$(sha256sum forgejo-*-linux-arm64 | cut -d ' ' -f1)
|
||||||
if [ $CI_RELEASE_SHA256 != $DOWNLOAD_SHA256 ] ; then
|
if [ $CI_RELEASE_SHA256 != $DOWNLOAD_SHA256 ]; then
|
||||||
echo "ERROR: Downloaded file didn't match expected SHA256 sum"
|
echo "ERROR: Downloaded file didn't match expected SHA256 sum"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
mv forgejo-*-linux-amd64 $2
|
mv forgejo-*-linux-arm64 $2
|
||||||
chmod +x $2
|
chmod +x $2
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
@ -147,7 +148,7 @@ case "$1" in
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"package-prep")
|
"package-prep")
|
||||||
mkdir deb/forgejo-bin
|
mkdir deb/forgejo-bin
|
||||||
mkdir deb/forgejo-sqlite-bin
|
mkdir deb/forgejo-sqlite-bin
|
||||||
mv forgejo-bin deb/forgejo-bin/forgejo
|
mv forgejo-bin deb/forgejo-bin/forgejo
|
||||||
|
@ -155,56 +156,56 @@ case "$1" in
|
||||||
cp -r forgejo/public deb/public
|
cp -r forgejo/public deb/public
|
||||||
cp -r forgejo/templates deb/templates
|
cp -r forgejo/templates deb/templates
|
||||||
cp -r forgejo/options deb/options
|
cp -r forgejo/options deb/options
|
||||||
if [ -x forgejo-bin-dl ] ; then
|
if [ -x forgejo-bin-dl ]; then
|
||||||
mkdir deb/forgejo-bin-dl
|
mkdir deb/forgejo-bin-dl
|
||||||
mv forgejo-bin-dl deb/forgejo-bin-dl/forgejo
|
mv forgejo-bin-dl deb/forgejo-bin-dl/forgejo
|
||||||
mv deb/.forgejo-bin.install deb/debian/forgejo-bin.install
|
mv deb/.forgejo-bin.install deb/debian/forgejo-bin.install
|
||||||
ln -s forgejo-common.preinst deb/debian/forgejo-bin.preinst
|
ln -s forgejo-common.preinst deb/debian/forgejo-bin.preinst
|
||||||
ln -s forgejo.postinst deb/debian/forgejo-bin.postinst
|
ln -s forgejo.postinst deb/debian/forgejo-bin.postinst
|
||||||
ln -s forgejo.prerm deb/debian/forgejo-bin.prerm
|
ln -s forgejo.prerm deb/debian/forgejo-bin.prerm
|
||||||
echo >> deb/debian/control
|
echo >>deb/debian/control
|
||||||
cat deb/.forgejo-bin.control >> deb/debian/control
|
cat deb/.forgejo-bin.control >>deb/debian/control
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"package-build-deps")
|
"package-build-deps")
|
||||||
cd deb
|
cd deb
|
||||||
mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" --remove
|
mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" --remove
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
"package-build")
|
"package-build")
|
||||||
cd deb
|
cd deb
|
||||||
if [ "$2" = "actions" ] ; then
|
if [ "$2" = "actions" ]; then
|
||||||
PACKAGE_BUILD_EXTRA_ARGS="--no-sign"
|
PACKAGE_BUILD_EXTRA_ARGS="--no-sign"
|
||||||
fi
|
fi
|
||||||
dpkg-buildpackage -b $PACKAGE_BUILD_EXTRA_ARGS
|
dpkg-buildpackage -b $PACKAGE_BUILD_EXTRA_ARGS
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
"package-clean")
|
"package-clean")
|
||||||
rm *dbgsym*.deb || true
|
rm *dbgsym*.deb || true
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"pkg-gen-sha256")
|
"pkg-gen-sha256")
|
||||||
for deb in *.deb ; do
|
for deb in *.deb; do
|
||||||
sha256sum $deb > $deb.sha256
|
sha256sum $deb >$deb.sha256
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
"preview-sha256")
|
"preview-sha256")
|
||||||
for p in *.sha256 ; do
|
for p in *.sha256; do
|
||||||
echo $p
|
echo $p
|
||||||
cat $p
|
cat $p
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
"test-userinst-prep")
|
"test-userinst-prep")
|
||||||
cp ./etc/default/forgejo /etc/default/forgejo
|
cp ./etc/default/forgejo /etc/default/forgejo
|
||||||
mkdir -p /etc/systemd/system/forgejo.service.d
|
mkdir -p /etc/systemd/system/forgejo.service.d
|
||||||
cp ./etc/systemd/system/forgejo.service.d/override.conf /etc/systemd/system/forgejo.service.d/override.conf
|
cp ./etc/systemd/system/forgejo.service.d/override.conf /etc/systemd/system/forgejo.service.d/override.conf
|
||||||
;;
|
;;
|
||||||
"install-run-test")
|
"install-run-test")
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt update
|
apt update
|
||||||
if [ "$2" = "${2#"./forgejo-bin_"}" ] ; then
|
if [ "$2" = "${2#"./forgejo-bin_"}" ]; then
|
||||||
APT_FORGEJO_COMMON_RESOLVE="$(ls -1 ./forgejo-common_*_all.deb)"
|
APT_FORGEJO_COMMON_RESOLVE="$(ls -1 ./forgejo-common_*_all.deb)"
|
||||||
if [ -f "$APT_FORGEJO_COMMON_RESOLVE" ] ; then
|
if [ -f "$APT_FORGEJO_COMMON_RESOLVE" ]; then
|
||||||
APT_FORGEJO_COMMON="./$APT_FORGEJO_COMMON_RESOLVE"
|
APT_FORGEJO_COMMON="./$APT_FORGEJO_COMMON_RESOLVE"
|
||||||
else
|
else
|
||||||
echo "ERR! Unable to find the necessary forgejo-common package!"
|
echo "ERR! Unable to find the necessary forgejo-common package!"
|
||||||
|
@ -212,8 +213,8 @@ case "$1" in
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
apt install -y $APT_FORGEJO_COMMON ./"$2"
|
apt install -y $APT_FORGEJO_COMMON ./"$2"
|
||||||
if [ -f "/.dockerenv" ] ; then
|
if [ -f "/.dockerenv" ]; then
|
||||||
if [ -f "/etc/default/forgejo" ] || [ "$2" != "${2#"./forgejo-bin_"}" ] ; then
|
if [ -f "/etc/default/forgejo" ] || [ "$2" != "${2#"./forgejo-bin_"}" ]; then
|
||||||
[ -f "/etc/default/forgejo" ] && . /etc/default/forgejo
|
[ -f "/etc/default/forgejo" ] && . /etc/default/forgejo
|
||||||
[ -z "$FORGEJO_HOME" ] && FORGEJO_HOME=/var/lib/forgejo
|
[ -z "$FORGEJO_HOME" ] && FORGEJO_HOME=/var/lib/forgejo
|
||||||
[ -z "$FORGEJO_USER" ] && FORGEJO_USER=forgejo
|
[ -z "$FORGEJO_USER" ] && FORGEJO_USER=forgejo
|
||||||
|
@ -226,9 +227,9 @@ case "$1" in
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
fi
|
fi
|
||||||
if [ "$TEST_DEBIAN_BUSTER" ] ; then
|
if [ "$TEST_DEBIAN_BUSTER" ]; then
|
||||||
curl http://localhost:3000/ | grep -A 4 "Powered by Forgejo"
|
curl http://localhost:3000/ | grep -A 4 "Powered by Forgejo"
|
||||||
if [ "$?" != "0" ] ; then
|
if [ "$?" != "0" ]; then
|
||||||
sleep 3
|
sleep 3
|
||||||
curl http://localhost:3000/ | grep -A 4 "Powered by Forgejo"
|
curl http://localhost:3000/ | grep -A 4 "Powered by Forgejo"
|
||||||
fi
|
fi
|
||||||
|
@ -237,7 +238,7 @@ case "$1" in
|
||||||
fi
|
fi
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
"install-repo-test")
|
"install-repo-test")
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt update -qq
|
apt update -qq
|
||||||
apt install -y apt-utils apt-listchanges
|
apt install -y apt-utils apt-listchanges
|
||||||
|
@ -246,7 +247,7 @@ case "$1" in
|
||||||
apt upgrade -y
|
apt upgrade -y
|
||||||
apt update -qq
|
apt update -qq
|
||||||
apt install -y "$3"
|
apt install -y "$3"
|
||||||
if [ -f "/.dockerenv" ] ; then
|
if [ -f "/.dockerenv" ]; then
|
||||||
sudo -u forgejo USER=forgejo \
|
sudo -u forgejo USER=forgejo \
|
||||||
HOME=/var/lib/forgejo FORGEJO_WORK_DIR=/var/lib/forgejo \
|
HOME=/var/lib/forgejo FORGEJO_WORK_DIR=/var/lib/forgejo \
|
||||||
forgejo web -q --config /etc/fogejo/app.ini &
|
forgejo web -q --config /etc/fogejo/app.ini &
|
||||||
|
@ -255,7 +256,7 @@ case "$1" in
|
||||||
retry -d 2 -t 2 curl http://localhost:3000/ | grep -A 4 "Powered by Forgejo"
|
retry -d 2 -t 2 curl http://localhost:3000/ | grep -A 4 "Powered by Forgejo"
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
"verify-data-dir-chmod")
|
"verify-data-dir-chmod")
|
||||||
DATA_DIR_CHMOD="$(stat -c %a /var/lib/forgejo)"
|
DATA_DIR_CHMOD="$(stat -c %a /var/lib/forgejo)"
|
||||||
if [ "$DATA_DIR_CHMOD" = "750" ]; then
|
if [ "$DATA_DIR_CHMOD" = "750" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -263,14 +264,14 @@ case "$1" in
|
||||||
exit 100
|
exit 100
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"force-clean-forgejo")
|
"force-clean-forgejo")
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt install -y psmisc
|
apt install -y psmisc
|
||||||
killall forgejo
|
killall forgejo
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
"forgejo-test-deps")
|
"forgejo-test-deps")
|
||||||
echo "deb http://deb.debian.org/debian/ bookworm-backports main contrib" > /etc/apt/sources.list.d/backports.list
|
echo "deb http://deb.debian.org/debian/ bookworm-backports main contrib" >/etc/apt/sources.list.d/backports.list
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt update -qq
|
apt update -qq
|
||||||
apt install -qq --no-install-recommends -y git-lfs
|
apt install -qq --no-install-recommends -y git-lfs
|
||||||
|
@ -278,18 +279,18 @@ case "$1" in
|
||||||
ln -sf /usr/lib/go-$DEP_GOLANG_VER/bin/go /usr/local/bin/go
|
ln -sf /usr/lib/go-$DEP_GOLANG_VER/bin/go /usr/local/bin/go
|
||||||
adduser --quiet --comment forgejo --disabled-password forgejo
|
adduser --quiet --comment forgejo --disabled-password forgejo
|
||||||
chown -R forgejo:forgejo .
|
chown -R forgejo:forgejo .
|
||||||
if [ "$DEP_GOLANG_NODEB_REV" ];then
|
if [ "$DEP_GOLANG_NODEB_REV" ]; then
|
||||||
su forgejo -c "./.ci-make.sh forgejo-test-deps_upgrade-go $DEP_GOLANG_VER $DEP_GOLANG_NODEB_REV"
|
su forgejo -c "./.ci-make.sh forgejo-test-deps_upgrade-go $DEP_GOLANG_VER $DEP_GOLANG_NODEB_REV"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"forgejo-test-deps_upgrade-go")
|
"forgejo-test-deps_upgrade-go")
|
||||||
go install golang.org/dl/go$2.$3@latest
|
go install golang.org/dl/go$2.$3@latest
|
||||||
ln -s ~/go/bin/go$2.$3 ~/go/bin/go
|
ln -s ~/go/bin/go$2.$3 ~/go/bin/go
|
||||||
export PATH="$HOME/go/bin:$PATH"
|
export PATH="$HOME/go/bin:$PATH"
|
||||||
go download
|
go download
|
||||||
go version
|
go version
|
||||||
;;
|
;;
|
||||||
"complex-test")
|
"complex-test")
|
||||||
shift
|
shift
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"split-deb-upgrade")
|
"split-deb-upgrade")
|
||||||
|
@ -302,17 +303,17 @@ case "$1" in
|
||||||
apt upgrade -y
|
apt upgrade -y
|
||||||
apt install forgejo$1
|
apt install forgejo$1
|
||||||
cp test-res/app.ini.modified /etc/forgejo/app.ini
|
cp test-res/app.ini.modified /etc/forgejo/app.ini
|
||||||
apt install ./forgejo$1_*_amd64.deb ./forgejo-common_*_all.deb
|
apt install ./forgejo$1_*_arm64.deb ./forgejo-common_*_all.deb
|
||||||
cat /etc/forgejo/app.ini
|
cat /etc/forgejo/app.ini
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
"full-instance-clean")
|
"full-instance-clean")
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt purge -y forgejo forgejo-sqlite forgejo-common forgejo-bin
|
apt purge -y forgejo forgejo-sqlite forgejo-common forgejo-bin
|
||||||
rm -rf /var/lib/forgejo
|
rm -rf /var/lib/forgejo
|
||||||
rm -rf /etc/forgejo /etc/default/forgejo /etc/systemd/system/forgejo.service.d
|
rm -rf /etc/forgejo /etc/default/forgejo /etc/systemd/system/forgejo.service.d
|
||||||
if [ "$2" = "userinst" ] ; then
|
if [ "$2" = "userinst" ]; then
|
||||||
sudo deluser git
|
sudo deluser git
|
||||||
else
|
else
|
||||||
sudo deluser forgejo
|
sudo deluser forgejo
|
||||||
|
|
|
@ -48,19 +48,19 @@ jobs:
|
||||||
cd forgejo
|
cd forgejo
|
||||||
git update-ref refs/heads/tag_test $(git rev-parse --verify HEAD)
|
git update-ref refs/heads/tag_test $(git rev-parse --verify HEAD)
|
||||||
|
|
||||||
- run: ./.ci-make.sh submodule-make forgejo security-check
|
# - run: ./.ci-make.sh submodule-make forgejo security-check
|
||||||
|
|
||||||
- run: ./.ci-make.sh submodule-make forgejo frontend
|
- run: ./.ci-make.sh submodule-make forgejo frontend
|
||||||
|
|
||||||
- run: ./.ci-make.sh submodule-make forgejo checks-backend
|
# - run: ./.ci-make.sh submodule-make forgejo checks-backend
|
||||||
|
|
||||||
- name: Download Forgejo binary
|
- name: Download Forgejo binary
|
||||||
run: ./.ci-make.sh download-binary forgejo-bin-dl
|
run: ./.ci-make.sh download-binary forgejo-bin-dl
|
||||||
|
|
||||||
- name: Build Forgejo for amd64
|
- name: Build Forgejo for arm64
|
||||||
run: ./.ci-make.sh submodule-build forgejo forgejo-bin
|
run: ./.ci-make.sh submodule-build forgejo forgejo-bin
|
||||||
|
|
||||||
- name: Build Forgejo (with SQLite) for amd64
|
- name: Build Forgejo (with SQLite) for arm64
|
||||||
run: ./.ci-make.sh submodule-build forgejo forgejo-sqlite-bin
|
run: ./.ci-make.sh submodule-build forgejo forgejo-sqlite-bin
|
||||||
env:
|
env:
|
||||||
TAGS: sqlite sqlite_unlock_notify
|
TAGS: sqlite sqlite_unlock_notify
|
||||||
|
@ -82,7 +82,7 @@ jobs:
|
||||||
./.ci-make.sh pkg-gen-sha256
|
./.ci-make.sh pkg-gen-sha256
|
||||||
./.ci-make.sh preview-sha256
|
./.ci-make.sh preview-sha256
|
||||||
|
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_arm64.deb
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
@ -106,31 +106,31 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
|
name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
|
||||||
|
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_arm64.deb
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo_*_arm64.deb
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_arm64.deb
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
- run: ./.ci-make.sh test-userinst-prep
|
- run: ./.ci-make.sh test-userinst-prep
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_arm64.deb
|
||||||
- run: ./.ci-make.sh full-instance-clean userinst
|
- run: ./.ci-make.sh full-instance-clean userinst
|
||||||
- run: ./.ci-make.sh test-userinst-prep
|
- run: ./.ci-make.sh test-userinst-prep
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo_*_arm64.deb
|
||||||
- run: ./.ci-make.sh full-instance-clean userinst
|
- run: ./.ci-make.sh full-instance-clean userinst
|
||||||
- run: ./.ci-make.sh test-userinst-prep
|
- run: ./.ci-make.sh test-userinst-prep
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_arm64.deb
|
||||||
- run: ./.ci-make.sh full-instance-clean userinst
|
- run: ./.ci-make.sh full-instance-clean userinst
|
||||||
- run: ./.ci-make.sh install-repo-test ./repo-deb/forgejo-deb-repo_0-0_all.deb forgejo-sqlite
|
- run: ./.ci-make.sh install-repo-test ./repo-deb/forgejo-deb-repo_0-0_all.deb forgejo-sqlite
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_arm64.deb
|
||||||
- run: ./.ci-make.sh verify-data-dir-chmod
|
- run: ./.ci-make.sh verify-data-dir-chmod
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
- run: ./.ci-make.sh install-repo-test ./repo-deb/forgejo-deb-repo_0-0_all.deb forgejo
|
- run: ./.ci-make.sh install-repo-test ./repo-deb/forgejo-deb-repo_0-0_all.deb forgejo
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo_*_arm64.deb
|
||||||
- run: ./.ci-make.sh verify-data-dir-chmod
|
- run: ./.ci-make.sh verify-data-dir-chmod
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
- run: ./.ci-make.sh install-repo-test ./repo-deb/forgejo-deb-repo_0-0_all.deb forgejo-bin
|
- run: ./.ci-make.sh install-repo-test ./repo-deb/forgejo-deb-repo_0-0_all.deb forgejo-bin
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_arm64.deb
|
||||||
- run: ./.ci-make.sh verify-data-dir-chmod
|
- run: ./.ci-make.sh verify-data-dir-chmod
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
- run: ./.ci-make.sh complex-test split-deb-upgrade -sqlite
|
- run: ./.ci-make.sh complex-test split-deb-upgrade -sqlite
|
||||||
|
@ -152,13 +152,13 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: forgejo-deb-${{steps.ciprep.outputs.artifactlabel }}
|
name: forgejo-deb-${{steps.ciprep.outputs.artifactlabel }}
|
||||||
|
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_arm64.deb
|
||||||
- run: ./.ci-make.sh force-clean-forgejo
|
- run: ./.ci-make.sh force-clean-forgejo
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo_*_arm64.deb
|
||||||
- run: ./.ci-make.sh force-clean-forgejo
|
- run: ./.ci-make.sh force-clean-forgejo
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_arm64.deb
|
||||||
- run: ./.ci-make.sh force-clean-forgejo
|
- run: ./.ci-make.sh force-clean-forgejo
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
|
|
||||||
|
@ -179,20 +179,18 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: forgejo-deb-${{steps.ciprep.outputs.artifactlabel }}
|
name: forgejo-deb-${{steps.ciprep.outputs.artifactlabel }}
|
||||||
|
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_arm64.deb
|
||||||
- run: ./.ci-make.sh force-clean-forgejo
|
- run: ./.ci-make.sh force-clean-forgejo
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo_*_arm64.deb
|
||||||
- run: ./.ci-make.sh force-clean-forgejo
|
- run: ./.ci-make.sh force-clean-forgejo
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
|
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_arm64.deb
|
||||||
- run: ./.ci-make.sh force-clean-forgejo
|
- run: ./.ci-make.sh force-clean-forgejo
|
||||||
- run: ./.ci-make.sh full-instance-clean
|
- run: ./.ci-make.sh full-instance-clean
|
||||||
|
|
||||||
publish-release-repo:
|
publish:
|
||||||
runs-on: bookworm
|
runs-on: bookworm
|
||||||
needs: [multitest-bookworm-lxc, multitest-bullseye-docker, multitest-buster-docker]
|
|
||||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.repository == 'forgejo-contrib/forgejo-deb'
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
@ -208,26 +206,12 @@ jobs:
|
||||||
- run: mkdir forgejo-release
|
- run: mkdir forgejo-release
|
||||||
- run: mv *.deb *.deb.sha256 forgejo-release/
|
- run: mv *.deb *.deb.sha256 forgejo-release/
|
||||||
|
|
||||||
- uses: actions/forgejo-release@v1
|
|
||||||
with:
|
|
||||||
direction: upload
|
|
||||||
url: https://codeberg.org
|
|
||||||
token: ${{ secrets.codeberg_api_key }}
|
|
||||||
release-dir: forgejo-release
|
|
||||||
|
|
||||||
- uses: actions/forgejo-release@v1
|
|
||||||
with:
|
|
||||||
direction: upload
|
|
||||||
url: https://code.forgejo.org
|
|
||||||
token: ${{ secrets.cfo_api_key }}
|
|
||||||
release-dir: forgejo-release
|
|
||||||
|
|
||||||
- name: Debian package registry publish
|
- name: Debian package registry publish
|
||||||
env:
|
env:
|
||||||
FORGEJO_SITE: https://code.forgejo.org
|
FORGEJO_SITE: https://git.alexjanka.com
|
||||||
FORGEJO_OWNER: forgejo-contrib
|
FORGEJO_OWNER: alex
|
||||||
DEBIAN_DIST: bullseye
|
DEBIAN_DIST: testing
|
||||||
DEBIAN_COMPONENT: forgejo-lts
|
DEBIAN_COMPONENT: main
|
||||||
FORGEJO_KEY: ${{ secrets.cfo_api_key }}
|
FORGEJO_KEY: ${{ secrets.cfo_api_key }}
|
||||||
run: |
|
run: |
|
||||||
cd forgejo-release
|
cd forgejo-release
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: forgejo-bin
|
Package: forgejo-bin
|
||||||
Architecture: amd64
|
Architecture: arm64
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Provides: forgejo, gitea
|
Provides: forgejo, gitea
|
||||||
Depends: adduser (>= 3.11), git
|
Depends: adduser (>= 3.11), git
|
||||||
|
|
|
@ -5,7 +5,7 @@ Maintainer: crystal <crystal@noreply.codeberg.org>
|
||||||
Build-Depends: debhelper (>= 10)
|
Build-Depends: debhelper (>= 10)
|
||||||
|
|
||||||
Package: forgejo
|
Package: forgejo
|
||||||
Architecture: amd64
|
Architecture: arm64
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Provides: gitea
|
Provides: gitea
|
||||||
Depends: forgejo-common (= ${source:Version}), adduser (>= 3.11), git
|
Depends: forgejo-common (= ${source:Version}), adduser (>= 3.11), git
|
||||||
|
@ -14,7 +14,7 @@ Description: Forgejo: Beyond Coding. We Forge.
|
||||||
Forgejo with bindata ONLY - Use this package for MySQL or PostgreSQL setup
|
Forgejo with bindata ONLY - Use this package for MySQL or PostgreSQL setup
|
||||||
|
|
||||||
Package: forgejo-sqlite
|
Package: forgejo-sqlite
|
||||||
Architecture: amd64
|
Architecture: arm64
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Provides: forgejo, gitea
|
Provides: forgejo, gitea
|
||||||
Depends: forgejo-common (= ${source:Version}), adduser (>= 3.11), git
|
Depends: forgejo-common (= ${source:Version}), adduser (>= 3.11), git
|
||||||
|
|
Loading…
Add table
Reference in a new issue