Skip to content

Commit

Permalink
Adding CHECKPOINT flag. Will make it easier to verify things in the logs
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Andy <[email protected]>
  • Loading branch information
pascalandy committed Jul 22, 2019
1 parent 0162f7e commit cc5f5f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,26 +86,30 @@ after_script:
- docker logs ${CONTAINER_NAME};

- echo && echo "Unit tests (and keeping them in Travis logs) ==========>"

- echo "CHECKPOINT"
- echo && echo "1) Official docker unit test on the image ==========>"
- ~/official-images/test/run.sh "$IMAGE_SHA_SHORT"

- echo "CHECKPOINT"
- echo && echo "2) Docker exec checkpoints ==========>"
- docker exec -it ${CONTAINER_NAME} uname -a;
- docker exec -it ${CONTAINER_NAME} node --version;
- docker exec -it ${CONTAINER_NAME} cat /var/lib/ghost/current/content/themes/casper/package.json | grep version;
- docker exec -it ${CONTAINER_NAME} cat /var/lib/ghost/current/package.json | grep version;
- docker exec -it ${CONTAINER_NAME} curl -Is --head "http://localhost:2368" | grep -F -o "HTTP/1.1 200 OK" || echo "Error --> http://localhost:2368";

- echo "CHECKPOINT"
- echo && echo "3) Trivy scanner for Containers ==========>"
- docker run --rm -v /var/run/docker.sock:/var/run/docker.sock knqyf263/trivy:latest -q -d --exit-code 1 ${IMAGE_SHA_SHORT}

- echo "CHECKPOINT"
- echo && echo "4) MicroScanner scanner from Aqua Security ==========>"
- MICROSCANNER_TOKEN=${MICROSCANNER_TOKEN} ./scan.sh ${IMAGE_SHA_SHORT}

- echo && echo "Remove container ==========>"
- docker rm -f ${CONTAINER_NAME};

- echo "CHECKPOINT"
- echo && echo "Confirm our TAGS ==========>"
- echo & echo && echo GHOST_VERSION_DOCKERFILE=${GHOST_VERSION_DOCKERFILE} && echo GHOST_LATEST_RELEASE=${GHOST_LATEST_RELEASE} && echo GHOST_CLI_LATEST_RELEASE=${GHOST_CLI_LATEST_RELEASE} && echo GHOST_VERSION=${GHOST_VERSION} && echo && echo IMAGE_SHA_SHORT=${IMAGE_SHA_SHORT} && echo IMAGE_VERSION=${IMAGE_VERSION} && echo IMAGE_STABLE=${IMAGE_STABLE} && echo && echo "#IMAGE_SHA_SHORT=${IMAGE_SHA_SHORT}" && echo "#IMAGE_VERSION=${IMAGE_VERSION}" && echo "#IMAGE_STABLE=${IMAGE_STABLE}" && echo;

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ RUN set -eux && \

# LAYER upgrade — — — — — — — — — — — — — — — — — — — — — — — — — —
# The point is to keep trace of logs in Travis CI
FROM ghost-base AS ghost-what-to-upgrade
FROM ghost-base AS ghost-upgrade
COPY --from=ghost-builder --chown=node:node "${GHOST_INSTALL}" "${GHOST_INSTALL}"
RUN echo "CHECKPOINT"
RUN apk update
RUN apk info
RUN apk policy package
Expand Down

0 comments on commit cc5f5f6

Please sign in to comment.