-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f472c90
commit 282fd20
Showing
11 changed files
with
90 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
#!/bin/sh | ||
# | ||
# This script installs dependencies on travis | ||
# | ||
#!/bin/bash | ||
# This script prepares the CI build for running | ||
|
||
############################################################################### | ||
# Script content for 'Build' step | ||
############################################################################### | ||
# | ||
# Either invoke as described above or copy into an 'Execute shell' 'Command'. | ||
# | ||
echo "Configuring backend" | ||
sed -i -e "s|my \$hostname = .*$|my \$hostname = 'localhost';|" \ | ||
-e "s|our \$bsuser = 'obsrun';|our \$bsuser = 'jenkins';|" \ | ||
-e "s|our \$bsgroup = 'obsrun';|our \$bsgroup = 'jenkins';|" src/backend/BSConfig.pm.template | ||
cp src/backend/BSConfig.pm.template src/backend/BSConfig.pm | ||
chmod a+x src/api/script/start_test_backend | ||
|
||
set -xe | ||
pushd src/api | ||
echo "Creating database" | ||
mysql -e 'create database ci_api_test;' | ||
|
||
sudo chmod a+w /etc/apt/sources.list.d | ||
echo 'deb http://download.opensuse.org/repositories/OBS:/Server:/Unstable/xUbuntu_12.04 /' > /etc/apt/sources.list.d/opensuse.list | ||
#sudo apt-get update | ||
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/opensuse.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | ||
echo "Configuring database" | ||
cp config/database.yml.example config/database.yml | ||
sed -e 's,password:.*,password:,' -i config/database.yml | ||
sed -i "s|database: api|database: ci_api|" config/database.yml | ||
|
||
cat > /etc/apt/sources.list.d/security.list << EOF | ||
deb http://security.ubuntu.com/ubuntu precise-security main restricted | ||
deb http://security.ubuntu.com/ubuntu precise-security universe | ||
deb http://security.ubuntu.com/ubuntu precise-security multiverse | ||
EOF | ||
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/security.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | ||
echo "Configuring frontend" | ||
cp config/options.yml.example config/options.yml | ||
cp config/thinking_sphinx.yml.example config/thinking_sphinx.yml | ||
chmod a+x script/start_test_api | ||
|
||
# dependencies of backend | ||
sudo apt-get install --force-yes travis-deps libxml-parser-perl libfile-sync-perl python-rpm python-urlgrabber python-sqlitecachec python-libxml2 createrepo libbssolv-perl sphinxsearch libjson-xs-perl libxml-simple-perl libgd-gd2-perl | ||
echo "Initialize database" | ||
bundle exec rake db:drop db:create db:setup --trace | ||
|
||
pushd src/api | ||
if test "$REMOVEGEMLOCK" = true; then | ||
rm Gemfile.lock | ||
fi | ||
gem install bundler | ||
echo 'gem "coveralls"' >> Gemfile | ||
bundle install | ||
# Stuff | ||
# travis rvm can not deal with our extended executable names | ||
sed -i 1,1s,\.ruby2\.2,, {script,bin}/* | ||
# Clear temp data | ||
rm -rf log/* tmp/cache tmp/sessions tmp/sockets | ||
popd | ||
|
||
echo "Build apidocs" | ||
pushd docs/api | ||
make | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# This script installs dependencies for the CI build | ||
|
||
# Be verbose and fail script on the first error | ||
set -xe | ||
|
||
# Install updates from our own repository | ||
sudo chmod a+w /etc/apt/sources.list.d | ||
echo 'deb http://download.opensuse.org/repositories/OBS:/Server:/Unstable/xUbuntu_12.04 /' > /etc/apt/sources.list.d/opensuse.list | ||
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/opensuse.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | ||
|
||
# Install ubuntu security updates | ||
cat > /etc/apt/sources.list.d/security.list << EOF | ||
deb http://security.ubuntu.com/ubuntu precise-security main restricted | ||
deb http://security.ubuntu.com/ubuntu precise-security universe | ||
deb http://security.ubuntu.com/ubuntu precise-security multiverse | ||
EOF | ||
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/security.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | ||
|
||
# Install the dependencies of the backend | ||
sudo apt-get install --force-yes travis-deps libxml-parser-perl libfile-sync-perl python-rpm python-urlgrabber python-sqlitecachec python-libxml2 createrepo libbssolv-perl sphinxsearch libjson-xs-perl libxml-simple-perl libgd-gd2-perl |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.