Commit 3e5a110d authored by Bengt Giger's avatar Bengt Giger
Browse files

Update .gitlab-ci.yml

parent 4f39eee7
Pipeline #80380 passed with stages
in 3 minutes and 44 seconds
image: registry.ethz.ch/bgiger/rpmbuilder:latest
variables:
GIT_STRATEGY: clone
stages:
- build
- test
before_script:
- eval $(ssh-agent -s)
- echo "$REPO_PRIVATE_KEY" | ssh-add -
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- chmod 600 ~/.ssh/config
- cp .rpmmacros $HOME/.rpmmacros
- rc="x";
gpg --list-keys | grep 8B9F02B2 || rc=$?;
if [ "$rc" != "x" ];
then echo "$RPM_SIGNING_KEY" | gpg --import -;
fi
# - echo "$SIGNING_KEY" | gpg --import -
build:
stage: build
script:
- export LANG=C
- export REMOTE_SERVER=w3_idinstallprd@idinstallprd
......@@ -29,3 +28,30 @@ build:
tags:
- docker
test_install:
stage: test
tags:
- docker
script:
- 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 '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"
test_update:
stage: test
tags:
- docker
script:
- 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 '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-8.5.42;
yum install -y tomcat8"
Supports Markdown
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