-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use gödel to build and publish product (#15)
- Loading branch information
Showing
78 changed files
with
15,627 additions
and
680 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,6 @@ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
build/ | ||
coverage.out | ||
gotest.out | ||
|
||
/build/ | ||
/dist/ |
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,53 +1,52 @@ | ||
machine: | ||
post: | ||
- mkdir -p download | ||
- test -e download/$GODIST || wget -O download/$GODIST https://storage.googleapis.com/golang/$GODIST | ||
- sudo rm -rf /usr/local/go | ||
- sudo tar -C /usr/local -xzf download/$GODIST | ||
environment: | ||
GODIST: "go1.6.2.linux-amd64.tar.gz" | ||
GODIST: "go1.7.3.linux-amd64.tar.gz" | ||
GOPATH: "$HOME/.go_workspace" | ||
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" | ||
GO_PROJECT_SRC_PATH: "$GOPATH/src/$IMPORT_PATH" | ||
post: | ||
- mkdir -p download | ||
- test -e "download/$GODIST" || wget -O "download/$GODIST" "https://storage.googleapis.com/golang/$GODIST" | ||
# create custom Go distribution with packages built for darwin-amd64 if it is not present | ||
- | | ||
if [ ! -e "download/$GODIST-custom.tgz" ]; then | ||
sudo rm -rf /usr/local/go && \ | ||
sudo tar -C /usr/local -xzf "download/$GODIST" && \ | ||
sudo env GOOS=linux GOARCH=amd64 /usr/local/go/bin/go install std && \ | ||
sudo env GOOS=darwin GOARCH=amd64 /usr/local/go/bin/go install std && \ | ||
tar -C /usr/local -czf "download/$GODIST-custom.tgz" go | ||
fi | ||
- sudo rm -rf /usr/local/go | ||
- sudo tar -C /usr/local -xzf "download/$GODIST-custom.tgz" | ||
|
||
checkout: | ||
post: | ||
# ensure that up-to-date tags are retrieved | ||
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow" | ||
- git fetch --tags --all --prune | ||
# ensure all tags are fetched and up-to-date | ||
- git tag -l | xargs git tag -d && git fetch -t | ||
|
||
dependencies: | ||
pre: | ||
# build script | ||
- go get -u -v golang.org/x/tools/go/gcimporter15 | ||
- go get -u -v github.com/kisielk/errcheck | ||
- go get -u -v github.com/mitchellh/gox | ||
- go get -u -v golang.org/x/tools/cmd/cover | ||
- go get -u -v github.com/mattn/goveralls | ||
- go get -u -v github.com/pierrre/gotestcover | ||
- go get -u -v github.com/jstemmer/go-junit-report | ||
- go get -u -v github.com/mdempsky/unconvert | ||
- go get -u -v github.com/remyoudompheng/go-misc/deadcode | ||
- go get -u -v github.com/gordonklaus/ineffassign | ||
- go get -u -v github.com/opennota/check/cmd/varcheck | ||
- go get -u -v github.com/golang/lint/golint | ||
# code | ||
- go get -u -v gopkg.in/yaml.v2 | ||
override: | ||
- mkdir -p "$GOPATH/src/$IMPORT_PATH" | ||
- rsync -az --delete ./ "$GOPATH/src/$IMPORT_PATH/" | ||
- cd "$GO_PROJECT_SRC_PATH" && ./godelw version | ||
cache_directories: | ||
- ~/.godel | ||
- ~/download | ||
|
||
test: | ||
pre: | ||
- go version | ||
override: | ||
- test -d "$GO_PROJECT_SRC_PATH" && cd "$GO_PROJECT_SRC_PATH" && make verify | ||
- cp "$GO_PROJECT_SRC_PATH/coverage.out" . | ||
- cd "$GO_PROJECT_SRC_PATH" && go install $(./godelw packages) | ||
- mkdir -p "$CIRCLE_TEST_REPORTS/$CIRCLE_PROJECT_REPONAME" | ||
- cd "$GO_PROJECT_SRC_PATH" && ./godelw verify --apply=false --junit-output="$CIRCLE_TEST_REPORTS/$CIRCLE_PROJECT_REPONAME/$CIRCLE_PROJECT_REPONAME-tests.xml" | ||
- mkdir -p "$CIRCLE_TEST_REPORTS/$CIRCLE_PROJECT_REPONAME-integration" | ||
- cd "$GO_PROJECT_SRC_PATH" && ./godelw test --tags=integration --junit-output="$CIRCLE_TEST_REPORTS/$CIRCLE_PROJECT_REPONAME/$CIRCLE_PROJECT_REPONAME-integration.xml" | ||
- cd "$GO_PROJECT_SRC_PATH" && ./godelw dist | ||
|
||
deployment: | ||
release: | ||
tag: /[0-9]+(\.[0-9]+)+(-rc[0-9]+)?/ | ||
owner: palantir | ||
commands: | ||
- cd "$GO_PROJECT_SRC_PATH" && make build dist publish | ||
- cd "$GO_PROJECT_SRC_PATH" && ./godelw publish bintray --url https://api.bintray.com --subject palantir --repository releases --user "$BINTRAY_USERNAME" --password "$BINTRAY_PASSWORD" --publish --downloads-list |
This file was deleted.
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,5 @@ | ||
checks: | ||
golint: | ||
filters: | ||
- value: "should have comment or be unexported" | ||
- value: "or a comment on this block" |
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,19 @@ | ||
products: | ||
go-java-launcher: | ||
build: | ||
main-pkg: . | ||
os-archs: | ||
- os: darwin | ||
arch: amd64 | ||
- os: linux | ||
arch: amd64 | ||
dist: | ||
dist-type: | ||
type: bin | ||
info: | ||
omit-init-sh: true | ||
script: | | ||
set -euo pipefail | ||
mkdir $DIST_DIR/service | ||
mv $DIST_DIR/bin $DIST_DIR/service/bin | ||
group-id: com.palantir.launching |
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,5 @@ | ||
names: | ||
- "\\..+" | ||
- "vendor" | ||
paths: | ||
- "godel" |
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,4 @@ | ||
formatters: | ||
gofmt: | ||
args: | ||
- "-s" |
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,2 @@ | ||
distributionURL=https://palantir.bintray.com/releases/com/palantir/godel/godel/0.11.0/godel-0.11.0.tgz | ||
distributionSHA256=ee8e571e2153b02673192ee5a6f2786ecc7ee73cecd1a4b7527be6cb751ac5fc |
Empty file.
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,14 @@ | ||
header: | | ||
// Copyright 2016 Palantir Technologies, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. |
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,4 @@ | ||
tags: | ||
integration: | ||
names: | ||
- "^integration_test$" |
Oops, something went wrong.