Update runtime and tool versions (#1354)

- Node latest LTS
- Go latest stable
- Fabric 2.5.14, 3.1.3
- Just 1.43.0
- k9s 0.50.15
- Kind 0.30.0
- yq 4.48.1
- nvm 0.40.3

This addresses build breakages due to back-level versions.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
This commit is contained in:
Mark S. Lewis 2025-10-21 18:04:55 +01:00 committed by GitHub
parent 918077e4de
commit c5539270f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 140 additions and 146 deletions

View file

@ -3,16 +3,16 @@ description: Set up the Full Stack Asset Transfer Guide Dependencies
inputs:
node-version:
description: Version of node
default: 20.x
default: "lts/*"
just-version:
description: Just Version
default: "1.24.0"
default: "1.43.0"
k9s-version:
description: k9s Version
default: v0.25.3
default: v0.50.15
fabric-version:
description: Version of Hyperledger Fabric
default: "2.5.13"
default: "2.5.14"
ca-version:
description: Version of Hyperledger Fabric CA
default: "1.5.15"
@ -20,7 +20,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}
cache: "npm"
@ -29,8 +29,8 @@ runs:
- name: Install k9s
shell: bash
run: |
curl --fail --silent --show-error -L https://github.com/derailed/k9s/releases/download/${{ inputs.k9s-version }}/k9s_Linux_x86_64.tar.gz -o /tmp/k9s_Linux_x86_64.tar.gz
tar -zxf /tmp/k9s_Linux_x86_64.tar.gz -C /usr/local/bin k9s
curl --fail --silent --show-error -L https://github.com/derailed/k9s/releases/download/${{ inputs.k9s-version }}/k9s_Linux_amd64.tar.gz -o /tmp/k9s_Linux_amd64.tar.gz
tar -zxf /tmp/k9s_Linux_amd64.tar.gz -C /usr/local/bin k9s
sudo chown root /usr/local/bin/k9s
sudo chmod 755 /usr/local/bin/k9s

View file

@ -3,16 +3,16 @@ description: Set up the Test Network Runtime
inputs:
go-version:
description: Version of go
default: "1.23"
default: stable
node-version:
description: Version of node
default: 20.x
default: "lts/*"
java-version:
description: Version of JDK
default: 25.x
fabric-version:
description: Version of Hyperledger Fabric
default: 2.5.13
default: 2.5.14
ca-version:
description: Version of Hyperledger Fabric CA
default: 1.5.15
@ -20,18 +20,18 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/setup-go@v5
- uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version }}
cache-dependency-path: "**/go.sum"
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- uses: actions/setup-java@v4
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ inputs.java-version }}

View file

@ -16,17 +16,16 @@ concurrency:
cancel-in-progress: true
env:
GO_VER: "1.23"
NODE_VER: 20.x
NODE_VER: "lts/*"
JAVA_VER: 25.x
jobs:
go:
runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
steps:
- uses: actions/setup-go@v5
- uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VER }}
go-version: stable
- uses: actions/checkout@v5
- run: go install golang.org/x/tools/cmd/goimports@latest
- run: ci/scripts/lint-go.sh

View file

@ -5,7 +5,7 @@ name: REST Sample 🐧
run-name: ${{ github.actor }} is testing the REST Sample 🐧
env:
NODE_VER: 20.x
NODE_VER: "lts/*"
on:
workflow_dispatch:

View file

@ -38,7 +38,7 @@ jobs:
# Note: The default Fabric version for CI is currently the latest LTS (v2.5.x).
# To test BFT Orderers, Fabric v3.x is explicitly specified here.
with:
fabric-version: 3.1.1
fabric-version: 3.1.3
- name: Run Test Network with BFT Orderers
working-directory: test-network

View file

@ -2,10 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
ARG GO_VER=1.23
ARG ALPINE_VER=3.21
FROM golang:${GO_VER}-alpine${ALPINE_VER}
FROM golang:alpine
WORKDIR /go/src/github.com/hyperledger/fabric-samples/asset-transfer-basic/chaincode-external
COPY . .

View file

@ -1,7 +1,7 @@
#
# SPDX-License-Identifier: Apache-2.0
#
FROM node:22 AS builder
FROM node:lts AS builder
WORKDIR /usr/src/app
@ -11,7 +11,7 @@ ENV npm_config_cache=/usr/src/app
RUN npm ci && npm run package
FROM node:22 AS production
FROM node:lts AS production
ARG CC_SERVER_PORT
# Setup tini to work better handle signals

View file

@ -1,4 +1,4 @@
FROM node:22-alpine AS build
FROM node:lts-alpine AS build
RUN apk add --no-cache g++ make python3 dumb-init
@ -10,7 +10,7 @@ RUN npm ci
RUN npm run build
RUN npm prune --production
FROM node:22-alpine
FROM node:lts-alpine
ENV NODE_ENV production
WORKDIR /app

View file

@ -1,7 +1,7 @@
#
# SPDX-License-Identifier: Apache-2.0
#
FROM node:22 AS builder
FROM node:lts AS builder
WORKDIR /usr/src/app
@ -11,7 +11,7 @@ ENV npm_config_cache=/usr/src/app
RUN npm ci && npm run package
FROM node:22 AS production
FROM node:lts AS production
ARG CC_SERVER_PORT
# Setup tini to work better handle signals

View file

@ -1,4 +1,4 @@
FROM node:22-alpine AS build
FROM node:lts-alpine AS build
WORKDIR /app
COPY package.json /app
RUN npm install

View file

@ -78,12 +78,12 @@ then
echo "curl --fail --silent --show-error -L https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Darwin_arm64.tar.gz -o /tmp/k9s_Darwin_arm64.tar.gz"
echo "tar -zxf /tmp/k9s_Darwin_arm64.tar.gz -C /usr/local/bin k9s"
else
echo "curl --fail --silent --show-error -L https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Darwin_x86_64.tar.gz -o /tmp/k9s_Darwin_x86_64.tar.gz"
echo "tar -zxf /tmp/k9s_Darwin_x86_64.tar.gz -C /usr/local/bin k9s"
echo "curl --fail --silent --show-error -L https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Darwin_amd64.tar.gz -o /tmp/k9s_Darwin_amd64.tar.gz"
echo "tar -zxf /tmp/k9s_Darwin_amd64.tar.gz -C /usr/local/bin k9s"
fi
else
echo "curl --fail --silent --show-error -L https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_x86_64.tar.gz -o /tmp/k9s_Linux_x86_64.tar.gz"
echo "tar -zxf /tmp/k9s_Linux_x86_64.tar.gz -C /usr/local/bin k9s"
echo "curl --fail --silent --show-error -L https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_amd64.tar.gz -o /tmp/k9s_Linux_amd64.tar.gz"
echo "tar -zxf /tmp/k9s_Linux_amd64.tar.gz -C /usr/local/bin k9s"
fi
echo "sudo chown root /usr/local/bin/k9s"
echo "sudo chmod 755 /usr/local/bin/k9s"

View file

@ -1,7 +1,7 @@
#
# SPDX-License-Identifier: Apache-2.0
#
FROM node:22 AS builder
FROM node:lts AS builder
WORKDIR /usr/src/app
@ -12,7 +12,7 @@ RUN npm install
RUN npm run build && npm shrinkwrap
FROM node:22 as prod-builder
FROM node:lts as prod-builder
WORKDIR /usr/src/app
COPY --chown=node:node --from=builder /usr/src/app/dist ./dist
COPY --chown=node:node --from=builder /usr/src/app/package.json ./
@ -21,7 +21,7 @@ RUN npm ci --omit=dev && npm cache clean --force
# ------------------------------------------------------------------------------
# Builds the Chaincode as a Service docker version
FROM node:22 AS ccaas
FROM node:lts AS ccaas
WORKDIR /usr/src/app
ARG TARGETARCH
@ -47,7 +47,7 @@ ENTRYPOINT [ "/tini", "--", "/usr/src/app/docker-entrypoint.sh" ]
# ------------------------------------------------------------------------------
# Builds the chaincode for the k8s builder
FROM node:22 AS k8s
FROM node:lts AS k8s
WORKDIR /usr/src/app
ARG TARGETARCH
@ -66,4 +66,3 @@ RUN chmod +x /tini
ENV NODE_ENV=production
USER node
ENTRYPOINT [ "/tini", "--", "/usr/src/app/docker-entrypoint.sh" ]

View file

@ -2,7 +2,7 @@
write_files:
- path: /config/provision-root.sh
permissions: '0744'
permissions: "0744"
content: |
#!/usr/bin/env bash
set -ex
@ -33,8 +33,8 @@ write_files:
# Install k9s
K9S_VERSION=0.25.3
if [ ! -x "/usr/local/bin/k9s" ]; then
curl --fail --silent --show-error -L "https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_x86_64.tar.gz" -o "/tmp/k9s_Linux_x86_64.tar.gz"
tar -zxf "/tmp/k9s_Linux_x86_64.tar.gz" -C /usr/local/bin k9s
curl --fail --silent --show-error -L "https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_amd64.tar.gz" -o "/tmp/k9s_Linux_amd64.tar.gz"
tar -zxf "/tmp/k9s_Linux_amd64.tar.gz" -C /usr/local/bin k9s
chown root:root /usr/local/bin/k9s
chmod 755 /usr/local/bin/k9s
fi

View file

@ -6,11 +6,10 @@ users:
- docker
lock_passwd: false
shell: /bin/bash
sudo: ['ALL=(ALL) NOPASSWD:ALL']
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
# ssh-authorized-keys:
# - ssh-rsa <SNIP>
pacakge_update: true
package_upgrade: true
packages:
@ -20,7 +19,7 @@ packages:
write_files:
- path: /config/provision-root.sh
permissions: '0744'
permissions: "0744"
content: |
#!/usr/bin/env bash
set -ex
@ -28,13 +27,13 @@ write_files:
# set -o pipefail
if [ -z $1 ]; then
HLF_VERSION=2.2.0
HLF_VERSION=2.5.14
else
HLF_VERSION=$1
fi
if [ ${HLF_VERSION:0:4} = '2.5.' -o ${HLF_VERSION:0:4} = '2.4.']; then
export GO_VERSION=1.23.6
export GO_VERSION=1.25.3
elif [ ${HLF_VERSION:0:4} = '2.2.' -o ${HLF_VERSION:0:4} = '2.3.' ]; then
export GO_VERSION=1.14.11
elif [ ${HLF_VERSION:0:4} = '2.0.' -o ${HLF_VERSION:0:4} = '2.1.' ]; then
@ -58,7 +57,7 @@ write_files:
apt-get -y --no-upgrade install kubectl
# Install yq
YQ_VERSION=4.23.1
YQ_VERSION=4.48.1
if [ ! -x "/usr/local/bin/yq" ]; then
curl --fail --silent --show-error -L "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_amd64" -o /usr/local/bin/yq
chmod 755 /usr/local/bin/yq
@ -71,17 +70,17 @@ write_files:
fi
# Install kind
KIND_VERSION=0.14.0
KIND_VERSION=0.30.0
if [ ! -x "/usr/local/bin/kind" ]; then
curl --fail --silent --show-error -L "https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64" -o /usr/local/bin/kind
chmod 755 /usr/local/bin/kind
fi
# Install k9s
K9S_VERSION=0.25.3
K9S_VERSION=0.50.15
if [ ! -x "/usr/local/bin/k9s" ]; then
curl --fail --silent --show-error -L "https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_x86_64.tar.gz" -o "/tmp/k9s_Linux_x86_64.tar.gz"
tar -zxf "/tmp/k9s_Linux_x86_64.tar.gz" -C /usr/local/bin k9s
curl --fail --silent --show-error -L "https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_amd64.tar.gz" -o "/tmp/k9s_Linux_amd64.tar.gz"
tar -zxf "/tmp/k9s_Linux_amd64.tar.gz" -C /usr/local/bin k9s
chown root:root /usr/local/bin/k9s
chmod 755 /usr/local/bin/k9s
fi
@ -96,7 +95,7 @@ write_files:
fi
# Install just
JUST_VERSION=1.2.0
JUST_VERSION=1.43.0
if [ ! -x "/usr/local/bin/just" ]; then
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --tag ${JUST_VERSION} --to /usr/local/bin
chown root:root /usr/local/bin/just
@ -104,15 +103,15 @@ write_files:
fi
- path: /config/provision-user.sh
permissions: '0777'
permissions: "0777"
owner: ubuntu:ubuntu
content: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] || curl --fail --silent --show-error -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash
[ -s "$NVM_DIR/nvm.sh" ] || curl --fail --silent --show-error -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
. "$NVM_DIR/nvm.sh"
# Install latest node v16.x, latest typescript, weft
nvm install 16
# Install latest node LTS version, latest typescript, weft
nvm install --lts
npm install -g typescript
npm install -g @hyperledger-labs/weft

View file

@ -33,7 +33,7 @@ function context() {
export ${name}="${!override_name:-${default_value}}"
}
context FABRIC_VERSION 2.5.13
context FABRIC_VERSION 2.5.14
context FABRIC_CA_VERSION 1.5.15
context CLUSTER_RUNTIME kind # or k3s for Rancher
@ -82,7 +82,7 @@ context PEER_IMAGE_LABEL 0.11.0 # When using k8s-fabric-peer in Fabric
context ORDERER_IMAGE ${FABRIC_CONTAINER_REGISTRY}/fabric-orderer
context ORDERER_IMAGE_LABEL ${FABRIC_VERSION}
context OPERATOR_IMAGE ghcr.io/hyperledger-labs/fabric-operator
context OPERATOR_IMAGE_LABEL 1.0.4
context OPERATOR_IMAGE_LABEL latest
context INIT_IMAGE registry.access.redhat.com/ubi8/ubi-minimal
context INIT_IMAGE_LABEL latest
context GRPCWEB_IMAGE ghcr.io/hyperledger-labs/grpc-web

View file

@ -17,7 +17,7 @@ function printHelp() {
println
println " Flags:"
println " Used with \033[0;32mnetwork.sh prereq\033[0m:"
println " -i FabricVersion (default: '2.5.13')"
println " -i FabricVersion (default: '2.5.14')"
println " -cai Fabric CA Version (default: '1.5.15')"
println
elif [ "$USAGE" == "up" ]; then
@ -159,7 +159,7 @@ function printHelp() {
println
println " Flags:"
println " Used with \033[0;32mnetwork.sh prereq\033[0m"
println " -i FabricVersion (default: '2.5.13')"
println " -i FabricVersion (default: '2.5.14')"
println " -cai Fabric CA Version (default: '1.5.15')"
println
println " Used with \033[0;32mnetwork.sh up\033[0m, \033[0;32mnetwork.sh createChannel\033[0m:"

View file

@ -1,5 +1,5 @@
#build stage
FROM golang:1.23-bookworm AS builder
FROM golang:latest AS builder
WORKDIR /go/src/app
COPY go.mod .
COPY go.sum .
@ -8,7 +8,7 @@ COPY . .
RUN go build -o /go/bin/app
#final stage
FROM golang:1.23-bookworm
FROM golang:latest
COPY --from=builder /go/bin/app /app
ENTRYPOINT /app
LABEL Name=tokens Version=0.1.0

View file

@ -1,4 +1,4 @@
FROM golang:1.23 as builder
FROM golang:latest as builder
RUN git clone https://github.com/hyperledger-labs/fabric-token-sdk.git
WORKDIR fabric-token-sdk
@ -7,7 +7,7 @@ RUN git checkout v0.3.0 && go mod download
RUN CGO_ENABLED=1 go build -buildvcs=false -o /tcc token/services/network/fabric/tcc/main/main.go && chmod +x /tcc
# Final image
FROM golang:1.23
FROM golang:latest
COPY --from=builder /tcc .
EXPOSE 9999