From ee28c13558e67f8de2b15871093cd9c2dfafc496 Mon Sep 17 00:00:00 2001 From: Stephan D Date: Sun, 4 Jan 2026 13:12:49 +0100 Subject: [PATCH] tgsettle gateway build added --- .../{chain_gateway.yml => gateway_chain.yml} | 0 .../{mntx_gateway.yml => gateway_mntx.yml} | 0 .woodpecker/gateway_tgsettle.yml | 73 +++++++++++++++++++ frontend/pweb/pubspec.yaml | 2 +- version | 2 +- 5 files changed, 75 insertions(+), 2 deletions(-) rename .woodpecker/{chain_gateway.yml => gateway_chain.yml} (100%) rename .woodpecker/{mntx_gateway.yml => gateway_mntx.yml} (100%) create mode 100644 .woodpecker/gateway_tgsettle.yml diff --git a/.woodpecker/chain_gateway.yml b/.woodpecker/gateway_chain.yml similarity index 100% rename from .woodpecker/chain_gateway.yml rename to .woodpecker/gateway_chain.yml diff --git a/.woodpecker/mntx_gateway.yml b/.woodpecker/gateway_mntx.yml similarity index 100% rename from .woodpecker/mntx_gateway.yml rename to .woodpecker/gateway_mntx.yml diff --git a/.woodpecker/gateway_tgsettle.yml b/.woodpecker/gateway_tgsettle.yml new file mode 100644 index 0000000..ac863ab --- /dev/null +++ b/.woodpecker/gateway_tgsettle.yml @@ -0,0 +1,73 @@ +matrix: + include: + - TGSETTLE_GATEWAY_IMAGE_PATH: gateway/tgsettle + TGSETTLE_GATEWAY_DOCKERFILE: ci/prod/compose/tgsettle_gateway.dockerfile + TGSETTLE_GATEWAY_MONGO_SECRET_PATH: sendico/db + TGSETTLE_GATEWAY_ENV: prod + +when: + - event: push + branch: main + +steps: + - name: version + image: alpine:latest + commands: + - set -euo pipefail 2>/dev/null || set -eu + - apk add --no-cache git + - GIT_REV="$(git rev-parse --short HEAD)" + - BUILD_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + - APP_V="$(cat version)" + - BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" + - BUILD_USER="${WOODPECKER_MACHINE:-woodpecker}" + - printf "GIT_REV=%s\nBUILD_BRANCH=%s\nAPP_V=%s\nBUILD_DATE=%s\nBUILD_USER=%s\n" \ + "$GIT_REV" "$BUILD_BRANCH" "$APP_V" "$BUILD_DATE" "$BUILD_USER" | tee .env.version + + - name: proto + image: golang:alpine + depends_on: [ version ] + commands: + - set -eu + - apk add --no-cache bash git build-base protoc protobuf-dev + - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + - export PATH="$(go env GOPATH)/bin:$PATH" + - bash ci/scripts/proto/generate.sh + + - name: secrets + image: alpine:latest + depends_on: [ version ] + environment: + VAULT_ADDR: { from_secret: VAULT_ADDR } + VAULT_ROLE_ID: { from_secret: VAULT_APP_ROLE } + VAULT_SECRET_ID: { from_secret: VAULT_SECRET_ID } + commands: + - set -euo pipefail + - apk add --no-cache bash coreutils openssh-keygen curl sed python3 + - mkdir -p secrets + - ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600 + - base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY + - chmod 600 secrets/SSH_KEY + - ssh-keygen -y -f secrets/SSH_KEY >/dev/null + - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER + - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD + + - name: build-image + image: gcr.io/kaniko-project/executor:debug + depends_on: [ proto, secrets ] + commands: + - sh ci/scripts/tgsettle/build-image.sh + + - name: deploy + image: alpine:latest + depends_on: [ secrets, build-image ] + environment: + VAULT_ADDR: { from_secret: VAULT_ADDR } + VAULT_ROLE_ID: { from_secret: VAULT_APP_ROLE } + VAULT_SECRET_ID: { from_secret: VAULT_SECRET_ID } + commands: + - set -euo pipefail + - apk add --no-cache bash openssh-client rsync coreutils curl sed python3 + - mkdir -p /root/.ssh + - install -m 600 secrets/SSH_KEY /root/.ssh/id_rsa + - sh ci/scripts/tgsettle/deploy.sh diff --git a/frontend/pweb/pubspec.yaml b/frontend/pweb/pubspec.yaml index 90c6636..451c504 100644 --- a/frontend/pweb/pubspec.yaml +++ b/frontend/pweb/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 2.2.1+14 +version: 2.3.0+431 environment: sdk: ^3.8.1 diff --git a/version b/version index fae692e..cc6612c 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.2.1 \ No newline at end of file +2.3.0 \ No newline at end of file