2020-04-07 14:01:01 -04:00
|
|
|
image: docker:stable
|
|
|
|
|
|
|
|
services:
|
2021-09-03 09:25:21 -04:00
|
|
|
- docker:stable-dind
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
2020-04-07 14:01:01 -04:00
|
|
|
|
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
|
|
|
|
2021-09-03 09:25:21 -04:00
|
|
|
variables:
|
|
|
|
UBUNTU_TESTING_IMAGE_TAG: "$CI_REGISTRY_IMAGE/gitlabci_outputs/ubuntu_testing:$CI_COMMIT_SHA"
|
|
|
|
|
|
|
|
build-ubuntu-test-image:
|
|
|
|
stage: build
|
2020-04-07 14:01:01 -04:00
|
|
|
script:
|
2021-09-03 09:25:21 -04:00
|
|
|
- >
|
|
|
|
docker login "$CI_REGISTRY"
|
|
|
|
--username "$CI_REGISTRY_USER"
|
|
|
|
--password "$CI_REGISTRY_PASSWORD"
|
2020-04-07 19:58:57 -04:00
|
|
|
- mkdir Dockercontext
|
2020-04-07 14:01:01 -04:00
|
|
|
- >
|
2021-09-03 09:25:21 -04:00
|
|
|
docker build
|
|
|
|
-t $UBUNTU_TESTING_IMAGE_TAG
|
2021-11-05 08:14:27 -04:00
|
|
|
$($CI_PROJECT_DIR/build_scripts/GitlabCI/getRepoArgs.sh)
|
2020-04-07 20:29:17 -04:00
|
|
|
--file $CI_PROJECT_DIR/build_scripts/GitlabCI/gitlabCI.Dockerfile
|
2020-04-07 14:27:15 -04:00
|
|
|
Dockercontext
|
2021-09-03 09:25:21 -04:00
|
|
|
- docker push $UBUNTU_TESTING_IMAGE_TAG
|
|
|
|
- echo UBUNTU_TESTING_IMAGE_TAG=$UBUNTU_TESTING_IMAGE_TAG
|
|
|
|
|
|
|
|
test-ubuntu:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- >
|
|
|
|
docker login "$CI_REGISTRY"
|
|
|
|
--username "$CI_REGISTRY_USER"
|
|
|
|
--password "$CI_REGISTRY_PASSWORD"
|
|
|
|
- echo UBUNTU_TESTING_IMAGE_TAG=$UBUNTU_TESTING_IMAGE_TAG
|
|
|
|
- docker pull $UBUNTU_TESTING_IMAGE_TAG
|
2020-04-07 14:01:01 -04:00
|
|
|
- >
|
2021-09-03 09:25:21 -04:00
|
|
|
docker run --name retroshare --detach --tty $UBUNTU_TESTING_IMAGE_TAG
|
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-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" }'
|
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
|