Skip to content

Commit

Permalink
adds support for latest builds in master (#279)
Browse files Browse the repository at this point in the history
* adds support for latest builds in master

- adds static and generated to gitignore
- makes static and generated targets phony so they're always generated
- generated manifests use the `latest` tag by default if VERSION not
  provided for the Kubeapps core components

* don't push docker images in pull requests
  • Loading branch information
prydonius authored Apr 27, 2018
1 parent e5cb553 commit e8bdee6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1,255 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/kubeapps
/statik
/generated
.GOPATH
*.*~
telepresence.log
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ jobs:
script: make VERSION="$VERSION" $IMAGE
after_success:
- |
if [[ -n "$TRAVIS_TAG" ]]; then
if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "master" ]]; then
docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}"
docker push $IMAGE:$VERSION
if [[ -n "$TRAVIS_TAG" ]]; then
docker push $IMAGE:$VERSION
fi
docker tag $IMAGE:$VERSION $IMAGE:latest
docker push $IMAGE:latest
fi
- <<: *imageBuild
env: IMAGE=kubeapps/chartsvc
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $(EMBEDDED_STATIC): static/kubeapps-objs.yaml
$(GO) generate

static/kubeapps-objs.yaml:
KUBEAPPS_VERSION=$$(git describe --tags --abbrev=0) ;\
KUBEAPPS_VERSION=$${VERSION:-latest} ;\
pushd manifests/vendor/kubeless ;\
KUBELESS_VERSION=$$(git describe --tags --abbrev=0) ;\
popd ;\
Expand All @@ -44,4 +44,4 @@ vet:
clean:
$(RM) ./kubeapps ./chart-repo ./statik $(EMBEDDED_STATIC) static/kubeapps-objs.yaml

.PHONY: default test fmt vet clean build-prep chart-repo kubeapps
.PHONY: default test fmt vet clean build-prep chart-repo kubeapps $(EMBEDDED_STATIC) static/kubeapps-objs.yaml
12 changes: 0 additions & 12 deletions generated/statik/statik.go

This file was deleted.

2 changes: 2 additions & 0 deletions static/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
Loading

0 comments on commit e8bdee6

Please sign in to comment.