GitlabCI remove unuseful steps and fix variable

This commit is contained in:
Gioacchino Mazzurco 2020-04-08 02:23:02 +02:00
parent 490ac43d02
commit 5f85a897ba
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -10,25 +10,19 @@ workflow:
build-and-test:
script:
- >
docker login "$CI_REGISTRY"
--username "$CI_REGISTRY_USER" --password "$CI_REGISTRY_PASSWORD"
- >
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 ;
export CI_REGISTRY_IMAGE="registry.gitlab.com/retroshare/retroshare" ;
fi
- docker pull "$CI_REGISTRY_IMAGE:base"
- mkdir Dockercontext
- >
docker build -t "$CI_REGISTRY_IMAGE:testing" $MR_ARGS
--file /builds/RetroShare/RetroShare/build_scripts/GitlabCI/gitlabCI.Dockerfile
docker build -t retroshare:testing $MR_ARGS
--file /builds/$CI_MERGE_REQUEST_SOURCE_PROJECT_PATH/build_scripts/GitlabCI/gitlabCI.Dockerfile
Dockercontext
- >
docker run --name retroshare --detach --tty
"$CI_REGISTRY_IMAGE:testing"
docker run --name retroshare --detach --tty retroshare:testing
retroshare-service --jsonApiPort 9092
- apk add jq
- >