Skip to content

Commit

Permalink
merged with main
Browse files Browse the repository at this point in the history
  • Loading branch information
lassemand committed Sep 19, 2024
2 parents 41178b6 + 84263e0 commit b9313d4
Show file tree
Hide file tree
Showing 40 changed files with 282 additions and 410 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/release-chain-prometheus-exporter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish Docker image for chain-prometheus-exporter to DockerHub

on:
push:
tags:
- 'chain-prometheus-exporter/*.*.*'

workflow_dispatch:

env:
REGISTRY: docker.io
SERVICE_NAME: chain-prometheus-exporter
RUST_VERSION: rust:1.76-buster

jobs:
publish-docker-image:
runs-on: ubuntu-latest
environment: release-unprivileged
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Extract version tag from Cargo.toml manifest
id: meta
run: |
VERSION=$(yq .package.version ${{ env.SERVICE_NAME }}/Cargo.toml)
FULL_IMAGE_TAG="${{ env.REGISTRY }}/concordium/${{ env.SERVICE_NAME }}:$VERSION"
echo "::notice FULL_IMAGE_TAG=${FULL_IMAGE_TAG}"
# Make sure the image does not exist. Abort if we can retrieve any metadata.
if docker manifest inspect $FULL_IMAGE_TAG > /dev/null; then
echo "::error $FULL_IMAGE_TAG already exists"
exit 1
elif [ ! "${{ github.ref_name }}" = "${{ env.SERVICE_NAME }}/$VERSION" ]; then
echo "::error ${{ github.ref_name }} does not match ${{ env.SERVICE_NAME }}/${VERSION}."
exit 1
else
# Store the full image tag into a tag variable for the following step.
echo "tag=${FULL_IMAGE_TAG}" > "$GITHUB_OUTPUT"
fi
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ env.SERVICE_NAME }}/scripts/build.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tag }}
build-args: |
build_image=${{ env.RUST_VERSION }}
17 changes: 11 additions & 6 deletions .github/workflows/release-kpi-tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ on:
tags:
- kpi-tracker/*.*.*

workflow_dispatch:

env:
REGISTRY: docker.io
IMAGE_NAME: kpi-tracker
SERVICE_NAME: kpi-tracker
RUST_VERSION: rust:1.76-bookworm

jobs:
publish-docker-image:
runs-on: ubuntu-latest
environment: testnet-deployments
environment: release-unprivileged
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -28,14 +31,14 @@ jobs:
- name: Extract version tag from Cargo.toml manifest.
id: meta
run: |
export VERSION=$(yq .package.version kpi-tracker/Cargo.toml)
export FULL_IMAGE_TAG="${{ env.REGISTRY }}/concordium/$IMAGE_NAME:$VERSION"
export VERSION=$(yq .package.version ${{ env.SERVICE_NAME }}/Cargo.toml)
export FULL_IMAGE_TAG="${{ env.REGISTRY }}/concordium/${{ env.SERVICE_NAME }}:$VERSION"
echo "::notice FULL_IMAGE_TAG=${FULL_IMAGE_TAG}"
# Make sure the image does not exist. Abort if we can retrieve any metadata.
if docker manifest inspect ${FULL_IMAGE_TAG} > /dev/null; then
echo "::error ${FULL_IMAGE_TAG} already exists"
exit 1
elif [ ! "${{ github.ref_name }}" = "kpi-tracker/${VERSION}" ]; then
elif [ ! "${{ github.ref_name }}" = "${{ env.SERVICE_NAME }}/${VERSION}" ]; then
echo "::error Expected tag ${EXPECTED_TAG} does not match the version ${VERSION}."
exit 1
else
Expand All @@ -46,7 +49,9 @@ jobs:
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./kpi-tracker/scripts/Dockerfile
file: ./${{ env.SERVICE_NAME }}/scripts/Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tag }}
build-args: |
build_image=${{ env.RUST_VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/release-notification-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
jobs:
publish-docker-image:
runs-on: ubuntu-latest
environment: release
environment: release-unprivileged
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-recover-id-object.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
jobs:
publish-docker-image:
runs-on: ubuntu-latest
environment: release
environment: release-unprivileged
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-wallet-test-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
jobs:
publish-docker-image:
runs-on: ubuntu-latest
environment: testnet-deployments
environment: release-unprivileged
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion chain-prometheus-exporter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Unreleased changes
## 1.2.3
- Updated the Concordium Rust SDK to support the changes introduced in protocol 7.

## 1.1.2
Expand Down
12 changes: 6 additions & 6 deletions chain-prometheus-exporter/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chain-prometheus-exporter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chain-prometheus-exporter"
version = "1.1.2"
version = "1.2.4"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 2 additions & 2 deletions chain-prometheus-exporter/scripts/build.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG build_image
ARG base_image
ARG build_image=rust:1.76-buster
ARG base_image=debian:buster-slim
FROM ${build_image} AS build

WORKDIR /build
Expand Down
2 changes: 1 addition & 1 deletion chain-prometheus-exporter/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ async fn main() -> anyhow::Result<()> {
tracing::info!("Tracking account {address} with label {label}.");
let opts = Opts::new(
format!("{label}_balance"),
&format!("Balance of account {address} in microCCD."),
format!("Balance of account {address} in microCCD."),
);
let gauge: GenericGauge<AtomicU64> = GenericGauge::with_opts(opts)?;
gauges.push((address, gauge.clone()));
Expand Down
10 changes: 5 additions & 5 deletions generator/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions generator/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,13 +740,6 @@ struct RegisterCredentialsInitParams {
revocation_keys: Vec<CredentialHolderId>,
}

#[derive(concordium_std::Serial)]
struct RegisterCredentialParams {
credential_info: CredentialInfo,
#[concordium(size_length = 2)]
auxiliary_data: Vec<u8>,
}

impl RegisterCredentialsGenerator {
pub async fn instantiate(mut client: v2::Client, args: CommonArgs) -> anyhow::Result<Self> {
// Get the initial nonce.
Expand Down
2 changes: 1 addition & 1 deletion genesis-creator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Unreleased changes
## 0.3.0

- Support genesis data format of protocol version 7.
- Updated the Concordium Rust SDK to support the changes introduced in protocol 7.
Expand Down
12 changes: 6 additions & 6 deletions genesis-creator/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion genesis-creator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "genesis-creator"
version = "0.2.0"
version = "0.3.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
6 changes: 2 additions & 4 deletions genesis-creator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ fn crypto_parameters(
/// Function for creating the genesis identity providers. The arguments are
/// - idp_out - where to write the identity providers
/// - cfgs - A vector of configurations, each deciding whether to use an
/// existing identity provider or
/// to generate one or more freshly.
/// existing identity provider or to generate one or more freshly.
///
/// For each generated anonymity revoker, the private identity provider data
/// will be written to a file. The function returns a in a `anyhow::Result`,
Expand Down Expand Up @@ -177,8 +176,7 @@ fn identity_providers(
/// Function for creating the genesis anonymity revokers. The arguments are
/// - ars_out - where to write the anonymity revokers
/// - cfgs - A vector of configurations, each deciding whether to use an
/// existing anonymity revoker or
/// to generate one or more freshly.
/// existing anonymity revoker or to generate one or more freshly.
///
/// For each generated anonymity revoker, the private anonymity revoker data
/// will be written to a file. The function returns a in a `anyhow::Result`,
Expand Down
5 changes: 5 additions & 0 deletions id-verifier/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## 0.4.0
- Updated the Concordium Rust SDK to support the changes introduced in protocol 7.

## 0.3.0
*Prior versions not kept in changelog.*
Loading

0 comments on commit b9313d4

Please sign in to comment.