Commit 635692e8 authored by Rigel Kent's avatar Rigel Kent Committed by zauberstuhl

🐳 move docker workflow to feneas registry

parent d22f82f2
......@@ -156,9 +156,9 @@ fi
Last final step before we have a fully functional docker image is to build the actual image:
docker build --no-cache -t feneas/testsuite_testproject:v1.0.3-testproject .
docker build --no-cache -t registry.git.feneas.org/feneas/federation/testsuite_testproject:v1.0.3-testproject .
The testsuite requires a special naming for every image: `feneas/testsuite_<project>:<version>-<project>`
The testsuite requires a special naming for every image: `registry.git.feneas.org/feneas/federation/testsuite_<project>:<version>-<project>`
If we succesfully build the docker image we have to commit our changes
and create a project tag and we are done with the image part:
......
......@@ -6,14 +6,14 @@ project=$(echo $CI_COMMIT_TAG |cut -d- -f2)
cd $CI_PROJECT_DIR/projects/$project || exit 1
# authenticate with docker registry first
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD || exit 1
docker login $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY || exit 1
# build the image locally
docker build -t \
feneas/testsuite_${project}:$CI_COMMIT_TAG . || exit 1
${CI_REGISTRY_IMAGE}_${project}:$CI_COMMIT_TAG . || exit 1
# overwrite latest-tag with new image
docker tag feneas/testsuite_${project}:$CI_COMMIT_TAG \
feneas/testsuite_${project}:latest || exit 1
docker tag ${CI_REGISTRY_IMAGE}_${project}:$CI_COMMIT_TAG \
${CI_REGISTRY_IMAGE}_${project}:latest || exit 1
# upload the image and both tags
docker push feneas/testsuite_${project}:$CI_COMMIT_TAG || exit 1
docker push feneas/testsuite_${project}:latest || exit 1
docker push ${CI_REGISTRY_IMAGE}_${project}:$CI_COMMIT_TAG || exit 1
docker push ${CI_REGISTRY_IMAGE}_${project}:latest || exit 1
export btf=$(basename $BATS_TEST_FILENAME)
export curl_params="/tmp/.bats-curl_params"
export test_id="/tmp/.bats-test_id"
export CI_REGISTRY_IMAGE="registry.git.feneas.org/feneas/federation/testsuite"
unset HTTP_STATUS_CODE
unset HTTP_BODY
......@@ -82,11 +83,11 @@ function start_app() {
params="-e PROJECT=$PROJECT -e PRSHA=$PRSHA -e PRREPO=$PRREPO"
fi
cid=$(container_id "$1")
echo "Starting docker container $cid (feneas/testsuite_$3) on port $2"
echo "Starting docker container $cid (${CI_REGISTRY_IMAGE}_$3) on port $2"
docker run --name=$cid $params \
--link $(container_id "postgres"):postgreshost \
--link $(container_id "redis"):redishost \
-e DATABASE=$1 -e PORT=$2 -d feneas/testsuite_$3
-e DATABASE=$1 -e PORT=$2 -d ${CI_REGISTRY_IMAGE}_$3
}
# stop_app "g1"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment