mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 18:14:51 +08:00
added gitlab runner and new dep
This commit is contained in:
parent
88083da038
commit
6b2e9b555b
71
gitlab-runner/PKGBUILD
Normal file
71
gitlab-runner/PKGBUILD
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# Arch Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
|
||||||
|
|
||||||
|
pkgname=gitlab-runner
|
||||||
|
pkgver=9.2.1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="The official GitLab CI runner written in Go"
|
||||||
|
arch=('x86_64')
|
||||||
|
url='https://gitlab.com/gitlab-org/gitlab-ci-multi-runner'
|
||||||
|
license=('GPL3')
|
||||||
|
depends=('ca-certificates' 'curl' 'git' 'glibc' 'tar')
|
||||||
|
makedepends=('git' 'go' 'git' 'go-bindata')
|
||||||
|
install='gitlab-runner.install'
|
||||||
|
backup=('etc/gitlab-runner/config.toml')
|
||||||
|
noextract=('prebuilt-x86_64.tar.xz'
|
||||||
|
'prebuilt-arm.tar.xz')
|
||||||
|
|
||||||
|
# Note: This should be built using git because the runner gets its version information from there and I
|
||||||
|
# haven't found the place to patch that yet.
|
||||||
|
source=("git+https://gitlab.com/gitlab-org/gitlab-ci-multi-runner.git#tag=v${pkgver}"
|
||||||
|
"https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/master/docker/prebuilt-x86_64.tar.xz"
|
||||||
|
"https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/master/docker/prebuilt-arm.tar.xz"
|
||||||
|
"gitlab-runner.service"
|
||||||
|
"gitlab-runner.sysusers"
|
||||||
|
"gitlab-runner.tmpfiles"
|
||||||
|
"config.toml")
|
||||||
|
sha512sums=('SKIP'
|
||||||
|
'e04b9668c177e32d4bd8ff7ce42afb4f13538757c3dcfade216621a64f5d2fc4b28151703fe900d20fe63015ef46b7fbf3002bed17f9f616178f19b586c8479f'
|
||||||
|
'73bf190f555fb00e4734aa6e8601ffed25d6cbbe91cdfacc5e7a3ed02fe97212ab6ed2189f85d85aa8a7b6ea8eb7fdc055382570fde93885baaca5ff214eeb68'
|
||||||
|
'ed24841242a56a3b10dd80cd23e0c980f6bbe5fd0ebd4c6b46529947e4920cc9c03e4f4b239da8a798c801a6cdd757415113f97e45c1032f2c519fdaec4d3ae0'
|
||||||
|
'8aa7f08702e99053c696fcc2aaba83beb9e9cd6f31973d82862db9350ac46df3a095377625d31fe909677525290d2de922d7a97930ed235774cb8f0da8944d40'
|
||||||
|
'6751d9fa0b27172d1b419c4138f5ac15cbc7c9147653a7258cf1470216142c637210bb60608c7ed0974e0e4057e5ddeae32225df1bb36e7dd1f20fec71e33cc3'
|
||||||
|
'f39c23fc06636f31c3fadb9a630c54527e8255098f18d275772cb30875d0a7463717101704070d432f2b69ab71f076a9538172a439bc307722dad2c7e260f752')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
mkdir -p "${srcdir}/src/gitlab.com/gitlab-org/"
|
||||||
|
ln -sf "${srcdir}/gitlab-ci-multi-runner" "${srcdir}/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||||
|
cd "${srcdir}/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||||
|
|
||||||
|
make version
|
||||||
|
|
||||||
|
export GOPATH="${srcdir}"
|
||||||
|
make deps
|
||||||
|
|
||||||
|
ln -sf "${srcdir}/prebuilt-x86_64.tar.xz" prebuilt-x86_64.tar.xz
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${srcdir}/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||||
|
|
||||||
|
export GOPATH="${srcdir}"
|
||||||
|
go-bindata \
|
||||||
|
-pkg docker \
|
||||||
|
-nocompress \
|
||||||
|
-nomemcopy \
|
||||||
|
-prefix out/docker/ \
|
||||||
|
-o executors/docker/bindata.go \
|
||||||
|
prebuilt-x86_64.tar.xz
|
||||||
|
|
||||||
|
make build_simple
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "${srcdir}/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||||
|
|
||||||
|
install -Dm644 "${srcdir}/config.toml" "${pkgdir}/etc/gitlab-runner/config.toml"
|
||||||
|
install -Dm644 "${srcdir}/gitlab-runner.service" "${pkgdir}/usr/lib/systemd/system/gitlab-runner.service"
|
||||||
|
install -Dm644 "${srcdir}/gitlab-runner.sysusers" "${pkgdir}/usr/lib/sysusers.d/gitlab-runner.conf"
|
||||||
|
install -Dm644 "${srcdir}/gitlab-runner.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/gitlab-runner.conf"
|
||||||
|
install -Dm755 out/binaries/gitlab-ci-multi-runner "${pkgdir}/usr/bin/gitlab-ci-multi-runner"
|
||||||
|
ln -s /usr/bin/gitlab-ci-multi-runner "${pkgdir}/usr/bin/gitlab-runner"
|
||||||
|
}
|
1
gitlab-runner/config.toml
Normal file
1
gitlab-runner/config.toml
Normal file
@ -0,0 +1 @@
|
|||||||
|
concurrent = 4
|
6
gitlab-runner/gitlab-runner.install
Normal file
6
gitlab-runner/gitlab-runner.install
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
post_install() {
|
||||||
|
echo "Register the runner as root using"
|
||||||
|
echo "# gitlab-ci-multi-runner register"
|
||||||
|
echo "Configure the runner in /etc/gitlab-runner/config.toml"
|
||||||
|
echo "Use gitlab-runner.service to control the runner"
|
||||||
|
}
|
17
gitlab-runner/gitlab-runner.service
Normal file
17
gitlab-runner/gitlab-runner.service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=GitLab Runner
|
||||||
|
After=syslog.target network.target
|
||||||
|
ConditionFileIsExecutable=/usr/bin/gitlab-ci-multi-runner
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
StartLimitInterval=5
|
||||||
|
StartLimitBurst=10
|
||||||
|
ExecStart=/usr/bin/gitlab-ci-multi-runner "run" "--working-directory" "/var/lib/gitlab-runner" "--config" "/etc/gitlab-runner/config.toml" "--service" "gitlab-runner" "--user" "gitlab-runner"
|
||||||
|
Restart=always
|
||||||
|
RestartSec=120
|
||||||
|
StandardOutput=syslog
|
||||||
|
StandardError=syslog
|
||||||
|
SyslogIdentifier=gitlab-runner
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
1
gitlab-runner/gitlab-runner.sysusers
Normal file
1
gitlab-runner/gitlab-runner.sysusers
Normal file
@ -0,0 +1 @@
|
|||||||
|
u gitlab-runner 107 "GitLab Runner" /var/lib/gitlab-runner
|
1
gitlab-runner/gitlab-runner.tmpfiles
Normal file
1
gitlab-runner/gitlab-runner.tmpfiles
Normal file
@ -0,0 +1 @@
|
|||||||
|
d /var/lib/gitlab-runner 0700 gitlab-runner gitlab-runner -
|
29
go-bindata/PKGBUILD
Normal file
29
go-bindata/PKGBUILD
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Arch Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
|
||||||
|
|
||||||
|
pkgname=go-bindata
|
||||||
|
pkgver=3.0.7
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A small utility which generates Go code from any file"
|
||||||
|
arch=('x86_64')
|
||||||
|
url='https://github.com/jteeuwen/go-bindata'
|
||||||
|
license=('CC0 1.0')
|
||||||
|
depends=('glibc')
|
||||||
|
makedepends=('go')
|
||||||
|
source=("https://github.com/jteeuwen/go-bindata/archive/v${pkgver}.tar.gz")
|
||||||
|
sha512sums=('c1589061aaaee18b6a105977cc191678b74a4d005e8450db01ae37105a925766994a97531f15b2c7b22820da81bd5f6e28107efdaa759700abe1327e2144b6bc')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
mkdir -p "${srcdir}/src/github.com/jteeuwen/"
|
||||||
|
mv "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/src/github.com/jteeuwen/go-bindata"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${srcdir}/src/github.com/jteeuwen/go-bindata/go-bindata"
|
||||||
|
GOPATH="${srcdir}" go build
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "${srcdir}/src/github.com/jteeuwen/go-bindata"
|
||||||
|
install -Dm755 "go-bindata/go-bindata" "${pkgdir}/usr/bin/go-bindata"
|
||||||
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user