Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add travis test for DockerHub images #49

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update script and makefile as suggested
Tomcli committed Apr 9, 2018
commit f5acf3d373ddfa0ec02ad0d205a3f493fd72e1cf
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -211,22 +211,22 @@ pull-dockerhub-images: ## Pull FfDL images from dockerhub
pull-dockerhub-images: $(addprefix pull-, $(TEST_IMAGES))

$(addprefix pull-, $(TEST_IMAGES)): pull-%: %
@TRAVIS_IMAGES=$< make .pull-dockerhub-images
@TRAVIS_IMAGE=$< make .pull-dockerhub-images

$(TEST_IMAGES): ;

tag-dockerhub-images-to-latest: $(addprefix tag-, $(TEST_IMAGES))

$(addprefix tag-, $(TEST_IMAGES)): tag-%: %
@TRAVIS_IMAGES=$< make .tag-dockerhub-latest
@TRAVIS_IMAGE=$< make .tag-dockerhub-latest

# Helper targets

.pull-dockerhub-images:
docker pull $(TRAVIS_IMAGES):$(TRAVIS_IMAGES_VERSION)
docker pull $(TRAVIS_IMAGE):$(TRAVIS_IMAGES_VERSION)

.tag-dockerhub-latest:
docker tag $(TRAVIS_IMAGES):$(TRAVIS_IMAGES_VERSION) $(TRAVIS_IMAGES):latest
docker tag $(TRAVIS_IMAGE):$(TRAVIS_IMAGES_VERSION) $(TRAVIS_IMAGE):latest

.build-service:
(cd ./$(SERVICE_NAME)/ && (test ! -e main.go || CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -a -installsuffix cgo -o bin/$(BINARY_NAME)))
1 change: 1 addition & 0 deletions etc/travis/test-images-dockerhub.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# fail fast
Copy link
Contributor

Choose a reason for hiding this comment

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

Given how we're calling these scripts from .travis.yml, do we need to add shebangs at the top of these scripts?

#!/bin/bash
...

set -e
export MAKE_ARGS=--no-print-directory
1 change: 1 addition & 0 deletions etc/travis/test-images-local.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# fail fast
set -e
export MAKE_ARGS=--no-print-directory