Skip to content

Instantly share code, notes, and snippets.

@kainlite
Created May 1, 2019 17:10
Show Gist options
  • Select an option

  • Save kainlite/55c5fcd1fde0bfc148b8a9ee8a41fc5a to your computer and use it in GitHub Desktop.

Select an option

Save kainlite/55c5fcd1fde0bfc148b8a9ee8a41fc5a to your computer and use it in GitHub Desktop.
whatismyip-go
language: go
services:
- docker
before_install:
- docker build --no-cache -t ${TRAVIS_REPO_SLUG}:${TRAVIS_COMMIT} .
- docker run ${TRAVIS_REPO_SLUG}:${TRAVIS_COMMIT} /go/src/github.com/kainlite/whatismyip-go/whatismyip-go.test
- docker run -d -p 127.0.0.1:8000:8000 ${TRAVIS_REPO_SLUG}:${TRAVIS_COMMIT}
script:
- curl 127.0.0.1:8000
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push ${TRAVIS_REPO_SLUG}:${TRAVIS_COMMIT}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment