-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from docker/further-containerize
Further containerize
- Loading branch information
Showing
5 changed files
with
46 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
*.log | ||
node_modules | ||
src/*.js | ||
src/*.map | ||
src/*.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
ifeq (${DOCKER_GITHUB_TOKEN},) | ||
@echo "DOCKER_GITHUB_TOKEN empty | ||
@echo "Set with a GitHub token that has access to docker/compose-cli" | ||
exit 1 | ||
endif | ||
export DOCKER_BUILDKIT=1 | ||
|
||
IMG?=node-sdk-test | ||
|
||
all: test | ||
all: build | ||
|
||
.PHONY: build | ||
build: | ||
@docker build --target build --output ./src . | ||
|
||
.PHONY: test | ||
test: | ||
test: check-token | ||
@docker build --target test --tag ${IMG} --build-arg DOCKER_GITHUB_TOKEN . | ||
docker run --rm \ | ||
@docker run --rm \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
${IMG} | ||
@docker rmi ${IMG} | ||
|
||
.PHONY: lint | ||
lint: | ||
@docker build --target lint . | ||
|
||
.PHONY: protos | ||
protos: | ||
protos: check-token | ||
@docker build --target protos --build-arg DOCKER_GITHUB_TOKEN --output ./src . | ||
|
||
.PHONY: check-token | ||
check-token: | ||
ifeq (${DOCKER_GITHUB_TOKEN},) | ||
$(error "Set DOCKER_GITHUB_TOKEN with a GitHub token that has access to docker/compose-cli") | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters