Skip to content

Commit

Permalink
Publish docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Duchesne committed Jun 30, 2019
1 parent ec42ace commit 02e614d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,26 @@ install:
script:
- bash ./test.sh
- bash <(curl -s https://codecov.io/bash)

after_success:
# Login to dockerhub
- if [ "${TRAVIS_TAG::1}" = "v" ] || [ ${TRAVIS_BRANCH} == "master" ];
then
docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}";
fi
# Push version images (on tag)
- if [ "${TRAVIS_TAG::1}" = "v" ];
then
docker build . -t coveo/credentials-sync:${TRAVIS_TAG};
docker push coveo/credentials-sync:${TRAVIS_TAG};
fi
# Push latest version (on master)
- if [ ${TRAVIS_BRANCH} == "master" ];
then
docker build . -t coveo/credentials-sync:latest;
docker push coveo/credentials-sync:latest;
fi
# Release version to Github (on tag)
- if [ "${TRAVIS_TAG::1}" = "v" ]; then
curl -sL https://git.io/goreleaser | bash;
fi
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine

# ca-certificates is needed to download files from S3
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*

# Install the program
ADD credentials-sync /app/credentials-sync
WORKDIR /app

ENTRYPOINT ["/app/credentials-sync"]
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,15 @@ secret_text:
my_other_tag: ["value1", "value2"] # OR if my_other_tag == "value1" OR my_other_tag == "value2"
dont_match:
my_tag: ["other_value", "some_value"] # Will not sync to targets if my_tag == "other_value" or if my_tag == "some_value", regardless of `do_match`

```

## Using the docker image

For every version, a docker image is published here: https://hub.docker.com/r/coveo/credentials-sync
The only parameter needed for the credentials sync is the configuration file (You can set its location with `SYNC_CONFIG` env variable)
This allows you to run this as a cron job in AWS Fargate or Kubernetes for example


## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Expand Down

0 comments on commit 02e614d

Please sign in to comment.