Skip to content

Commit

Permalink
release 0.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
spagno committed Aug 9, 2022
1 parent 340daf6 commit 7008770
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 12 deletions.
107 changes: 96 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
orbs:
prometheus: prometheus/prometheus@0.16.0
executors:
# Whenever the Go version is updated here, .promu.yml and .promu-cgo.yml
# should also be updated.
golang:
docker:
- image: cimg/go:1.18
jobs:
build:
machine:
image: ubuntu-2004:202101-01
parallelism: 3
steps:
- checkout
- run: make promu
- prometheus/setup_environment
- run: docker run --privileged linuxkit/binfmt:v0.8
- run: promu crossbuild -v
- run: promu --config .promu-cgo.yml crossbuild -v
Expand All @@ -29,9 +33,16 @@ jobs:
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.18-base
REPO_PATH: github.com/spagno/iscdhcpd_exporter
steps:
- checkout
- prometheus/setup_environment
- attach_workspace:
at: .
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make docker
fi
- run: docker images
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T
- run:
Expand All @@ -41,14 +52,14 @@ jobs:
else
make test-docker
fi
publish_docker:
publish_release_master:
machine:
image: ubuntu-2204:2022.04.2
environment:
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.18-base
REPO_PATH: github.com/spagno/iscdhcpd_exporter
steps:
- checkout
- prometheus/setup_environment
- attach_workspace:
at: .
- run:
Expand All @@ -58,7 +69,73 @@ jobs:
else
make docker
fi
- run: make common-docker-publish
- run: docker images
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make docker-publish DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make docker-publish
fi
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make docker-manifest DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make docker-manifest
fi
- run:
command: |
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then
make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG"
make docker-publish DOCKER_IMAGE_TAG="latest"
make docker-manifest DOCKER_IMAGE_TAG="latest"
fi
publish_release:
machine:
image: ubuntu-2204:2022.04.2
environment:
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.18-base
REPO_PATH: github.com/spagno/iscdhcpd_exporter
steps:
- prometheus/setup_environment
- attach_workspace:
at: .
- run: promu crossbuild tarballs
- run: promu checksum .tarballs
- run: promu release .tarballs
- store_artifacts:
destination: releases
path: .tarballs
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make docker
fi
- run: docker images
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make docker-publish DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make docker-publish
fi
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make docker-manifest DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make docker-manifest
fi
- run:
command: |
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then
make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG"
make docker-publish DOCKER_IMAGE_TAG="latest"
make docker-manifest DOCKER_IMAGE_TAG="latest"
fi
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
Expand All @@ -75,9 +152,17 @@ workflows:
filters:
tags:
only: /.*/
- publish_docker:
- publish_release_master:
requires:
- build
filters:
branches:
only: master
- publish_release:
requires:
- build
filters:
tags:
only: /.*/
only: /^v.*/
branches:
ignore: /.*/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ iscdhcpd_exporter
*.swp
.vscode
.tarballs
*.bak
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## master / unreleased

* [CHANGE]
* [FEATURE]
* [ENHANCEMENT]
* [BUGFIX]

## 0.1.7 / 2022-08-09

* [ENHANCEMENT] Golang 1.18
* [ENHANCEMENT] new circleci workflow
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.6
0.1.7

0 comments on commit 7008770

Please sign in to comment.