1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fix GitLab CI

This commit is contained in:
Steffen Vogel 2017-04-02 00:17:18 +02:00
parent 63475942d7
commit 37498fc64d
3 changed files with 17 additions and 12 deletions

View file

@ -58,11 +58,14 @@ docs:
packages:
stage: build
before_script:
- curl -s https://$DEPLOY_USER:$DEPLOY_PASS@$DEPLOY_HOST/packages/villas.repo > /etc/yum.repos.d/villas.repo
- dnf -y config-manager --add-repo https://$DEPLOY_USER:$DEPLOY_PASS@$DEPLOY_HOST/packages/villas.repo
- dnf -y --refresh install libwebsockets-devel libxil-devel
script:
- make dist
- make rpm-villas
- make rpm-villas-node
only:
- tags
- triggers
artifacts:
name: "${CI_PROJECT_NAME}-packages-${CI_BUILD_REF}"
paths:
@ -87,6 +90,7 @@ coverage:
- build/release-coverage/coverage.txt
- build/release-coverage/coverage.xml
image: $DOCKER_REGISTRY/villas-dev
coverage: '/lines: (\d+\.\d+\%)/'
tags:
- docker
@ -104,6 +108,7 @@ integration:
stage: test
dependencies:
- build
before_script:
- make install
script:
- make run-integration-tests
@ -129,7 +134,7 @@ docker:
dependencies:
- packages
only:
- develop
- tags
tags:
- shell
- linux
@ -146,10 +151,10 @@ website:
deliver:
stage: deploy
script:
- rsync -r build/release-coverage/coverage/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/coverage/$CI_BUILD_REF_NAME/
- rsync -r build/release/doc/html/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/doc/$CI_BUILD_REF_NAME/
- rsync -r build/release/packaging/rpm/RPMS/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/../packages/
- rsync build/release/packaging/*.tar.gz $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/dist/
- rsync --recursive --ignore-missing-args build/release-coverage/coverage/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/coverage/$CI_BUILD_REF_NAME/
- rsync --recursive --ignore-missing-args build/release/doc/html/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/doc/$CI_BUILD_REF_NAME/
- rsync --recursive --ignore-missing-args build/release/packaging/rpm/RPMS/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/../packages/
- rsync --ignore-missing-args build/release/packaging/*.tar.gz $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/dist/
- ssh $DEPLOY_USER@$DEPLOY_HOST createrepo $DEPLOY_PATH/../packages
dependencies:
- docs

View file

@ -73,8 +73,8 @@ VERSION = $(shell git describe --tags --abbrev=0 --match v*)
VERSION_NUM = $(shell VERSION=$(VERSION); echo $${VERSION:1})
ifdef CI
GIT_REV = ${CI_BUILD_REF:0:7}
GIT_BRANCH = ${CI_COMMIT_REF_NAME}
GIT_REV = $(shell REV=$${CI_BUILD_REF}; echo $${REV:0:7})
GIT_BRANCH = ${CI_BUILD_REF_NAME}
VARIANT := $(VARIANT)-ci
else
GIT_REV = $(shell REV=$$(git rev-parse HEAD); echo $${REV:0:7})

View file

@ -2,9 +2,9 @@ RPMDIR = $(BUILDDIR)/packaging/rpm
SPEC_VILLAS = $(BUILDDIR)/packaging/rpm/villas-node.spec
rpm: rpm-villas rpm-libwebsockets rpm-libxil
rpm: rpm-villas-node rpm-libwebsockets rpm-libxil
rpm-villas: $(TAR_VILLAS) $(SPEC_VILLAS) | $(RPMDIR)/SOURCES/
rpm-villas-node: $(TAR_VILLAS) $(SPEC_VILLAS) | $(RPMDIR)/SOURCES/
cp $(BUILDDIR)/packaging/villas-node-$(VERSION_NUM).tar.gz $(RPMDIR)/SOURCES
rpmbuild -ba --define="_topdir $$(pwd)/$(RPMDIR)" $(BUILDDIR)/packaging/rpm/villas-node.spec
@ -26,7 +26,7 @@ rpm-libwebsockets: | $(RPMDIR)/RPMS $(BUILDDIR)/thirdparty/libwebsockets/
# We patch version number and release fields of the spec file based on the current Git commit
$(SPEC_VILLAS): $(SRCDIR)/packaging/rpm/villas-node.spec | $$(dir $$@)
sed -e "s/§VERSION§/$(VERSION_NUM)/g" \
-e "s/§RELEASE§/1.$(GIT_BRANCH)-$(VARIANT).$$(date +%Y%m%d)git$(GIT_REV)/g" < $^ > $@
-e "s/§RELEASE§/1.$(GIT_BRANCH)_$(subst -,_,$(VARIANT)).$$(date +%Y%m%d)git$(GIT_REV)/g" < $^ > $@
clean-rpm:
rm -rf $(RPMDIR)