-
Notifications
You must be signed in to change notification settings - Fork 103
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 #51 from Azure/add-ci
Implemented CI and added widget in readme
- Loading branch information
Showing
6 changed files
with
106 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
language: go | ||
|
||
language: python | ||
python: | ||
- 3.6 | ||
services: | ||
- docker | ||
script: | ||
- go get -u github.com/golang/dep/cmd/dep | ||
- dep ensure | ||
- go test ./... | ||
- make all |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM golang:1.10 | ||
|
||
ENV GOPATH /go | ||
ENV PATH ${GOPATH}/bin:$PATH | ||
ENV ACCOUNT_NAME ${ACCOUNT_NAME} | ||
ENV ACCOUNT_KEY ${ACCOUNT_KEY} | ||
RUN go get -u github.com/golang/dep/cmd/dep | ||
RUN go get -u github.com/golang/lint/golint | ||
RUN go get -u github.com/mitchellh/gox | ||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
PROJECT_NAME = azure-storage-blob-go | ||
WORK_DIR = /go/src/github.com/Azure/${PROJECT_NAME} | ||
GOX_ARCH = linux/amd64 windows/amd64 darwin/amd64 | ||
|
||
define with_docker | ||
WORK_DIR=$(WORK_DIR) docker-compose run --rm $(PROJECT_NAME) $(1) | ||
endef | ||
|
||
login: setup ## get a shell into the container | ||
WORK_DIR=$(WORK_DIR) docker-compose run --rm --entrypoint /bin/bash $(PROJECT_NAME) | ||
|
||
docker-compose: | ||
which docker-compose | ||
|
||
docker-build: docker-compose | ||
WORK_DIR=$(WORK_DIR) docker-compose build --force-rm | ||
|
||
docker-clean: docker-compose | ||
WORK_DIR=$(WORK_DIR) docker-compose down | ||
|
||
dep: docker-build # | ||
$(call with_docker,dep ensure -v) | ||
|
||
setup: clean docker-build dep ## setup environment for development | ||
|
||
test: setup ## run go tests | ||
$(call with_docker,go test -race -short -cover -v ./2018-03-28/azblob) | ||
|
||
build: setup ## build binaries for the project | ||
$(call with_docker,gox -osarch="$(GOX_ARCH)" ./2018-03-28/azblob) | ||
|
||
all: setup test build | ||
|
||
clean: docker-clean ## clean environment and binaries | ||
rm -rf bin | ||
|
||
help: ## display this help screen | ||
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: '3' | ||
services: | ||
azure-storage-blob-go: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
volumes: | ||
- .:${WORK_DIR} | ||
working_dir: ${WORK_DIR} | ||
environment: | ||
- ACCOUNT_NAME | ||
- ACCOUNT_KEY | ||
- SECONDARY_ACCOUNT_NAME | ||
- SECONDARY_ACCOUNT_KEY | ||
- PREMIUM_ACCOUNT_NAME | ||
- PREMIUM_ACCOUNT_KEY | ||
- BLOB_STORAGE_ACCOUNT_NAME | ||
- BLOB_STORAGE_ACCOUNT_KEY |