|
40 | 40 | # Install docker-compose |
41 | 41 | - apk add --no-cache py2-pip && pip install docker-compose |
42 | 42 |
|
43 | | - # Change to 'tests', export the test image name, patch the network names |
44 | | - # so they're unique in the event of concurrent runs, compose up under a |
45 | | - # unique project name and begin executing tests. |
| 43 | + # Pull the test image and start the stack without rebuilding it. |
46 | 44 | - cd tests |
47 | | - - export TEST_IMAGE=${CONTAINER_TEST_IMAGE} |
48 | | - - sed -i -E "s/TEST_NETWORK/"${CI_COMMIT_REF_SLUG}"/g" docker-compose.yml |
| 45 | + - docker pull ${CONTAINER_TEST_IMAGE} |
49 | 46 | - docker-compose -p ${CI_COMMIT_REF_SLUG} up -d --no-build |
50 | 47 | - docker-compose -p ${CI_COMMIT_REF_SLUG} exec -T rest |
51 | 48 | bash -l -c 'yum install -y rh.SigGen rh.FileWriter' |
|
54 | 51 |
|
55 | 52 | # Clean up and exit with the result |
56 | 53 | - docker-compose -p ${CI_COMMIT_REF_SLUG} down |
57 | | - - docker rmi $CONTAINER_TEST_IMAGE} |
| 54 | + - docker rmi ${CONTAINER_TEST_IMAGE} |
58 | 55 | - exit ${RESULT} |
59 | 56 |
|
60 | 57 | # Move the test image to internal 'latest' and clean up the worker's images |
@@ -92,8 +89,8 @@ deploy-image: |
92 | 89 | - docker pull $CONTAINER_RELEASE_IMAGE |
93 | 90 | - docker logout |
94 | 91 | - docker login -u ${DOCKERHUB_USER} -p ${DOCKERHUB_TOKEN} |
95 | | - - docker tag $CONTAINER_RELEASE_IMAGE $dockerhub_image_tag |
96 | | - - docker tag $CONTAINER_RELEASE_IMAGE $dockerhub_image_latest |
| 92 | + - docker tag $CONTAINER_RELEASE_IMAGE ${dockerhub_image_tag} |
| 93 | + - docker tag $CONTAINER_RELEASE_IMAGE ${dockerhub_image_latest} |
97 | 94 | - docker push ${dockerhub_image_tag} ${dockerhub_image_latest} |
98 | 95 | - docker rmi ${CONTAINER_RELEASE_IMAGE} ${dockerhub_image_tag} ${dockerhub_image_latest} |
99 | 96 |
|
|
0 commit comments