Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check_network_version script does not clean used docker containers #2084

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5ba0e8f
fix: check_network_version script does not clean used docker containers
lklimek Aug 26, 2024
15a63d6
feat(scripts): check_network_version nmap support
lklimek Aug 30, 2024
0294c90
build(drive-abci): debug docker image with grovedb visualizer and tok…
lklimek Sep 3, 2024
76cfbd9
chore: creation of protocol V2 (#2104)
QuantumExplorer Sep 4, 2024
7f350a6
fix(sdk): use proofs when waiting for asset lock (#2067)
lklimek Sep 4, 2024
6e2a4db
build: cache Rust dependencies build as a docker layer (#1900)
shumkov Sep 6, 2024
f6c111c
chore: add change base branch script (#2082)
shumkov Sep 6, 2024
7601b9d
Merge remote-tracking branch 'origin/master' into fix/check_network_v…
lklimek Sep 9, 2024
7ee7db8
chore: script using grpc
lklimek Sep 9, 2024
3efa6c9
feat: query many identity balances at a time (#2112)
QuantumExplorer Sep 11, 2024
4425a94
feat: query block count per Evonode proposed in any given epoch (#2114)
QuantumExplorer Sep 12, 2024
a3cf845
chore(release): update changelog and bump version to 1.3.0-dev.1 (#2117)
shumkov Sep 12, 2024
8808f0c
fix: body-parser vulnerability (#2119)
shumkov Sep 15, 2024
d338e40
chore(dashmate): update platform images to `1-dev` (#2120)
shumkov Sep 15, 2024
1d431ce
fix(platform)!: contested username distribution (#2118)
QuantumExplorer Sep 15, 2024
59d2e45
feat(platform)!: contests on testnet should take less time (#2115)
QuantumExplorer Sep 15, 2024
e703f7e
style(dapi): better api for identities balances (#2122)
QuantumExplorer Sep 16, 2024
bf5aaf6
chore(release): update changelog and bump version to 1.3.0-dev.2 (#2123)
lklimek Sep 16, 2024
a434090
fix(drive-abci): require 75 percent of active, not total hpmns (#2127)
QuantumExplorer Sep 16, 2024
188e9b3
chore(release): update changelog and bump version to 1.3.0-dev.3 (#2128)
shumkov Sep 16, 2024
bdf9e54
fix: require75p of active not total hpmns (#2129)
QuantumExplorer Sep 16, 2024
a6082f8
chore(release): update changelog and bump version to 1.3.0-dev.4 (#2130)
shumkov Sep 16, 2024
3ce39f0
fix(drive-abci): cleanup of later contests on testnet only (#2134)
QuantumExplorer Sep 16, 2024
9a2aad4
chore(release): update changelog and bump version to 1.3.0-dev.5 (#2135)
shumkov Sep 16, 2024
05a3029
feat(platform): support Tenderdash upgrade (#2136)
QuantumExplorer Sep 17, 2024
b9ad5c7
fix(platform): contested username time fix (#2137)
QuantumExplorer Sep 17, 2024
aca6712
chore(dashmate)!: docker logs rotation (#2125)
shumkov Sep 17, 2024
ecd5b4d
docs: add warning about js-sdk security (#2133)
thephez Sep 17, 2024
50d42c2
docs: checked deployed to Mainnet box on front page
QuantumExplorer Sep 17, 2024
2954e29
feat(dapi): implement getIdentityBalance (#2105)
pshenmic Sep 17, 2024
79da90a
feat(dashmate)!: enhance core logging configuration (#2121)
shumkov Sep 17, 2024
f2ded52
feat(dashmate): doctor diagnostic (#2085)
shumkov Sep 17, 2024
48a0332
chore: emergency version upgrade to v1.3 Protocol Version 2. (#2138)
QuantumExplorer Sep 18, 2024
0e8310b
build(dashmate): update tenderdash image to fix-wrong-proposer-at-rou…
lklimek Sep 18, 2024
44c4731
chore: change upgrade on testnet 1 epoch later (#2141)
QuantumExplorer Sep 18, 2024
f68995b
Merge remote-tracking branch 'origin/v1.3-dev' into fix/check_network…
lklimek Sep 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .cargo/config-release.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This is a config file used by Docker build process when building release version of drive-abci.
# Hopefully it can be removed once profile-rustflags is stabilized, see https://github.com/rust-lang/cargo/issues/10271

[target.aarch64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]

[target.x86_64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
47 changes: 21 additions & 26 deletions .github/workflows/release-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,16 @@ on:
type: string
description: Image target. i.e. drive-abci, dapi
required: true
tag:
type: string
description: Image tag, i.e. v0.1.0; note it can be inherited from 'workflow_dispatch' event
default: ${{ github.event.inputs.tag || github.event.release.tag_name }}
cargo_profile:
type: string
description: Cargo profile. i.e. release, dev
default: release
env:
DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ github.sha }}
DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ inputs.tag }}-${{ inputs.cargo_profile }}-${{ github.sha }}
DIGEST_DIR_PATH: /tmp/digests

jobs:
Expand All @@ -29,9 +37,9 @@ jobs:
strategy:
matrix:
include:
- runner: [ "self-hosted", "linux", "x64", "ubuntu-platform" ]
- runner: ["self-hosted", "linux", "x64", "ubuntu-platform"]
platform: linux/amd64
- runner: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
- runner: ["self-hosted", "linux", "arm64", "ubuntu-platform"]
platform: linux/arm64
steps:
- name: Check out repo
Expand All @@ -52,10 +60,10 @@ jobs:
with:
image_name: ${{ inputs.image_name }}
image_org: ${{ inputs.image_org }}
image_version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.event.release.tag_name }}
image_version: ${{ inputs.tag }}
target: ${{ inputs.target }}
platform: ${{ matrix.platform }}
cargo_profile: release
cargo_profile: ${{ inputs.cargo_profile }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
region: ${{ secrets.AWS_REGION }}
Expand Down Expand Up @@ -92,29 +100,17 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get image version
uses: actions/github-script@v6
id: version
with:
result-encoding: string
script: |
return (
context.eventName === 'workflow_dispatch'
? '${{ github.event.inputs.tag }}'
: context.payload.release.tag_name
);

- name: Set suffix
uses: actions/github-script@v6
id: suffix
with:
result-encoding: string
script: |
const fullTag = '${{ steps.version.outputs.result }}';
const fullTag = '${{ inputs.tag }}';
if (fullTag.includes('-')) {
const [, fullSuffix] = fullTag.split('-');
const [suffix] = fullSuffix.split('.');
return `-${suffix}`;
const suffixes = fullTag.split('-').slice(1);
const firstElements = suffixes.map(suffix => suffix.split('.')[0]);
return `-${firstElements.join('-')}`;
} else {
return '';
}
Expand All @@ -125,10 +121,10 @@ jobs:
with:
images: ${{ inputs.image_org }}/${{ inputs.image_name }}
tags: |
type=match,pattern=v(\d+),group=1,value=${{ steps.version.outputs.result }}
type=match,pattern=v(\d+.\d+),group=1,value=${{ steps.version.outputs.result }}
type=match,pattern=v(\d+.\d+.\d+),group=1,value=${{ steps.version.outputs.result }}
type=match,pattern=v(.*),group=1,value=${{ steps.version.outputs.result }},suffix=
type=match,pattern=v(.*),group=1,value=${{ inputs.tag }},priority=910,suffix=
type=match,pattern=v(\d+),group=1,value=${{ inputs.tag }}
type=match,pattern=v(\d+.\d+),group=1,value=${{ inputs.tag }}
type=match,pattern=v(\d+.\d+.\d+),group=1,value=${{ inputs.tag }}
flavor: |
suffix=${{ steps.suffix.outputs.result }},onlatest=true
latest=${{ github.event_name == 'release' }}
Expand All @@ -138,7 +134,6 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create manifest list and push
working-directory: ${{ env.DIGEST_DIR_PATH }}
run: |
Expand Down
37 changes: 33 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
tag:
description: "Version (i.e. v0.22.3-pre.2)"
required: true
only_drive:
type: boolean
description: Only build Drive image
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -17,7 +21,7 @@ concurrency:
jobs:
release-npm:
name: Release NPM packages
runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
runs-on: ["self-hosted", "linux", "arm64", "ubuntu-platform"]
timeout-minutes: 15
if: github.event_name != 'workflow_dispatch'
steps:
Expand Down Expand Up @@ -81,7 +85,7 @@ jobs:
with:
result-encoding: string
script: |
const fullTag = context.payload.release.tag_name;
const fullTag = "${{ inputs.tag }}" || context.payload.release.tag_name;
if (fullTag.includes('-')) {
const [, fullSuffix] = fullTag.split('-');
const [suffix] = fullSuffix.split('.');
Expand All @@ -96,10 +100,15 @@ jobs:
with:
result-encoding: string
script: |
const tag = context.payload.release.tag_name;
const tag = "${{ inputs.tag }}" || context.payload.release.tag_name;
const [, major, minor] = tag.match(/^v([0-9]+)\.([0-9]+)/);
return (tag.includes('-') ? `${major}.${minor}-${{steps.suffix.outputs.result}}` : 'latest');

- name: Show NPM release tag
run: |
echo "NPM suffix: ${{ steps.suffix.outputs.result }}"
echo "NPM release tag: ${{ steps.tag.outputs.result }}"

- name: Configure NPM auth token
run: yarn config set npmAuthToken ${{ secrets.NPM_TOKEN }}

Expand Down Expand Up @@ -136,40 +145,60 @@ jobs:
image_org: dashpay
image_name: drive
target: drive-abci
tag: ${{ inputs.tag || github.event.release.tag_name }}

release-drive-image-debug:
name: Release Drive debug image
secrets: inherit
uses: ./.github/workflows/release-docker-image.yml
with:
name: Drive
image_org: dashpay
image_name: drive
target: drive-abci
cargo_profile: dev
tag: ${{ inputs.tag || github.event.release.tag_name }}-debug

release-dapi-image:
name: Release DAPI image
if: ${{ !inputs.only_drive }}
secrets: inherit
uses: ./.github/workflows/release-docker-image.yml
with:
name: DAPI
image_org: dashpay
image_name: dapi
target: dapi
tag: ${{ inputs.tag || github.event.release.tag_name }}

release-test-suite-image:
name: Release Test Suite image
if: ${{ !inputs.only_drive }}
secrets: inherit
uses: ./.github/workflows/release-docker-image.yml
with:
name: Test Suite
image_org: dashpay
image_name: platform-test-suite
target: test-suite
tag: ${{ inputs.tag || github.event.release.tag_name }}

release-dashmate-helper-image:
name: Release Dashmate Helper image
secrets: inherit
if: ${{ !inputs.only_drive }}
uses: ./.github/workflows/release-docker-image.yml
with:
name: Dashmate Helper
image_org: dashpay
image_name: dashmate-helper
target: dashmate-helper
tag: ${{ inputs.tag || github.event.release.tag_name }}

release-dashmate-packages:
name: Release Dashmate packages
runs-on: ${{ matrix.os }}
if: ${{ !inputs.only_drive }}
needs: release-npm
permissions:
id-token: write # s3 cache
Expand All @@ -190,7 +219,7 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0

- name: Configure AWS credentials and bucket region
uses: aws-actions/configure-aws-credentials@v4
Expand Down
Loading
Loading