]> git.pld-linux.org Git - packages/gitlab-runner.git/blame - gitlab-ci-multi-runner.spec
add directory for system mode config
[packages/gitlab-runner.git] / gitlab-ci-multi-runner.spec
CommitLineData
3e1b3fba
ER
1# the revision for images
2%define revision 88fc806
c5c6476d
ER
3Summary: The official GitLab CI runner written in Go
4Name: gitlab-ci-multi-runner
eac9a939 5Version: 1.1.3
c2bf33c4 6Release: 2
b306b97b 7License: MIT
c5c6476d
ER
8Group: Development/Building
9Source0: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/repository/archive.tar.gz?ref=v%{version}&/%{name}-%{version}.tar.gz
eac9a939 10# Source0-md5: 3ce0499c2ee0bca486dcdaf1bb01d2d1
4ffe1735
ER
11Source1: https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/master/docker/prebuilt.tar.gz
12# Source1-md5: d616dcc457a6ce69bed4af2ca08dfe0a
c5c6476d
ER
13URL: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner
14BuildRequires: git-core
4ffe1735 15BuildRequires: go-bindata >= 3.0.7-1.a0ff2567
c5c6476d
ER
16BuildRequires: golang
17Requires: ca-certificates
18Requires: curl
19Requires: git-core
20Requires: tar
a56eb7cc 21Suggests: docker >= 1.5.0
4ffe1735 22ExclusiveArch: %{ix86} %{x8664} %{arm}
c5c6476d
ER
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
4ffe1735
ER
25# go stuff
26%define _enable_debug_packages 0
27%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
28
c5c6476d
ER
29%description
30This is the official GitLab Runner written in Go. It runs tests and
31sends the results to GitLab. GitLab CI is the open-source continuous
32integration service included with GitLab that coordinates the testing.
33
34%prep
35%setup -qc
36mv gitlab-ci-multi-runner-*/{.??*,*} .
37
bf2084d5
ER
38install -d Godeps/_workspace/src/gitlab.com/gitlab-org
39ln -s ../../../../.. Godeps/_workspace/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner
40
4ffe1735
ER
41mkdir -p out/docker
42ln -s %{SOURCE1} out/docker/prebuilt.tar.gz
6ada5ccc
ER
43# touch, otherwise make rules would download it nevertheless
44touch out/docker/prebuilt.tar.gz
4ffe1735 45
a0a05733
ER
46# avoid docker being used even if executable found
47cat <<'EOF' > docker
48#!/bin/sh
49echo >&2 "No docker"
50exit 1
51EOF
52chmod a+rx docker
53
c5c6476d 54%build
611fb108
ER
55# check that the revision is correct
56tar xvf out/docker/prebuilt.tar.gz repositories
57revision=$(sed -rne 's/.*"gitlab-runner-build":\{"([^"]+)":.*/\1/p' repositories)
58test "$revision" = %{revision}
59
bf2084d5 60export GOPATH=$(pwd):$(pwd)/Godeps/_workspace
a0a05733 61export PATH=$(pwd):$PATH
bf2084d5 62
4ffe1735 63%{__make} docker
69a70248
ER
64%{__make} version | tee version.txt
65
3e1b3fba 66LDFLAGS="-X main.NAME gitlab-ci-multi-runner -X main.VERSION %{version} -X main.REVISION %{revision}"
4ffe1735 67%gobuild
c5c6476d 68
69a70248
ER
69# verify version match
70./gitlab-ci-multi-runner-%{version} -v > v
71grep 'version %{version} ' v
72
c5c6476d
ER
73%install
74rm -rf $RPM_BUILD_ROOT
770719bc
ER
75install -d $RPM_BUILD_ROOT{%{_sysconfdir}/gitlab-runner,%{_bindir}}
76
c2bf33c4
ER
77install -p %{name}-%{version} $RPM_BUILD_ROOT%{_bindir}/gitlab-runner
78# backward compat name for previous pld packaging
79ln -s gitlab-runner $RPM_BUILD_ROOT%{_bindir}/gitlab-ci-multi-runner
c5c6476d
ER
80
81%clean
82rm -rf $RPM_BUILD_ROOT
83
84%files
85%defattr(644,root,root,755)
86%doc README.md CHANGELOG.md
770719bc 87%dir %attr(750,root,root) %{_sysconfdir}/gitlab-runner
4ffe1735 88%attr(755,root,root) %{_bindir}/gitlab-ci-multi-runner
c2bf33c4 89%attr(755,root,root) %{_bindir}/gitlab-runner
This page took 0.051948 seconds and 4 git commands to generate.