2020-04-07 14:01:01 -04:00
|
|
|
image: docker:stable
|
|
|
|
|
|
|
|
services:
|
|
|
|
- docker:stable-dind
|
|
|
|
|
2020-04-07 14:42:37 -04:00
|
|
|
workflow:
|
|
|
|
rules:
|
|
|
|
- if: $CI_MERGE_REQUEST_ID
|
|
|
|
- if: $CI_COMMIT_BRANCH
|
2020-04-07 14:01:01 -04:00
|
|
|
|
|
|
|
build-and-test:
|
|
|
|
script:
|
|
|
|
- >
|
2020-04-07 14:27:15 -04:00
|
|
|
if [ -n "$CI_MERGE_REQUEST_ID" ]; then
|
|
|
|
MR_ARGS="--build-arg REPO_URL=$CI_MERGE_REQUEST_SOURCE_PROJECT_URL" ;
|
|
|
|
MR_ARGS="$MR_ARGS --build-arg REPO_BRANCH=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" ;
|
|
|
|
export MR_ARGS ;
|
|
|
|
fi
|
2020-04-07 19:58:57 -04:00
|
|
|
- mkdir Dockercontext
|
2020-04-07 14:01:01 -04:00
|
|
|
- >
|
2020-04-07 20:23:02 -04:00
|
|
|
docker build -t retroshare:testing $MR_ARGS
|
|
|
|
--file /builds/$CI_MERGE_REQUEST_SOURCE_PROJECT_PATH/build_scripts/GitlabCI/gitlabCI.Dockerfile
|
2020-04-07 14:27:15 -04:00
|
|
|
Dockercontext
|
2020-04-07 14:01:01 -04:00
|
|
|
- >
|
2020-04-07 20:23:02 -04:00
|
|
|
docker run --name retroshare --detach --tty retroshare:testing
|
2020-04-07 14:27:15 -04:00
|
|
|
retroshare-service --jsonApiPort 9092
|
2020-04-07 19:58:57 -04:00
|
|
|
- apk add jq
|
2020-04-07 14:01:01 -04:00
|
|
|
- >
|
2020-04-07 14:27:15 -04:00
|
|
|
docker exec retroshare
|
2020-04-07 17:05:40 -04:00
|
|
|
curl --verbose http://127.0.0.1:9092/rsJsonApi/version | jq
|
2020-04-07 14:01:01 -04:00
|
|
|
- >
|
2020-04-07 14:27:15 -04:00
|
|
|
docker exec retroshare
|
2020-04-07 15:41:12 -04:00
|
|
|
curl --verbose http://127.0.0.1:9092/rsLoginHelper/getLocations | jq
|
2020-04-07 14:01:01 -04:00
|
|
|
- >
|
2020-04-07 14:27:15 -04:00
|
|
|
docker exec retroshare
|
|
|
|
curl --verbose --data
|
2020-04-07 17:05:40 -04:00
|
|
|
'{ "location":{ "mLocationName":"Test 1", "mPpgName":"Test2" },
|
|
|
|
"password":"Test 3", "caller_data":"Test 5" }'
|
2020-04-07 15:41:12 -04:00
|
|
|
http://127.0.0.1:9092/rsLoginHelper/createLocation | jq
|
2020-04-07 14:01:01 -04:00
|
|
|
- >
|
2020-04-07 14:27:15 -04:00
|
|
|
docker exec retroshare
|
2020-04-07 15:41:12 -04:00
|
|
|
curl --verbose http://127.0.0.1:9092/rsLoginHelper/getLocations | jq
|
2020-04-07 14:01:01 -04:00
|
|
|
- >
|
2020-04-07 14:27:15 -04:00
|
|
|
docker exec retroshare
|
2020-04-07 15:41:12 -04:00
|
|
|
curl --verbose http://127.0.0.1:9092/rsLoginHelper/isLoggedIn | jq
|
2020-04-07 14:01:01 -04:00
|
|
|
- >
|
2020-04-07 14:27:15 -04:00
|
|
|
docker exec retroshare
|
2020-04-07 15:41:12 -04:00
|
|
|
curl --verbose http://127.0.0.1:9092/rsMsgs/getChatLobbyList | jq
|
2020-04-07 14:01:01 -04:00
|
|
|
- docker container stop retroshare
|