Skip to content

Commit

Permalink
Merge pull request #126 from stakater/add-goBuildViaGoReleaser
Browse files Browse the repository at this point in the history
Update jenkinsfile to use goreleaser
  • Loading branch information
kahootali authored Nov 1, 2018
2 parents b5dba5f + c5271b2 commit 2fb62a1
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
vendor
.idea
\.vscode/
build/package/ingressmonitorcontroller
out
12 changes: 12 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# .goreleaser.yml
# Build customization
builds:
- binary: imc
env:
- CGO_ENABLED=0
goos:
- windows
- darwin
- linux
env_files:
github_token: /home/jenkins/.apitoken/hub
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.45
1.0.45
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/groovy
@Library('github.com/stakater/fabric8-pipeline-library@v2.7.2')
@Library('github.com/stakater/fabric8-pipeline-library@v2.8.7')

def dummy

properties([
disableConcurrentBuilds()
])

goBuildAndRelease {
goBuildViaGoReleaser {

}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ HELMNAME = IMC
default: build test

install:
"$(GLIDECMD)" install --strip-vendor
"$(GLIDECMD)" update --strip-vendor

build:
"$(GOCMD)" build ${GOFLAGS} ${LDFLAGS} -o "${BINARY}"
Expand Down
2 changes: 1 addition & 1 deletion build/package/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apk -v --update \
ADD . "$GOPATH/src/github.com/stakater/IngressMonitorController"

RUN cd "$GOPATH/src/github.com/stakater/IngressMonitorController" && \
glide install --strip-vendor && \
glide update --strip-vendor && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a --installsuffix cgo --ldflags="-s" -o /IngressMonitorController

COPY build/package/Dockerfile.run /
Expand Down
Binary file removed build/package/ingressmonitorcontroller
Binary file not shown.
11 changes: 6 additions & 5 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed out/ingressmonitorcontroller
Binary file not shown.

0 comments on commit 2fb62a1

Please sign in to comment.