RetroShare/.gitlab-ci.yml

50 lines
1.7 KiB
YAML
Raw Normal View History

2020-04-07 14:01:01 -04:00
image: docker:stable
services:
- docker:stable-dind
workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_BRANCH
2020-04-07 14:01:01 -04:00
build-and-test:
script:
- >
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
- mkdir Dockercontext
2020-04-07 14:01:01 -04:00
- >
docker build -t retroshare:testing $MR_ARGS
--file $CI_PROJECT_DIR/build_scripts/GitlabCI/gitlabCI.Dockerfile
Dockercontext
2020-04-07 14:01:01 -04:00
- >
docker run --name retroshare --detach --tty retroshare:testing
retroshare-service --jsonApiPort 9092
- apk add jq
2020-04-07 14:01:01 -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
- >
docker exec retroshare
curl --verbose http://127.0.0.1:9092/rsLoginHelper/getLocations | jq
2020-04-07 14:01:01 -04:00
- >
docker exec retroshare
curl --verbose --data
2020-04-08 05:23:35 -04:00
'{ "location":{ "mLocationName":"Test 1", "mPgpName":"Test2" },
2020-04-07 17:05:40 -04:00
"password":"Test 3", "caller_data":"Test 5" }'
http://127.0.0.1:9092/rsLoginHelper/createLocation | jq
2020-04-07 14:01:01 -04:00
- >
docker exec retroshare
curl --verbose http://127.0.0.1:9092/rsLoginHelper/getLocations | jq
2020-04-07 14:01:01 -04:00
- >
docker exec retroshare
curl --verbose http://127.0.0.1:9092/rsLoginHelper/isLoggedIn | jq
2020-04-07 14:01:01 -04:00
- >
docker exec retroshare
curl --verbose http://127.0.0.1:9092/rsMsgs/getChatLobbyList | jq
2020-04-07 14:01:01 -04:00
- docker container stop retroshare