File tree Expand file tree Collapse file tree 6 files changed +29
-23
lines changed
Expand file tree Collapse file tree 6 files changed +29
-23
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ <services>
2+ <service name="tar_scm" mode="disabled">
3+ <param name="url">git://github.com/ClusterLabs/ha_cluster_exporter.git</param>
4+ <param name="scm">git</param>
5+ <param name="revision">%%VERSION%%</param>
6+ <param name="exclude">.git</param>
7+ <param name="versionformat">@PARENT_TAG@</param>
8+ <param name="filename">prometheus-ha_cluster_exporter</param>
9+ </service>
10+ <service name="set_version" mode="disabled">
11+ <param name="version">%%VERSION%%</param>
12+ <param name="file">prometheus-ha_cluster_exporter.spec</param>
13+ </service>
14+ <service name="recompress" mode="disabled">
15+ <param name="file">*.tar</param>
16+ <param name="compression">gz</param>
17+ </service>
18+ <service name="go_modules" mode="disabled" />
19+ </services>
Original file line number Diff line number Diff line change 1515# along with this program. If not, see <https://www.gnu.org/licenses/>.
1616#
1717Name: prometheus-ha_cluster_exporter
18- # Version will be processed via Makefile
19- Version: %% VERSION %%
18+ # Version will be processed via set_version source service
19+ Version: 0
2020Release: 0
2121License: Apache-2.0
2222Summary: Prometheus exporter for Pacemaker HA clusters metrics
2323Group: System/Monitoring
2424Url: https://github.com/ClusterLabs/ha_cluster_exporter
25- # The GitHub tarball will not actually be used during build: instead, we provide a local archive with the vendored dependencies inside.
26- Source : https://github.com/ClusterLabs/ha_cluster_exporter/archive/%{ version } .tar.gz
25+ Source: %{ name }-%{ version }.tar.gz
26+ Source1 : vendor .tar.gz
2727ExclusiveArch: aarch64 x86_64 ppc64le s390x
2828BuildRoot: %{_tmppath }/%{name }-%{version }-build
2929BuildRequires: go >= 1.11
@@ -41,7 +41,8 @@ Provides: %{name}-devel-static = %{version}
4141Prometheus exporter for Pacemaker HA clusters metrics
4242
4343%prep
44- %setup -q -c # unpack project sources
44+ %setup -q # unpack project sources
45+ %setup -q -T -D -a 1 # unpack go dependencies in vendor.tar.gz, which was prepared by the source services
4546
4647%define shortname ha_cluster_exporter
4748
Original file line number Diff line number Diff line change 11/. * export-ignore
2- /ha_cluster_exporter.spec export-ignore
Original file line number Diff line number Diff line change 3636 docker run --rm -t -v "$(pwd):/package" -v "$GOPATH/pkg/mod:/root/go/pkg/mod" -w /package \
3737 -e OBS_USER -e OBS_PASS -e OBS_PROJECT -e OBS_PACKAGE -e VERSION -e REPOSITORY=$TRAVIS_REPO_SLUG \
3838 shap/continuous_deliver \
39- bash -c ".ci /init_osc_creds.sh && make obs-commit"
39+ bash -c "/scripts /init_osc_creds.sh && make obs-commit"
Original file line number Diff line number Diff line change @@ -66,12 +66,10 @@ obs-workdir: build/obs
6666build/obs :
6767 @mkdir -p build/obs/$(OBS_PACKAGE )
6868 osc checkout $(OBS_PROJECT ) /$(OBS_PACKAGE ) -o build/obs
69- cp ha_cluster_exporter.spec build/obs/$(OBS_PACKAGE ) .spec
70- sed -i ' s/%%VERSION%%/$(VERSION)/' build/obs/$(OBS_PACKAGE ) .spec
71- git archive --format=tar HEAD | tar -x -C build/obs/$(OBS_PACKAGE )
72- cd build/obs/$(OBS_PACKAGE ) ; go mod vendor
7369 rm build/obs/* .tar.gz
74- tar -cvzf build/obs/$(VERSION ) .tar.gz -C build/obs/$(OBS_PACKAGE ) .
70+ cp -rv .ci/obs/* build/obs/
71+ sed -i ' s/%%VERSION%%/$(VERSION)/' build/obs/_service
72+ cd build/obs; osc service runall
7573 .ci/gh_release_to_obs_changeset.py $(REPOSITORY ) -a $(AUTHOR ) -t $(VERSION ) -f build/obs/$(OBS_PACKAGE ) .changes || true
7674
7775obs-commit : obs-workdir
You can’t perform that action at this time.
0 commit comments