Skip to content

Commit

Permalink
add dgoss
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Faircloth committed Jun 29, 2019
1 parent 03899dc commit e2ad659
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
40 changes: 36 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,35 @@
- run:
name: Push Docker image
command: docker push $IMAGE_NAME:$CIRCLE_SHA1
dgoss:
environment:
IMAGE_NAME: rfaircloth/scs
docker:
- image: circleci/buildpack-deps:stretch
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Docker Login
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run:
name: Docker pull
command: docker pull $IMAGE_NAME:$CIRCLE_SHA1
- run:
name: Install goss
command: |
# rather than give internet scripts SU rights, we install to local user bin and add to path
curl -fsSL https://goss.rocks/install | sh
- run:
name: Test Docker
command: |
export GOSS_OPTS="--max-concurrent=1 --format junit"
export GOSS_FILES_STRATEGY=cp
mkdir -p /root/test-results
pushd package
dgoss run -t $IMAGE_NAME:$CIRCLE_SHA1 3>&1 1>&2 2>&3 > /tmp/goss.tmp || true ; cat /tmp/goss.tmp | grep -v "<"
popd
cat /tmp/goss.tmp | grep "[<\>]" > /root/test-results/goss.xml
publish:
environment:
IMAGE_NAME: rfaircloth/scs
Expand All @@ -35,13 +64,13 @@
name: Docker Login
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run:
name: Tag Docker pull
name: Docker pull
command: docker pull $IMAGE_NAME:$CIRCLE_SHA1
- run:
name: Tag Docker image
name: Docker tag image
command: docker tag $IMAGE_NAME:$CIRCLE_SHA1 $IMAGE_NAME:$CIRCLE_BRANCH
- run:
name: Push Docker image
name: Docker push tag
command: docker push $IMAGE_NAME:$CIRCLE_BRANCH


Expand All @@ -51,9 +80,12 @@
build-publish:
jobs:
- build
- publish:
- dgoss:
requires:
- build
- publish:
requires:
- dgoss
filters:
branches:
only:
Expand Down
10 changes: 5 additions & 5 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e2ad659

Please sign in to comment.