-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
65 additions
and
49 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 |
---|---|---|
|
@@ -22,3 +22,4 @@ _testmain.go | |
*.exe | ||
*.test | ||
*.prof | ||
travis_wait*.log |
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,7 +1,7 @@ | ||
language: go | ||
go: | ||
- 1.8.5 | ||
- 1.9.2 | ||
- 1.9.4 | ||
|
||
addons: | ||
apt: | ||
packages: | ||
|
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,44 @@ | ||
# The Prometheus NATS exporter release process | ||
|
||
The Prometheus NATS exporter release process creates releases when a new Github tag is generated and pushed. It uses [goreleaser](https://goreleaser.com/) to to do this. To add plaforms, architectures, and assets, modify [.goreleaser.yaml](.goreleaser.yml). | ||
|
||
## Steps to create a new release | ||
|
||
### 1) Create and push a tag to the repository | ||
|
||
**NEVER DUPLICATE AN EXISTING TAG!** | ||
|
||
From your local repository, you'll want to be on *master* branch. Create a local tag and push: | ||
|
||
```text | ||
git tag -a vX.Y.Z | ||
git push origin vX.Y.Z | ||
``` | ||
|
||
e.g. | ||
|
||
```text | ||
$ git tag -a v0.0.1-test | ||
$ git push origin v0.0.1-test | ||
Counting objects: 1, done. | ||
Writing objects: 100% (1/1), 173 bytes | 173.00 KiB/s, done. | ||
Total 1 (delta 0), reused 0 (delta 0) | ||
To github.com:nats-io/prometheus-nats-exporter | ||
* [new tag] v0.0.1-test -> v0.0.1-test | ||
``` | ||
|
||
This will trigger Travis-CI to start a build from the creation of the new tags. Goreleaser will create a draft release using the NATS continuous integration user. This can take awhile. | ||
|
||
**NOTE:** If modifying the release process itself, you can test by pushing a tag from a branch. Use a tag like `v0.0.1-test` to do this. No need to test on master. | ||
|
||
### 2) Edit the Release on Github | ||
|
||
Check the the [releases](https://github.com/nats-io/prometheus-nats-exporter/releases) page, and you should see a draft release generated from your tag, along with compiled binaries. If the release and assets aren't present, check the Travis CI logs for errors. Edit the release notes and publish. You have a github release! | ||
|
||
### 3) Edit docker files | ||
|
||
Modify the docker files to pull down the latest release, and test them. After committing and merging, use the commit hash from the docker file updates in the docker library. This means the official docker files for a release will be at least one commit ahead, but that's OK; we have to test. | ||
|
||
### 4) Update other distribution channels | ||
|
||
Don't forget to update Homebrew, Chocolatey, etc if applicable. |
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
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
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,17 +1,17 @@ | ||
#!/bin/bash -e | ||
# Run from directory above via ./scripts/cov.sh | ||
|
||
rm -rf ./cov | ||
mkdir cov | ||
go test -v -covermode=atomic -coverprofile=./cov/collector.out ./collector | ||
go test -v -covermode=atomic -coverprofile=./cov/exporter.out ./exporter | ||
gocovmerge ./cov/*.out > acc.out | ||
rm -rf ./cov | ||
rm -rf /tmp/cov | ||
mkdir -p /tmp/cov | ||
go test -v -covermode=atomic -coverprofile=/tmp/cov/collector.out ./collector | ||
go test -v -covermode=atomic -coverprofile=/tmp/cov/exporter.out ./exporter | ||
gocovmerge /tmp/cov/*.out > /tmp/acc.out | ||
rm -rf /tmp/cov | ||
|
||
# If we have an arg, assume travis run and push to coveralls. Otherwise launch browser results | ||
if [[ -n $1 ]]; then | ||
$HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci | ||
rm -rf ./acc.out | ||
$HOME/gopath/bin/goveralls -coverprofile=/tmp/acc.out -service travis-ci | ||
rm -rf /tmp/acc.out | ||
else | ||
go tool cover -html=acc.out | ||
go tool cover -html=/tmp/acc.out | ||
fi |
This file was deleted.
Oops, something went wrong.