This repository has been archived by the owner on Dec 5, 2020. It is now read-only.
forked from ticketmaster/googleanalytics_exporter
-
Notifications
You must be signed in to change notification settings - Fork 1
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
6 changed files
with
163 additions
and
31 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
workflows: | ||
version: 2 | ||
commit: | ||
jobs: | ||
- release | ||
|
||
jobs: | ||
release: | ||
machine: | ||
image: ubuntu-1604:201903-01 | ||
steps: | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "8f:6b:bb:e6:82:aa:7c:39:df:c2:d1:28:82:1b:f6:54" | ||
- checkout | ||
- run: | ||
name: setup git | ||
command: git branch --set-upstream-to origin $CIRCLE_BRANCH | ||
- run: | ||
name: Identify myself | ||
command: | | ||
git config --global user.email "service+oss@entropy.engineer" && \ | ||
git config --global user.name "Service User" | ||
- run: | ||
name: go fmt | ||
command: | | ||
export WORKPATH=/go/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME | ||
docker run --entrypoint "/usr/local/go/bin/go" -v $PWD:$WORKPATH -w $WORKPATH goreleaser/goreleaser mod tidy | ||
docker run --entrypoint "/usr/local/go/bin/go" -v $PWD:$WORKPATH -w $WORKPATH goreleaser/goreleaser fmt ./... | ||
docker run --entrypoint "/usr/local/go/bin/go" -v $PWD:$WORKPATH -w $WORKPATH goreleaser/goreleaser mod vendor | ||
- run: | ||
name: Tidy up | ||
command: | | ||
git add -A | ||
git commit -m "[ci skip] go mod tidy/gofmt" || true | ||
git push origin HEAD | ||
- run: | ||
name: Get git version | ||
command: | | ||
docker pull gittools/gitversion:latest-linux-netcoreapp2.1 && \ | ||
docker run --rm -v "$(pwd):/repo" gittools/gitversion:latest-linux-netcoreapp2.1 /repo > out.version | ||
- run: | ||
name: Tag release | ||
command: | | ||
git tag $(jq -r '.NuGetVersion' out.version) -m "release" || true | ||
git tag v$(jq -r '.NuGetVersion' out.version) -m "release" || true | ||
rm -rf out.version | ||
- run: | ||
name: Go release | ||
command: | | ||
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $PWD:/go/src/github.com/xplorfin/$CIRCLE_PROJECT_NAME -w /go/src/github.com/xplorfin/$CIRCLE_PROJECT_NAME -e CIRCLE_PROJECT_REPONAME -e GITHUB_TOKEN -e DOCKER_USERNAME -e DOCKER_PASSWORD -e DOCKER_REGISTRY goreleaser/goreleaser release --rm-dist | ||
- run: | ||
name: Push tag | ||
command: | | ||
git pull | ||
git push --tags || true |
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 @@ | ||
vendor/ |
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,101 @@ | ||
project_name: ganalytics | ||
env: | ||
- GO111MODULE=on | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- 386 | ||
- amd64 | ||
- arm | ||
- arm64 | ||
ignore: | ||
- goos: darwin | ||
goarch: 386 | ||
checksum: | ||
name_template: '{{ .ProjectName }}_checksums.txt' | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- Merge pull request | ||
- Merge branch | ||
dockers: | ||
- image_templates: | ||
- 'docker.pkg.github.com/xplorfin/googleanalytics_exporter/googleanalytics_exporter:{{ .Tag }}' | ||
- 'docker.pkg.github.com/xplorfin/googleanalytics_exporter/googleanalytics_exporter:v{{ .Major }}.{{ .Minor }}' | ||
- 'docker.pkg.github.com/xplorfin/googleanalytics_exporter/googleanalytics_exporter:latest' | ||
dockerfile: Dockerfile | ||
binaries: | ||
- ganalytics | ||
goos: linux | ||
goarch: amd64 | ||
goarm: '' | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.name={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
- "--label=org.opencontainers.image.source={{.GitURL}}" | ||
- "--label=com.github.actions.name={{.ProjectName}}" | ||
- "--label=com.github.actions.description=Prometheus Google Annalytics Exporter" | ||
- "--label=com.github.actions.icon=terminal" | ||
- "--label=com.github.actions.color=blue" | ||
- "--label=repository=http://github.com/ganalytics/ganalytics" | ||
archives: | ||
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' | ||
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
brews: | ||
- github: | ||
owner: xplorfin | ||
name: homebrewtap-oss | ||
folder: Formula | ||
homepage: https://github.com/xplorfin/googleanalytics_exporter | ||
description: Prometheus Google Analytics Exporter | ||
test: | | ||
system "#{bin}/ganalytics -v" | ||
scoop: | ||
bucket: | ||
owner: xplorfin | ||
name: scoop-bucket-oss | ||
homepage: https://github.com/xplorfin/googleanalytics_exporter | ||
description: Prometheus Google Analytics Exporter | ||
license: MIT | ||
nfpms: | ||
- name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' | ||
homepage: https://ganalytics.com | ||
description: Prometheus Google Analytics Exporter | ||
maintainer: Carlos Alexandro Becker <root@carlosbecker.com> | ||
license: MIT | ||
vendor: GoReleaser | ||
formats: | ||
- deb | ||
- rpm | ||
dependencies: | ||
- git | ||
# TODO: ATTENTION: Currently, the provided docker image does not support the generation of snapcraft packages. @goreleaser | ||
#snapcrafts: | ||
# - name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' | ||
# summary: Deliver Go binaries as fast and easily as possible | ||
# description: Prometheus Google Analytics Exporter | ||
# grade: stable | ||
# confinement: classic | ||
# publish: true |
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
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