mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-18 15:55:30 +00:00
Finished local testing
This commit is contained in:
parent
0163bf45c9
commit
d4e2911903
11
.travis.yml
11
.travis.yml
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user