Skip to content

Commit

Permalink
Merge pull request #217 from SUSE/deregister-after-integration-tests
Browse files Browse the repository at this point in the history
Deregister after integration tests
  • Loading branch information
Sergeykot committed Sep 3, 2018
2 parents 8283008 + cfc0cb8 commit 3928a21
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ARG MYSQL_PASSWORD
ARG MYSQL_DATABASE
ARG SCC_USERNAME
ARG SCC_PASSWORD
ARG SYSTEM_UUID

RUN SUSEConnect -r $REGCODE
RUN zypper --non-interactive ar http://download.opensuse.org/repositories/openSUSE:/Tools/SLE_15/openSUSE:Tools.repo
Expand All @@ -19,7 +20,7 @@ RUN zypper --non-interactive up
RUN zypper --non-interactive in -t pattern devel_osc_build
RUN zypper --non-interactive install --no-recommend wget curl timezone \
gcc-c++ libffi-devel git-core zlib-devel libxml2-devel libxslt-devel libmariadb-devel \
mariadb-client ruby2.5-rubygem-bundler make build sudo ruby-devel
mariadb-client mariadb ruby2.5-rubygem-bundler make build sudo ruby-devel nginx


ENV DOCKERIZE_VERSION v0.6.0
Expand Down Expand Up @@ -56,6 +57,9 @@ scc:\n\
username: $SCC_USERNAME\n\
password: $SCC_PASSWORD\n\
" >> /etc/rmt.conf
RUN mkdir -p /var/lib/rmt/
RUN printf "$SYSTEM_UUID" >> /var/lib/rmt/system_uuid
RUN SUSEConnect -d; exit 0 # register can be cached, so that deregistering will fail. this command is never cached

RUN bundle

Expand Down
2 changes: 1 addition & 1 deletion integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ osc co systemsmanagement:SCC:RMT rmt-server
cd /tmp/rmt-server/package
cp * ~/obs/systemsmanagement:SCC:RMT/rmt-server
cd ~/obs/systemsmanagement:SCC:RMT/rmt-server && osc build SLE_15 x86_64 --no-verify --trust-all-projects && cd .. &&
zypper --non-interactive --no-gpg-checks in /oscbuild/SLE_15-x86_64/home/abuild/rpmbuild/RPMS/x86_64/*
zypper --non-interactive --no-gpg-checks in --no-recommends /oscbuild/SLE_15-x86_64/home/abuild/rpmbuild/RPMS/x86_64/*
cd /usr/share/rmt
RAILS_ENV=production /usr/share/rmt/bin/rails db:create db:migrate
/usr/bin/rmt-cli sync
Expand Down
2 changes: 1 addition & 1 deletion integration/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline {
}
post {
always {
sh 'docker-compose down'
sh 'docker-compose -f docker-compose-test.yml down'
sh 'docker system prune -f'
}
}
Expand Down

0 comments on commit 3928a21

Please sign in to comment.