From 212b16c56f3eb2e96f7a001fb816566d81c86514 Mon Sep 17 00:00:00 2001 From: mairea50 Date: Wed, 6 Mar 2019 14:35:25 +0200 Subject: [PATCH] Add init Dockerfile and travis --- .dockerignore | 2 ++ .gitlab-ci.yml | 2 ++ .travis.yml | 18 +++++++++++++++++- Dockerfile | 3 +++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..d582abc9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +**/README.md +.gitlab-ci.yml \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..001b13ed --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,2 @@ +variables: + TERRAFORM_VERSION: 'xxx' \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 906759e6..377958d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,23 @@ install: - true script: - - make $TARGETS + - go get + - make + - export REPO=maireanu/zfsbeat + - export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH; fi` + - echo "$DOCKER_PASS" | docker login --username "$DOCKER_USER" --password-stdin + - docker build --pull --force-rm -t $REPO:$TAG . + - docker push $REPO:$TAG + +deploy: + provider: releases + api_key: + secure: $GH_TOKEN + skip_cleanup: true + file: + - consulbeat + on: +tags: true after_success: # Copy full.cov to coverage.txt because codecov.io requires this file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..0f8ea529 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch + +ADD zfsbeat /usr/local/bin/ \ No newline at end of file