Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,43 @@ language: minimal
services:
- docker

matrix:
jobs:
include:
- stage: Test
language: go
go: "1.14.x"
script: make unit-test
env: GO_UNIT_TESTS=TRUE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these vars used anywhere else? Forgive my lack of Travis knowledge but my thinking is that there's another location these need to be removed from

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, these were there because I didn't realize there was a name field for a travis job. The Travis job running page displays env vars, so I was using these to label the tests, but they're not needed since the jobs are named now.

name: Unit Tests
after_success: bash <(curl -s https://codecov.io/bash) -v
- stage: Test
script: make go-report-card-test
env: GO_REPORT_CARD=true
name: Go Report Card Tests
- stage: Test
script: make spellcheck
env: SPELLCHECK=true
name: Markdown Spellcheck
- stage: Test
script: make build-binaries
name: Build Binaries
- stage: Test
script: make build-docker-images
name: Build Docker Images
- stage: Test
if: type = push AND env(DOCKERHUB_USERNAME) IS present
script: make readme-codeblock-test
env: README_CODEBLOCK_TEST=true
name: README Codeblock Executions Test
- stage: Test
if: type = push AND env(DOCKERHUB_USERNAME) IS present
script: make output-validation-test
env: CFN_AND_TERRAFORM_OUTPUT_VALIDATION_TESTS=true
name: CFN/Terraform Output Validation Tests
- stage: Test
if: type = push AND env(GITHUB_TOKEN) IS present
script: test/license-test/run-license-test.sh
env: LICENSE_TEST=true
name: License Test
- stage: Deploy
if: type = push AND env(DOCKERHUB_USERNAME) IS present
script: make sync-readme-to-dockerhub
env: SYNC_README_TO_DOCKERHUB=true
name: Sync README to Dockerhub
- stage: Deploy
if: type = push AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ AND env(DOCKERHUB_USERNAME) IS present
script: make release
env: RELEASE_ASSETS=true

name: Release Assets
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fmt:
goimports -w ./ && gofmt -s -w ./

docker-build:
${MAKEFILE_PATH}/scripts/build-docker-images -d -p ${GOOS}/${GOARCH} -r ${IMG} -v ${VERSION}
${MAKEFILE_PATH}/scripts/build-docker-images -p ${GOOS}/${GOARCH} -r ${IMG} -v ${VERSION}

docker-run:
docker run ${IMG_W_TAG}
Expand All @@ -36,7 +36,7 @@ docker-push:
docker push ${IMG_W_TAG}

build-docker-images:
${MAKEFILE_PATH}/scripts/build-docker-images -d -p ${SUPPORTED_PLATFORMS} -r ${IMG} -v ${VERSION}
${MAKEFILE_PATH}/scripts/build-docker-images -p ${SUPPORTED_PLATFORMS} -r ${IMG} -v ${VERSION}

push-docker-images:
@echo ${DOCKERHUB_TOKEN} | docker login -u ${DOCKERHUB_USERNAME} --password-stdin
Expand Down Expand Up @@ -66,7 +66,7 @@ output-validation-test:
${MAKEFILE_PATH}/test/output-validation-test/test-output-validation

build-binaries:
${MAKEFILE_PATH}/scripts/build-binaries -d -p ${SUPPORTED_PLATFORMS} -v ${VERSION}
${MAKEFILE_PATH}/scripts/build-binaries -p ${SUPPORTED_PLATFORMS} -v ${VERSION}

## requires a github token
upload-resources-to-github:
Expand Down