Skip to content

Commit bb37e28

Browse files
Merge pull request #43 from kaleido-io/merge-v1-develop
Merge v1 develop into release-v1-develop
2 parents 6fb6f91 + 2822101 commit bb37e28

File tree

70 files changed

+9449
-318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+9449
-318
lines changed

.github/WORKFLOWS.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ Once changes are merged into the `main` branch, workflows prepare the project fo
5454
Detects documentation updates and publishes the latest content to the documentation site.
5555

5656
## Release Time
57-
Paladin follows a two-stage release process to ensure quality and stability:
57+
Paladin follows a two-stage release process to ensure quality and stability. All releases are triggered through the **[Release Entry Point](https://github.com/LFDT-Paladin/paladin/actions/workflows/release-entry.yaml)** workflow due to the way npm trusted publishing works.
5858

59-
### [Stage 1: Release Candidate (RC)](https://github.com/LFDT-Paladin/paladin/actions/workflows/release-candidate.yaml)
59+
### Stage 1: Release Candidate (RC)
6060
Release candidates are created first for testing and validation:
6161

6262
- **[Release Candidate Workflow](workflows/release-candidate.yaml):**
63-
Triggered by an RC tag (e.g., `v1.2.3-rc.1`), this workflow creates pre-releases:
63+
Triggered via the Release Entry Point with `release_type=rc`, this workflow creates pre-releases:
6464
- **[Release Docker Images](workflows/release-images.yaml):**
6565
Builds and **publishes Docker images** tagged with the RC version (e.g., `v1.2.3-rc.1`).
6666
- **Registries:**
@@ -75,11 +75,11 @@ Release candidates are created first for testing and validation:
7575
Packages contract ABIs and deployment artifacts for distribution.
7676
- **GitHub Release:** Creates a pre-release with all artifacts
7777

78-
### [Stage 2: Final Release](https://github.com/LFDT-Paladin/paladin/actions/workflows/release.yaml)
78+
### Stage 2: Final Release
7979
Once the RC has been tested and validated, the final release can be created:
8080

8181
- **[Release Orchestrator](workflows/release.yaml):**
82-
Triggered by a final version tag (e.g., `v1.2.3`), this workflow coordinates the final release:
82+
Triggered via the Release Entry Point with `release_type=final`, this workflow coordinates the final release:
8383
- **[Release Docker Images](workflows/release-images.yaml):**
8484
Builds and **publishes Docker images** tagged with the release version (e.g., `v1.2.3`) and `latest`.
8585
- **Registries:**
@@ -101,29 +101,45 @@ Once the RC has been tested and validated, the final release can be created:
101101

102102
## How to Create a Release
103103

104+
All releases are triggered through the unified **[Release Entry Point](https://github.com/LFDT-Paladin/paladin/actions/workflows/release-entry.yaml)** workflow.
105+
104106
### Quick Start: Release Process
105107
Follow these steps to create a new Paladin release:
106108

107109
#### Step 1: Create a Release Candidate
108-
1. Go to **[Actions → Release Candidate](https://github.com/LFDT-Paladin/paladin/actions/workflows/release-candidate.yaml)**
110+
1. Go to **[Actions → Release Entry Point](https://github.com/LFDT-Paladin/paladin/actions/workflows/release-entry.yaml)**
109111
2. Click **"Run workflow"**
110-
3. Enter the RC tag (e.g., `v1.2.3-rc.1`)
112+
3. Fill in the required fields:
113+
- **release_type**: Select `rc`
114+
- **tag**: RC tag (e.g., `v1.2.3-rc.1`)
111115
4. Click **"Run workflow"**
112116
5. Wait for the workflow to complete and test the RC thoroughly
113117

114118
#### Step 2: Create the Final Release
115-
1. Go to **[Actions → Release](https://github.com/LFDT-Paladin/paladin/actions/workflows/release.yaml)**
119+
1. Go to **[Actions → Release Entry Point](https://github.com/LFDT-Paladin/paladin/actions/workflows/release-entry.yaml)**
116120
2. Click **"Run workflow"**
117121
3. Fill in the required fields:
122+
- **release_type**: Select `final`
118123
- **tag**: Final release version (e.g., `v1.2.3`)
119124
- **rc_tag**: The RC tag you tested (e.g., `v1.2.3-rc.1`)
120125
- **latest**: Check if this should be marked as the latest release
121126
4. Click **"Run workflow"**
122127

128+
#### SDK-Only Release (Optional)
129+
To release only the TypeScript SDK without a full release:
130+
1. Go to **[Actions → Release Entry Point](https://github.com/LFDT-Paladin/paladin/actions/workflows/release-entry.yaml)**
131+
2. Click **"Run workflow"**
132+
3. Fill in the required fields:
133+
- **release_type**: Select `sdk`
134+
- **tag**: SDK version (e.g., `v1.2.3`)
135+
- **sdk_dist_tags**: NPM dist-tags, semicolon-separated (e.g., `latest` or `rc;rc.1`)
136+
- **ref**: (Optional) Commit ref for checkout, defaults to workflow branch
137+
4. Click **"Run workflow"**
138+
123139
### Example Release Flow
124140
```
125-
1. Create RC: v1.2.3-rc.1 → Test thoroughly
126-
2. Final Release: v1.2.3 → Built from v1.2.3-rc.1
141+
1. Create RC: release_type=rc, tag=v1.2.3-rc.1 → Test thoroughly
142+
2. Final Release: release_type=final, tag=v1.2.3, rc_tag=v1.2.3-rc.1
127143
```
128144

129145
### Important Release Process Notes:
@@ -239,12 +255,10 @@ You will publish a Helm chart version `0.11.0-fix.0` that points to images built
239255
## Manual Actions 🛠️
240256
Workflows can also be triggered manually when needed. Available options include:
241257

258+
- **[Release Entry Point](workflows/release-entry.yaml)** (RC, final, and SDK releases)
242259
- **[Test Rollout](workflows/test-rollout.yaml)** (Version rollout testing)
243-
- **[Release Orchestrator](workflows/release.yaml)** (Final releases)
244-
- **[Release Candidate](workflows/release-candidate.yaml)** (RC releases)
245260
- **[Release Docker Images](workflows/release-images.yaml)**
246261
- **[Release Helm Chart](workflows/release-charts.yaml)**
247-
- **[Release TypeScript SDK](workflows/release-typescript-sdk.yaml)**
248262
- **[Release Solidity Contracts](workflows/release-solidity-contracts.yaml)**
249263
- **[Build Helm Chart](workflows/build-chart.yaml)**
250264
- **[Build Docker Images](workflows/build-image.yaml)**
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 'Print Disk Usage'
2+
description: 'Prints current disk usage statistics.'
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Print disk usage
7+
shell: bash
8+
run: |
9+
echo "--- Disk Usage ---"
10+
df -h
11+

.github/workflows/build-chart.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ jobs:
9898
-PpaladinImageName=${{ inputs.paladin-image }} \
9999
-PpaladinImageTag=${{ inputs.paladin-image-tag }} \
100100
-PdeleteCluster=false
101+
102+
- name: Print disk usage
103+
uses: ./.github/actions/print-disk-usage
101104

102105
- name: Port-forward pprof endpoints
103106
if: failure()
@@ -155,5 +158,4 @@ jobs:
155158
cm-3.json
156159
goroutine_dump_node1.txt
157160
goroutine_dump_node2.txt
158-
goroutine_dump_node3.txt
159-
161+
goroutine_dump_node3.txt

.github/workflows/build-image.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ jobs:
7272
echo "push: ${{ inputs.push }}"
7373
echo "platforms: ${{ inputs.platforms }}"
7474
75+
- name: Free up disk space on runner
76+
uses: ./.github/actions/free-up-disk-space
77+
7578
- name: Set up QEMU
7679
uses: docker/setup-qemu-action@v3
7780

@@ -135,4 +138,7 @@ jobs:
135138
with:
136139
name: ${{ inputs.image }}-${{ github.sha }}
137140
path: /tmp/${{ steps.image-name-sanitizer.outputs.IMAGE_NAME_SANITIZED }}-${{ github.sha }}.tar
138-
retention-days: 7
141+
retention-days: 7
142+
143+
- name: Print disk usage
144+
uses: ./.github/actions/print-disk-usage

.github/workflows/build.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
with:
1616
fetch-depth: 0
1717
submodules: recursive
18+
19+
- name: Free up disk space on runner
20+
uses: ./.github/actions/free-up-disk-space
1821

1922
- name: Install pre-requisites
2023
uses: ./.github/actions/setup
@@ -25,6 +28,9 @@ jobs:
2528
- name: Build with Gradle
2629
run: ./gradlew -PverboseTests=true --no-daemon --parallel --max-workers=5 build
2730

31+
- name: Print disk usage
32+
uses: ./.github/actions/print-disk-usage
33+
2834
- name: Upload testbed logs
2935
uses: actions/upload-artifact@v4
3036
if: always()

.github/workflows/copy-images.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ jobs:
3636
matrix:
3737
image: [paladin, paladin-operator]
3838
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v4
41+
42+
- name: Print disk usage
43+
uses: ./.github/actions/print-disk-usage
44+
3945
- name: Set up Docker Buildx
4046
uses: docker/setup-buildx-action@v3
4147

@@ -53,9 +59,6 @@ jobs:
5359
username: ${{ secrets.DOCKERHUB_USERNAME }}
5460
password: ${{ secrets.DOCKERHUB_TOKEN }}
5561

56-
- name: Checkout code
57-
uses: actions/checkout@v4
58-
5962
- name: Set Source Repository Name
6063
id: source_repo
6164
uses: ./.github/actions/repository
@@ -96,4 +99,6 @@ jobs:
9699
${SOURCE_IMAGE}:${SOURCE_TAG}
97100
fi
98101
102+
- name: Print disk usage
103+
uses: ./.github/actions/print-disk-usage
99104

.github/workflows/release-candidate.yaml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ permissions:
1111
id-token: write
1212

1313
on:
14-
push:
15-
tags:
16-
- 'v*.*.*-rc.*'
17-
workflow_dispatch:
14+
workflow_call:
1815
inputs:
1916
tag:
2017
required: true
@@ -34,18 +31,8 @@ jobs:
3431
- id: set-vars
3532
shell: bash
3633
env:
37-
EVENT_NAME: ${{ github.event_name }}
38-
REF: ${{ github.ref }}
39-
INPUT_TAG: ${{ github.event.inputs.tag }}
34+
TAG: ${{ inputs.tag }}
4035
run: |
41-
if [[ "$EVENT_NAME" == "push" && "$REF" == refs/tags/v* ]]; then
42-
echo "Tag push event"
43-
TAG="${REF##*/}"
44-
else
45-
echo "Workflow dispatch or other event"
46-
TAG="$INPUT_TAG"
47-
fi
48-
4936
# Validate tag begins with 'v'
5037
if [[ ! "$TAG" =~ ^v ]]; then
5138
echo "Error: Tag must begin with 'v' (e.g., v1.2.3-rc.1)"
@@ -149,8 +136,6 @@ jobs:
149136
# For a tag like 'v0.1.0-rc.1', this will become "rc;rc.1"
150137
# We can't use the rc_number (e.g. 1)because it's not a valid npm tag
151138
sdk_tag: "rc;${{ needs.setup.outputs.npm_prerelease_tag }}"
152-
secrets:
153-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
154139

155140
# ================================ PRE-RELEASE TESTING ================================
156141
# Test that the built artifacts are compatible and functional before creating the RC release
@@ -198,6 +183,14 @@ jobs:
198183
needs: [setup, prepare-release]
199184
runs-on: ubuntu-latest
200185
steps:
186+
- name: Checkout repository code
187+
uses: actions/checkout@v4
188+
with:
189+
submodules: recursive
190+
191+
- name: Print disk usage
192+
uses: ./.github/actions/print-disk-usage
193+
201194

202195
- name: Download Helm artifacts
203196
uses: actions/download-artifact@v4
@@ -229,3 +222,6 @@ jobs:
229222
contracts/zeto-abis.tar.gz
230223
env:
231224
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
225+
226+
- name: Print disk usage
227+
uses: ./.github/actions/print-disk-usage

.github/workflows/release-charts.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ jobs:
7272
submodules: recursive
7373
ref: ${{ inputs.ref != '' && inputs.ref || github.ref }}
7474

75+
- name: Free up disk space on runner
76+
uses: ./.github/actions/free-up-disk-space
77+
7578
- name: Install pre-requisites
7679
uses: ./.github/actions/setup
7780

@@ -217,4 +220,7 @@ jobs:
217220
\`\`\`sh
218221
helm upgrade --install paladin paladin/paladin-operator -n paladin --create-namespace --version ${{ steps.clean-tag.outputs.PROCESSED_TAG }}
219222
\`\`\`
220-
EOF
223+
EOF
224+
225+
- name: Print disk usage
226+
uses: ./.github/actions/print-disk-usage
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Unified release entry point for all release operations.
2+
# This is the sole workflow_dispatch entry point, enabling npm trusted publishing via OIDC.
3+
#
4+
# Usage:
5+
# - RC release: release_type=rc, tag=v1.2.3-rc.1
6+
# - Final release: release_type=final, tag=v1.2.3, rc_tag=v1.2.3-rc.1
7+
# - SDK only: release_type=sdk, tag=v1.2.3, sdk_dist_tags=latest;stable [, ref=<commit>]
8+
name: Release Entry Point
9+
10+
permissions:
11+
contents: write
12+
packages: write
13+
id-token: write
14+
15+
on:
16+
workflow_dispatch:
17+
inputs:
18+
release_type:
19+
type: choice
20+
options:
21+
- rc
22+
- final
23+
- sdk
24+
description: 'Type of release'
25+
required: true
26+
tag:
27+
type: string
28+
description: 'Target tag (RC tag for rc, final tag for final, version for sdk)'
29+
required: true
30+
rc_tag:
31+
type: string
32+
description: '(final only) RC tag to release from'
33+
required: false
34+
latest:
35+
type: boolean
36+
default: true
37+
description: '(final only) Mark as latest release'
38+
ref:
39+
type: string
40+
description: '(sdk only) Commit ref for checkout, defaults to workflow branch'
41+
required: false
42+
sdk_dist_tags:
43+
type: string
44+
description: '(sdk only) NPM dist-tags, semicolon-separated'
45+
required: false
46+
47+
jobs:
48+
release-candidate:
49+
if: inputs.release_type == 'rc'
50+
uses: ./.github/workflows/release-candidate.yaml
51+
with:
52+
tag: ${{ inputs.tag }}
53+
secrets: inherit
54+
55+
release-final:
56+
if: inputs.release_type == 'final'
57+
uses: ./.github/workflows/release.yaml
58+
with:
59+
tag: ${{ inputs.tag }}
60+
rc_tag: ${{ inputs.rc_tag }}
61+
latest: ${{ inputs.latest }}
62+
secrets: inherit
63+
64+
release-sdk:
65+
if: inputs.release_type == 'sdk'
66+
uses: ./.github/workflows/release-typescript-sdk.yaml
67+
with:
68+
sdk_version: ${{ inputs.tag }}
69+
sdk_tag: ${{ inputs.sdk_dist_tags }}
70+
ref: ${{ inputs.ref }}
71+

.github/workflows/release-solidity-contracts.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ jobs:
5454
submodules: recursive
5555
ref: ${{ inputs.ref != '' && inputs.ref || github.ref }}
5656

57+
- name: Print disk usage
58+
uses: ./.github/actions/print-disk-usage
59+
5760
- name: Install pre-requisites
5861
uses: ./.github/actions/setup
5962

@@ -103,4 +106,7 @@ jobs:
103106
- name: Print upload-artifacts output
104107
shell: bash
105108
run: |
106-
echo "upload-artifacts URL: ${{ steps.upload-artifacts.outputs.artifact-url }}"
109+
echo "upload-artifacts URL: ${{ steps.upload-artifacts.outputs.artifact-url }}"
110+
111+
- name: Print disk usage
112+
uses: ./.github/actions/print-disk-usage

0 commit comments

Comments
 (0)