To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 52cfb41f authored by Bengt Giger's avatar Bengt Giger
Browse files

Update .gitlab-ci.yml

parent 3e5a110d
Pipeline #80382 passed with stages
in 3 minutes and 28 seconds
......@@ -4,6 +4,7 @@ variables:
stages:
- build
- test
- deploy
before_script:
- eval $(ssh-agent -s)
......@@ -16,7 +17,7 @@ build:
script:
- export LANG=C
- export REMOTE_SERVER=w3_idinstallprd@idinstallprd
- export REMOTE_DIR=htdocs/repos/rpmbuilder/tomcat8
- export REMOTE_DIR=htdocs/repos/rpmbuilder/tests/tomcat8
- VERSION=$(curl -s https://downloads.apache.org/tomcat/tomcat-8/| grep v8| cut -d '"' -f6 | tr -d "v/"|tail -n1 )
- sed s/__VERSION__/$VERSION/g tomcat8.spec.template >SPECS/tomcat8.spec
- rpmbuild --undefine=_disable_source_fetch -ba --clean --define "_topdir `pwd`" --define "buildroot `pwd`/BUILDROOT" --define "_rpmdir `pwd`/RPMS" --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" --define "_source_payload nil" --define "_binary_payload nil" --define "%_gpg_name ID-CD RPM Signing" SPECS/tomcat8.spec
......@@ -37,7 +38,7 @@ test_install:
- docker run --rm geerlingguy/docker-centos7-ansible:latest /bin/bash -c "
/usr/bin/echo '[tomcat8]' >/etc/yum.repos.d/tomcat8.repo;
/usr/bin/echo 'name=Tomcat repo' >>/etc/yum.repos.d/tomcat8.repo;
/usr/bin/echo 'baseurl=https://idinstallprd.ethz.ch/repos/rpmbuilder/tomcat8' >>/etc/yum.repos.d/tomcat8.repo;
/usr/bin/echo 'baseurl=https://idinstallprd.ethz.ch/repos/rpmbuilder/tests/tomcat8' >>/etc/yum.repos.d/tomcat8.repo;
/usr/bin/echo 'gpgkey=https://idinstallprd.ethz.ch/repos/rpmbuilder/id-bd-cd-key.asc' >>/etc/yum.repos.d/tomcat8.repo;
yum clean all;
yum install -y tomcat8"
......@@ -55,3 +56,21 @@ test_update:
yum clean all;
yum install -y tomcat8-8.5.42;
yum install -y tomcat8"
Deploy:
stage: deploy
script:
- export LANG=C
- export REMOTE_SERVER=w3_idinstallprd@idinstallprd
- export REMOTE_DIR=htdocs/repos/rpmbuilder/tomcat8
- VERSION=$(curl -s https://downloads.apache.org/tomcat/tomcat-8/| grep v8| cut -d '"' -f6 | tr -d "v/"|tail -n1 )
- sed s/__VERSION__/$VERSION/g tomcat8.spec.template >SPECS/tomcat8.spec
- rpmbuild --undefine=_disable_source_fetch -ba --clean --define "_topdir `pwd`" --define "buildroot `pwd`/BUILDROOT" --define "_rpmdir `pwd`/RPMS" --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" --define "_source_payload nil" --define "_binary_payload nil" --define "%_gpg_name ID-CD RPM Signing" SPECS/tomcat8.spec
- cd RPMS/x86_64
- for RPM in $(ls *.rpm); do export RPM; ../../rpm-sign.exp; done
- cd ..
- rsync -r . $REMOTE_SERVER:$REMOTE_DIR
- ssh $REMOTE_SERVER "createrepo $REMOTE_DIR"
tags:
- docker
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment