Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
5143ca19
Commit
5143ca19
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
ci test that upgrades minerva
parent
984a7ad0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!630
WIP: Resolve "The privileges of a new user are not saved in some cases"
,
!393
Continous integration tests for upgrading existing debian package from r3lab repository
Pipeline
#6452
failed
6 years ago
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+47
-0
47 additions, 0 deletions
.gitlab-ci.yml
with
47 additions
and
0 deletions
.gitlab-ci.yml
+
47
−
0
View file @
5143ca19
...
...
@@ -193,6 +193,53 @@ build_debian_package:
-
export DEBEMAIL="piotr.gawron@uni.lu"
-
debian/create-debian-pkg.sh
test_upgrade_debian_package
:
image
:
debian
stage
:
test
only
:
-
tags
# we need to run it in privileged mode due to: https://stackoverflow.com/questions/29683231/tomcat7-fail-to-start-inside-ubuntu-docker-container
tags
:
-
privileged
services
:
-
name
:
piotrgawron/debian-repo
alias
:
debian-repo
dependencies
:
-
build_debian_package
script
:
-
apt-get update
-
apt-get install -y ssh software-properties-common dirmngr wget curl apt-transport-https
-
debian_file=$(ls debian/*.deb)
-
version=$(echo $debian_file| cut -f2 -d"_")
-
echo "PUT $debian_file /docker/incoming" | sftp -o StrictHostKeyChecking=no user@debian-repo
-
ssh root@debian-repo /usr/local/sbin/reprepro-import
-
apt-add-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main"
-
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
-
apt-add-repository "deb http://repo-r3lab.uni.lu/debian/ stable main"
-
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xcb185f4e31872412
-
apt-get update
# auto accept oracle license
-
echo debconf shared/accepted-oracle-license-v1-1 select
true
| debconf-set-selections
#hacky way of installing minerva on docker - by default rc-invoke is preventing services changes on docker
-
mv /usr/sbin/policy-rc.d /usr/sbin/policy-rc.d.backup
-
mv Docker/policy-rc.d /usr/sbin/policy-rc.d
-
apt-get install -y --allow-unauthenticated minerva
#local repository with new version
-
apt-add-repository "deb http://debian-repo/ unstable main"
-
apt-get update
-
apt-get dist-upgrade -y --allow-unauthenticated
-
mv /usr/sbin/policy-rc.d.backup /usr/sbin/policy-rc.d
-
service tomcat8 start
#we need to wait a bit for tomcat start
-
sleep
15
-
wget http://localhost:8080/minerva/
#test if we can login and get configuration using new version
-
test 200 = $(curl --write-out %{http_code} --silent --output /dev/null -c cookie.txt http://localhost:8080/minerva/api/doLogin)
-
test 200 = $(curl --write-out %{http_code} --silent --output configuration.json --cookie cookie.txt http://localhost:8080/minerva/api/configuration/)
-
test 1 = $(cat configuration.json| grep $version | wc -l)
test_install_debian_package
:
image
:
debian
stage
:
test
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment