Skip to content

Commit fb4f77f

Browse files
authored
Check docker credentials in docker:login (#40)
* Update `LICENSE` * Update TravisCI `Go` version * Check `Docker` credentials in `docker:login` * Remove comments. Add `else` condition
1 parent ba89114 commit fb4f77f

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

.README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Here's how to get started...
4949
|
5050
{{- (datasource "contributor").erik }} |
5151
{{- (datasource "contributor").igor }} |
52-
|---|---|
52+
{{- (datasource "contributor").andriy }} |
53+
|---|---|---|
5354

5455
{{ (datasource "contributor")._links }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
./terraform
1+
./terraform
2+
.idea
3+
build-harness.iml

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sudo: required
22
language: go
33
go:
4-
- 1.7.x
4+
- 1.9.x
55
addons:
66
apt:
77
packages:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright {yyyy} {name of copyright owner}
189+
Copyright 2017-2018 Cloud Posse, LLC
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

modules/docker/Makefile.hub

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
## Use DOCKER_HUB_USERNAME and DOCKER_HUB_PASSWORD env variables to pass credentials
33
## Login into docker hub
44
docker\:login: $(DOCKER)
5-
$(call assert-set,DOCKER)
6-
$(call assert-set,DOCKER_HUB_USERNAME)
7-
$(call assert-set,DOCKER_HUB_PASSWORD)
8-
@$(DOCKER) login --username="$(DOCKER_HUB_USERNAME)" --password="$(DOCKER_HUB_PASSWORD)"
5+
@if [ -n "$DOCKER" ] && [ -n "$DOCKER_HUB_USERNAME" ] && [ -n "$DOCKER_HUB_PASSWORD" ]; then\
6+
@$(DOCKER) login --username="$(DOCKER_HUB_USERNAME)" --password="$(DOCKER_HUB_PASSWORD)";\
7+
else \
8+
echo "Skipping docker:login. Docker credentials (DOCKER_HUB_USERNAME or DOCKER_HUB_PASSWORD) are not set"; \
9+
fi;

0 commit comments

Comments
 (0)