Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deregister after integration tests #217

Merged
merged 4 commits into from
Sep 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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