From 70745b249314a951c958d728dc3c8d6daf5da5c8 Mon Sep 17 00:00:00 2001 From: Eirik A Date: Wed, 9 Aug 2023 21:59:47 +0100 Subject: [PATCH] Release automation (#57) * cargo release setup with hook to sync chart with cargo toml Signed-off-by: clux * release 0.12.8 * gen Signed-off-by: clux --------- Signed-off-by: clux --- Cargo.lock | 2 +- Cargo.toml | 2 +- charts/doc-controller/Chart.yaml | 2 +- justfile | 1 + release.toml | 18 ++++++++++++++++++ yaml/deployment.yaml | 8 ++++---- 6 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 release.toml diff --git a/Cargo.lock b/Cargo.lock index c31196c..3339562 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -507,7 +507,7 @@ dependencies = [ [[package]] name = "controller" -version = "0.12.7" +version = "0.12.8" dependencies = [ "actix-web", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 7d65bf2..499404f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "controller" -version = "0.12.7" +version = "0.12.8" authors = ["clux "] edition = "2021" default-run = "controller" diff --git a/charts/doc-controller/Chart.yaml b/charts/doc-controller/Chart.yaml index 30b4cfb..648b5e5 100644 --- a/charts/doc-controller/Chart.yaml +++ b/charts/doc-controller/Chart.yaml @@ -3,4 +3,4 @@ name: doc-controller description: document controller sample chart type: application version: 0.1.0 -appVersion: "0.12.5" +appVersion: 0.12.8 diff --git a/justfile b/justfile index 2437f95..5ce402d 100644 --- a/justfile +++ b/justfile @@ -53,6 +53,7 @@ build-base: (_build "") # docker build with telemetry build-otel: (_build "telemetry") + # local helper for test-telemetry and run-telemetry # forward grpc otel port from svc/promstack-tempo in monitoring forward-tempo: diff --git a/release.toml b/release.toml new file mode 100644 index 0000000..0bfc678 --- /dev/null +++ b/release.toml @@ -0,0 +1,18 @@ +# Release process :: cargo-release >= 0.23 +# +# Dependencies: https://kube.rs/tools +# +# 1. cargo release minor --execute + +# Reference +# https://github.com/sunng87/cargo-release/blob/master/docs/reference.md + +pre-release-replacements = [ + {file="charts/doc-controller/Chart.yaml", search="appVersion: .*", replace="appVersion: {{version}}"}, +] +pre-release-commit-message = "release {{version}}" +push = false +tag = true +tag-name = "{{version}}" +sign-commit = true +sign-tag = true diff --git a/yaml/deployment.yaml b/yaml/deployment.yaml index 9e822ed..0e3874e 100644 --- a/yaml/deployment.yaml +++ b/yaml/deployment.yaml @@ -8,7 +8,7 @@ metadata: labels: app: doc-controller app.kubernetes.io/name: doc-controller - app.kubernetes.io/version: "0.12.5" + app.kubernetes.io/version: "0.12.8" namespace: default automountServiceAccountToken: true --- @@ -51,7 +51,7 @@ metadata: labels: app: doc-controller app.kubernetes.io/name: doc-controller - app.kubernetes.io/version: "0.12.5" + app.kubernetes.io/version: "0.12.8" spec: type: ClusterIP ports: @@ -71,7 +71,7 @@ metadata: labels: app: doc-controller app.kubernetes.io/name: doc-controller - app.kubernetes.io/version: "0.12.5" + app.kubernetes.io/version: "0.12.8" spec: replicas: 1 selector: @@ -89,7 +89,7 @@ spec: {} containers: - name: doc-controller - image: clux/controller:0.12.5 + image: clux/controller:0.12.8 imagePullPolicy: IfNotPresent securityContext: {}