Commit c1d7a3f1 authored by Ash McKenzie's avatar Ash McKenzie

Move CI install/update logic into support/ci/xxx

parent e8e429df
......@@ -87,51 +87,19 @@ test:install:
stage: test
artifacts:
paths:
- ./*.log
- ./gitlab/log/*.log
- ./gitlab-development-kit/gitlab/log/*.log
expire_in: 2 days
when: always
script:
- source /home/gdk/.bash_profile
- gem install -N bundler:1.17.3
- cd gem
- gem build gitlab-development-kit.gemspec
- gem install gitlab-development-kit-*.gem
- cd /home/gdk
- gdk init
- cd gitlab-development-kit
- git remote set-url origin $CI_REPOSITORY_URL
- git fetch
- git checkout $CI_COMMIT_SHA
- netstat -lpt
- IGNORE_INSTALL_WARNINGS=true gdk install
- support/set-gitlab-upstream
- killall node || true
- gdk run &
- sleep 30
- curl -f --retry 60 --retry-delay 5 http://127.0.0.1:3000/users/sign_in
- support/ci/test_install
test:update:
image: $TEST_IMAGE
stage: test
artifacts:
paths:
- ./*.log
- ./gitlab/log/*.log
- ./gitlab-development-kit/gitlab/log/*.log
expire_in: 2 days
when: always
script:
- source /home/gdk/.bash_profile
- gem install -N bundler:1.17.3
- gem install gitlab-development-kit
- cd /home/gdk
- gdk init
- cd gitlab-development-kit
- netstat -lpt
- IGNORE_INSTALL_WARNINGS=true gdk install
- support/set-gitlab-upstream
- killall node || true
- gdk run &
- sleep 30
- curl -f --retry 60 --retry-delay 5 http://127.0.0.1:3000/users/sign_in
- IGNORE_INSTALL_WARNINGS=true gdk update
- support/ci/test_update
# vim: filetype=sh
GDK_CHECKOUT_PATH="$(pwd)/gitlab-development-kit"
init() {
source ${HOME}/.bash_profile
gem install -N bundler:1.17.3
cd gem
gem build gitlab-development-kit.gemspec
gem install gitlab-development-kit-*.gem
gdk init ${GDK_CHECKOUT_PATH}
}
checkout() {
cd ${GDK_CHECKOUT_PATH}
git remote set-url origin ${CI_REPOSITORY_URL}
git fetch
git checkout ${1}
}
install() {
cd ${GDK_CHECKOUT_PATH}
netstat -lpt
echo "> Installing GDK.."
IGNORE_INSTALL_WARNINGS=true gdk install
support/set-gitlab-upstream
}
update() {
cd ${GDK_CHECKOUT_PATH}
netstat -lpt
echo "> Updating GDK.."
IGNORE_INSTALL_WARNINGS=true gdk update
support/set-gitlab-upstream
}
run() {
cd ${GDK_CHECKOUT_PATH}
killall node || true
echo "> Starting up GDK.."
gdk run
}
test_url() {
echo "> Testing GDK.."
curl -f --retry 60 --retry-delay 5 http://127.0.0.1:3000/users/sign_in
}
#!/bin/bash -e
source support/ci/functions
init
checkout ${CI_COMMIT_SHA}
install
run &
echo "> Waiting 45 secs to give GDK a change to boot up.."
sleep 45
test_url
#!/bin/bash -e
source support/ci/functions
init
checkout "master"
install
run &
echo "> Waiting 45 secs to give GDK a change to boot up.."
sleep 45
checkout ${CI_COMMIT_SHA}
update
echo "> Waiting 60 secs to give GDK a change to boot up.."
sleep 60
test_url
Markdown is supported
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