forked from prometheus/prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New release process using docker, circleci and a centralized
building tool
- Loading branch information
1 parent
261aba6
commit 8688cf2
Showing
10 changed files
with
136 additions
and
163 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,3 +1,5 @@ | ||
data/ | ||
prometheus | ||
promtool | ||
.build/ | ||
.tarballs/ | ||
|
||
!.build/linux-amd64/ |
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,45 @@ | ||
go: 1.5.4 | ||
repository: | ||
path: github.com/prometheus/prometheus | ||
build: | ||
binaries: | ||
- name: prometheus | ||
path: ./cmd/prometheus | ||
- name: promtool | ||
path: ./cmd/promtool | ||
flags: -tags netgo | ||
ldflags: | | ||
-X {{repoPath}}/version.Version={{.Version}} | ||
-X {{repoPath}}/version.Revision={{.Revision}} | ||
-X {{repoPath}}/version.Branch={{.Branch}} | ||
-X {{repoPath}}/version.BuildUser={{user}}@{{host}} | ||
-X {{repoPath}}/version.BuildDate={{date "20060102-15:04:05"}} | ||
tarball: | ||
files: | ||
- consoles | ||
- console_libraries | ||
- documentation/examples/prometheus.yml | ||
- LICENSE | ||
- NOTICE | ||
crossbuild: | ||
platforms: | ||
- linux/amd64 | ||
- linux/386 | ||
- darwin/amd64 | ||
- darwin/386 | ||
- windows/amd64 | ||
- windows/386 | ||
- freebsd/amd64 | ||
- freebsd/386 | ||
- openbsd/amd64 | ||
- openbsd/386 | ||
- netbsd/amd64 | ||
- netbsd/386 | ||
- dragonfly/amd64 | ||
- linux/arm | ||
- linux/arm64 | ||
- freebsd/arm | ||
- openbsd/arm | ||
- netbsd/arm | ||
- linux/ppc64 | ||
- linux/ppc64le |
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,11 +1,54 @@ | ||
machine: | ||
environment: | ||
DOCKER_IMAGE_NAME: prom/prometheus | ||
DOCKER_TEST_IMAGE_NAME: prom/golang-builder:1.5.3-main | ||
REPO_PATH: github.com/prometheus/prometheus | ||
pre: | ||
- sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.1-circleci' | ||
- sudo chmod 0755 /usr/bin/docker | ||
- sudo curl -L 'https://github.com/aktau/github-release/releases/download/v0.6.2/linux-amd64-github-release.tar.bz2' | tar xvjf - --strip-components 3 -C $HOME/bin | ||
services: | ||
- docker | ||
|
||
dependencies: | ||
pre: | ||
- go get -u github.com/prometheus/promu | ||
- docker info | ||
override: | ||
- make docker | ||
- promu crossbuild | ||
- ln -s .build/linux-amd64/prometheus prometheus | ||
- ln -s .build/linux-amd64/promtool promtool | ||
- | | ||
if [ -n "$CIRCLE_TAG" ]; then | ||
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME DOCKER_IMAGE_TAG=$CIRCLE_TAG | ||
else | ||
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME | ||
fi | ||
post: | ||
- mkdir $CIRCLE_ARTIFACTS/binaries/ && cp -a .build/* $CIRCLE_ARTIFACTS/binaries/ | ||
- docker images | ||
|
||
test: | ||
override: | ||
- /bin/true | ||
- docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T | ||
|
||
deployment: | ||
hub_branch: | ||
branch: master | ||
owner: prometheus | ||
commands: | ||
- docker login -e $DOCKER_EMAIL -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | ||
- docker push $DOCKER_IMAGE_NAME | ||
hub_tag: | ||
tag: /^[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ | ||
owner: prometheus | ||
commands: | ||
- promu crossbuild tarballs | ||
- promu release .tarballs | ||
- mkdir $CIRCLE_ARTIFACTS/releases/ && cp -a .tarballs/* $CIRCLE_ARTIFACTS/releases/ | ||
- docker login -e $DOCKER_EMAIL -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | ||
- | | ||
if [[ "$CIRCLE_TAG" =~ ^[0-9]+(\.[0-9]+){2}$ ]]; then | ||
docker tag "$DOCKER_IMAGE_NAME:$CIRCLE_TAG" "$DOCKER_IMAGE_NAME:latest" | ||
fi | ||
- docker push $DOCKER_IMAGE_NAME |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.