Finished local testing

This commit is contained in:
Justin 2018-05-20 11:16:03 -04:00
parent 0163bf45c9
commit d4e2911903
3 changed files with 12 additions and 7 deletions

View File

@ -12,17 +12,16 @@ cache:
before_script:
## Spin up container
- cd test/docker/
- docker-compose -f docker-compose.test.yml up -d
- docker-compose -f docker-compose.test.yml up
- docker exec -i gitlab printenv
## Get the docker env variables
- PERSONAL_ACCESS_TOKEN=$(docker exec -i gitlab printenv)
- GITLAB_URL=$(docker exec -i gitlab echo $GITLAB_URL)
- echo $PERSONAL_ACCESS_TOKEN
- echo $GITLAB_URL
- export PERSONAL_ACCESS_TOKEN=$(docker exec -i gitlab printenv)
- export GITLAB_URL=$(docker exec -i gitlab echo $GITLAB_URL)
## Sleep before performing commands on container
- sleep 30
- env
## run tests
script:
- npm run test

View File

@ -4,6 +4,9 @@ services:
image: gitlab/gitlab-ce
container_name: gitlab
entrypoint: init/docker-entrypoint
environment:
- EXTERNAL_PORT=8080
- PERSONAL_ACCESS_TOKEN
ports:
- 8080:80
- 8443:443

View File

@ -7,7 +7,10 @@ echo Sleep for 30 seconds to ensure all services are running
sleep 30
echo Initalize test token and user
export PERSONAL_ACCESS_TOKEN="$(gitlab-rails r /init/test.rb)"
PERSONAL_ACCESS_TOKEN="$(gitlab-rails r /init/test.rb)"
echo "export PERSONAL_ACCESS_TOKEN=$PERSONAL_ACCESS_TOKEN" >> ~/.bashrc
echo "export GITLAB_URL=http://localhost:$EXTERNAL_PORT" >> ~/.bashrc
echo Tail and wait
gitlab-ctl tail&