File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 99 - if [[ "$TRAVIS_BRANCH" == "main" || "$TRAVIS_BRANCH" == "travis" ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
1010 make cluster-test;
1111 fi
12+ deploy :
13+ - provider : script
14+ script : echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
15+ && make docker-build && make docker-push
16+ skip_cleanup : true
17+ on :
18+ tags : true
19+ go : ' 1.16'
1220notifications :
1321 slack :
1422 if : branch = main
Original file line number Diff line number Diff line change 1+ FROM golang:1.16
2+
3+ RUN mkdir /twilio
4+ WORKDIR /twilio
5+
6+ COPY client ./client
7+ COPY rest ./rest
8+ COPY twilio.go .
9+ COPY twilio_test.go .
10+
11+ # Fetch dependencies
12+ COPY go.mod .
13+ COPY go.sum .
14+ RUN go mod download
Original file line number Diff line number Diff line change 1- .PHONY : githooks install test goimports govet golint
1+ .PHONY : githooks install test goimports govet golint docker-build docker-push
22
33githooks :
44 ln -sf ../../githooks/pre-commit .git/hooks/pre-commit
@@ -23,3 +23,16 @@ golint: govet
2323 go get github.com/golangci/golangci-lint/cmd/
[email protected] 2424 golangci-lint run
2525 go mod tidy
26+
27+ API_DEFINITIONS_SHA =$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5)
28+ docker-build :
29+ docker build -t twilio/twilio-go .
30+ docker tag twilio/twilio-go twilio/twilio-go:${TRAVIS_TAG}
31+ docker tag twilio/twilio-go twilio/twilio-go:apidefs-${API_DEFINITIONS_SHA}
32+ docker tag twilio/twilio-go twilio/twilio-go:latest
33+
34+ docker-push :
35+ echo " ${DOCKER_PASSWORD} " | docker login -u " ${DOCKER_USERNAME} " --password-stdin
36+ docker push twilio/twilio-go:${TRAVIS_TAG}
37+ docker push twilio/twilio-go:apidefs-${API_DEFINITIONS_SHA}
38+ docker push twilio/twilio-go:latest
You can’t perform that action at this time.
0 commit comments