mirror of
https://gitlab.com/packaging/gitea
synced 2024-12-18 08:03:29 +00:00
Merge branch 'arm64' into 'master'
add arm64 builds, refs #5 See merge request packaging/gitea!1
This commit is contained in:
commit
78aead52a3
@ -1,29 +1,38 @@
|
|||||||
|
---
|
||||||
stages:
|
stages:
|
||||||
- package
|
- package
|
||||||
- test
|
- test
|
||||||
- repo
|
- .repo
|
||||||
- pages
|
- pages
|
||||||
|
|
||||||
package:
|
.vars: &vars
|
||||||
|
NAME: gitea
|
||||||
|
URL: "https://gitea.io"
|
||||||
|
DESCRIPTION: "A painless self-hosted Git service."
|
||||||
|
ARTIFACTS: "usr"
|
||||||
|
|
||||||
|
.package: &package
|
||||||
stage: package
|
stage: package
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
variables:
|
|
||||||
NAME: gitea
|
|
||||||
URL: "https://gitea.io"
|
|
||||||
DESCRIPTION: "A painless self-hosted Git service."
|
|
||||||
ARTIFACTS: "usr"
|
|
||||||
script:
|
script:
|
||||||
- export VERSION=$(echo ${CI_COMMIT_TAG#*v} | cut -d'-' -f1)
|
- export VERSION="$(echo ${CI_COMMIT_TAG#*v}" | cut -d'-' -f1)
|
||||||
- export PATCHLEVEL=$(echo ${CI_COMMIT_TAG} | cut -d'-' -f2)
|
- export PATCHLEVEL="$(echo ${CI_COMMIT_TAG}" | cut -d'-' -f2)
|
||||||
- apt-get -qq update
|
- apt-get -qq update
|
||||||
- apt-get -qqy install ruby-dev ruby-ffi curl file
|
- apt-get -qqy install ruby-dev ruby-ffi curl file
|
||||||
- gem install specific_install
|
- gem install specific_install
|
||||||
- gem specific_install https://github.com/root360/fpm.git all_fixes
|
- gem specific_install https://github.com/root360/fpm.git all_fixes
|
||||||
- mkdir -p "${CI_PROJECT_DIR}/package_root/usr/bin"
|
- mkdir -p "${CI_PROJECT_DIR}/package_root/usr/bin"
|
||||||
- curl -sL -o "${CI_PROJECT_DIR}/package_root/usr/bin/gitea" "https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64"
|
- curl -sL -o
|
||||||
- file --mime-type --brief "${CI_PROJECT_DIR}/package_root/usr/bin/gitea" | grep -q 'application/x-executable'
|
"${CI_PROJECT_DIR}/package_root/usr/bin/gitea"
|
||||||
|
"https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-${ARCH}"
|
||||||
|
- file
|
||||||
|
--mime-type
|
||||||
|
--brief
|
||||||
|
"${CI_PROJECT_DIR}/package_root/usr/bin/gitea"
|
||||||
|
| grep -q 'application/x-executable'
|
||||||
- chmod +x "${CI_PROJECT_DIR}/package_root/usr/bin/gitea"
|
- chmod +x "${CI_PROJECT_DIR}/package_root/usr/bin/gitea"
|
||||||
- fpm
|
- fpm
|
||||||
|
--architecture "${ARCH}"
|
||||||
--input-type dir
|
--input-type dir
|
||||||
--output-type deb
|
--output-type deb
|
||||||
--package "${CI_PROJECT_DIR}/gitea_${VERSION}-${PATCHLEVEL}_amd64.deb"
|
--package "${CI_PROJECT_DIR}/gitea_${VERSION}-${PATCHLEVEL}_amd64.deb"
|
||||||
@ -33,12 +42,12 @@ package:
|
|||||||
--maintainer "Stefan Heitmüller <stefan.heitmueller@gmx.com>"
|
--maintainer "Stefan Heitmüller <stefan.heitmueller@gmx.com>"
|
||||||
--url "${URL}"
|
--url "${URL}"
|
||||||
--depends git
|
--depends git
|
||||||
--deb-systemd "${CI_PROJECT_DIR}/package_scripts/${NAME}.service"
|
--deb-systemd "${CI_PROJECT_DIR}/.packaging/${NAME}.service"
|
||||||
--deb-systemd-enable
|
--deb-systemd-enable
|
||||||
--deb-systemd-auto-start
|
--deb-systemd-auto-start
|
||||||
--deb-activate-noawait /etc/init.d
|
--deb-activate-noawait /etc/init.d
|
||||||
--prefix=/
|
--prefix=/
|
||||||
--after-install "${CI_PROJECT_DIR}/package_scripts/after-install.sh"
|
--before-install "${CI_PROJECT_DIR}/.packaging/before-install.sh"
|
||||||
--chdir "${CI_PROJECT_DIR}/package_root"
|
--chdir "${CI_PROJECT_DIR}/package_root"
|
||||||
$ARTIFACTS
|
$ARTIFACTS
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -47,6 +56,18 @@ package:
|
|||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
|
|
||||||
|
gitea-amd64:
|
||||||
|
<<: *package
|
||||||
|
variables:
|
||||||
|
<<: *vars
|
||||||
|
ARCH: amd64
|
||||||
|
|
||||||
|
gitea-arm64:
|
||||||
|
<<: *package
|
||||||
|
variables:
|
||||||
|
<<: *vars
|
||||||
|
ARCH: arm64
|
||||||
|
|
||||||
test-install:
|
test-install:
|
||||||
stage: test
|
stage: test
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
@ -89,19 +110,19 @@ reprepro:
|
|||||||
cache:
|
cache:
|
||||||
untracked: true
|
untracked: true
|
||||||
paths:
|
paths:
|
||||||
- $CI_PROJECT_DIR/repo
|
- $CI_PROJECT_DIR/.repo
|
||||||
key: reprepro
|
key: reprepro
|
||||||
stage: repo
|
stage: .repo
|
||||||
image: registry.gitlab.com/packaging/reprepro-multiple-versions:latest
|
image: registry.gitlab.com/packaging/reprepro-multiple-versions:latest
|
||||||
script:
|
script:
|
||||||
- echo "$SIGNING_KEY" > /tmp/key
|
- echo "$SIGNING_KEY" > /tmp/key
|
||||||
- gpg --import /tmp/key
|
- gpg --import /tmp/key
|
||||||
- rm -f /tmp/key
|
- rm -f /tmp/key
|
||||||
- test -f $CI_PROJECT_DIR/repo/gpg.key || gpg --export --armor "$SIGNING_KEY_ID" > $CI_PROJECT_DIR/repo/gpg.key
|
- test -f $CI_PROJECT_DIR/.repo/gpg.key || gpg --export --armor "$SIGNING_KEY_ID" > $CI_PROJECT_DIR/.repo/gpg.key
|
||||||
- sed -i 's,##SIGNING_KEY_ID##,'$SIGNING_KEY_ID',' repo/conf/distributions
|
- sed -i 's,##SIGNING_KEY_ID##,'$SIGNING_KEY_ID',' .repo/conf/distributions
|
||||||
- find $CI_PROJECT_DIR -type f -name "*.deb" -exec
|
- find $CI_PROJECT_DIR -type f -name "*.deb" -exec
|
||||||
reprepro
|
reprepro
|
||||||
-b $CI_PROJECT_DIR/repo
|
-b $CI_PROJECT_DIR/.repo
|
||||||
includedeb
|
includedeb
|
||||||
gitea
|
gitea
|
||||||
{} \+;
|
{} \+;
|
||||||
@ -112,14 +133,16 @@ pages:
|
|||||||
cache:
|
cache:
|
||||||
untracked: true
|
untracked: true
|
||||||
paths:
|
paths:
|
||||||
- $CI_PROJECT_DIR/repo
|
- $CI_PROJECT_DIR/.repo
|
||||||
key: reprepro
|
key: reprepro
|
||||||
policy: pull
|
policy: pull
|
||||||
stage: pages
|
stage: pages
|
||||||
image: ubuntu:focal
|
image: ubuntu:focal
|
||||||
script:
|
script:
|
||||||
- mkdir $CI_PROJECT_DIR/public
|
- mkdir $CI_PROJECT_DIR/public
|
||||||
- cp -r $CI_PROJECT_DIR/repo/gpg.key $CI_PROJECT_DIR/repo/dists $CI_PROJECT_DIR/repo/pool $CI_PROJECT_DIR/public/
|
- cp -r
|
||||||
|
$CI_PROJECT_DIR/.repo/{gpg.key,dists,pool}
|
||||||
|
$CI_PROJECT_DIR/public/
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- $CI_PROJECT_DIR/public
|
- $CI_PROJECT_DIR/public
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Codename: gitea
|
Codename: gitea
|
||||||
Components: main
|
Components: main
|
||||||
Architectures: amd64
|
Architectures: amd64 arm64
|
||||||
SignWith: ##SIGNING_KEY_ID##
|
SignWith: ##SIGNING_KEY_ID##
|
||||||
Limit: 0
|
Limit: 0
|
Loading…
Reference in New Issue
Block a user