forked from ghostec/Will.IAM
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
language: go | ||
go: | ||
- '1.13' | ||
services: | ||
- docker | ||
cache: | ||
directories: | ||
- "$GOPATH/pkg" | ||
before_install: | ||
- go get github.com/mattn/goveralls | ||
install: | ||
- make ci/install | ||
script: | ||
- make ci/test | ||
after_success: | ||
- goveralls -coverprofile=coverage.out -service=travis-ci | ||
|
||
go: '1.13' | ||
|
||
jobs: | ||
include: | ||
- stage: "Tests" | ||
cache: | ||
directories: | ||
- "$GOPATH/pkg" | ||
services: | ||
- docker | ||
before_install: | ||
- go get github.com/mattn/goveralls | ||
install: | ||
- make ci/install | ||
after_success: | ||
- goveralls -coverprofile=coverage.out -service=travis-ci | ||
name: "Unit tests" | ||
script: | ||
- make ci/test/unit | ||
- script: | ||
- make ci/test/integration | ||
name: "Integration tests" | ||
- stage: deploy | ||
if: branch = master AND type = push | ||
services: docker | ||
script: | ||
- push_to_docker.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# The image build step occurs only when a build is triggered by a commit being merged into the "master" branch. | ||
# Given that the "master" branch is protected, the only way to trigger a build from the "master" branch is when a PR | ||
# is merged into it. This way, we avoid storing images from non-stable branches. | ||
VERSION=$(cat ./version/version.go | grep "var VERSION" | awk ' { print $4 } ' | sed s/\"//g) | ||
|
||
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" | ||
|
||
docker build -t will-iam . | ||
docker tag will-iam:latest tfgco/will-iam:$VERSION.$TRAVIS_BUILD_NUMBER | ||
docker tag will-iam:latest tfgco/will-iam:$VERSION | ||
docker tag will-iam:latest tfgco/will-iam:latest | ||
docker push tfgco/will-iam:$VERSION.$TRAVIS_BUILD_NUMBER | ||
docker push tfgco/will-iam:$VERSION | ||
docker push tfgco/will-iam:latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package version | ||
|
||
var VERSION = "8.6.0" |