From 137f365ec9a5093b1224427be2b7d9e851d41167 Mon Sep 17 00:00:00 2001 From: David Enyeart Date: Wed, 18 Sep 2024 11:21:20 -0400 Subject: [PATCH] Bump ubuntu to 22.04 in CI Since Fabric v3.0 builds on ubuntu 22.04, it is necessary for samples CI to run on ubuntu 22.04. Both Fabric v2.5 components (ubuntu 20.04) and Fabric v3.0 components (ubuntu 22.04) work on ubuntu 22.04 runtime. The update also requires shell script updates to pass linting. Signed-off-by: David Enyeart --- .github/workflows/lint.yaml | 10 +++++----- .github/workflows/rest-sample.yaml | 2 +- .github/workflows/test-fsat.yaml | 10 +++++----- .github/workflows/test-network-basic.yaml | 2 +- .github/workflows/test-network-events.yaml | 2 +- .github/workflows/test-network-hsm.yaml | 2 +- .github/workflows/test-network-k8s.yaml | 8 ++++---- .github/workflows/test-network-ledger.yaml | 2 +- .github/workflows/test-network-off-chain.yaml | 2 +- .github/workflows/test-network-private.yaml | 2 +- .github/workflows/test-network-sbe.yaml | 2 +- .github/workflows/test-network-secured.yaml | 2 +- test-network-nano-bash/orderer1.sh | 2 +- test-network-nano-bash/orderer2.sh | 2 +- test-network-nano-bash/orderer3.sh | 2 +- test-network-nano-bash/orderer4.sh | 2 +- 16 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 35be812ad5..902dba101e 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -22,7 +22,7 @@ env: jobs: go: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - uses: actions/setup-go@v5 with: @@ -32,7 +32,7 @@ jobs: - run: ci/scripts/lint-go.sh typescript: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -41,7 +41,7 @@ jobs: - run: ci/scripts/lint-typescript.sh javascript: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -50,7 +50,7 @@ jobs: - run: ci/scripts/lint-javascript.sh java: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -60,7 +60,7 @@ jobs: - run: ci/scripts/lint-java.sh shell: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - uses: actions/checkout@v4 - run: ci/scripts/lint-shell.sh diff --git a/.github/workflows/rest-sample.yaml b/.github/workflows/rest-sample.yaml index 78c62041f1..f807d281a8 100644 --- a/.github/workflows/rest-sample.yaml +++ b/.github/workflows/rest-sample.yaml @@ -22,7 +22,7 @@ concurrency: jobs: test-sample: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - name: Checkout diff --git a/.github/workflows/test-fsat.yaml b/.github/workflows/test-fsat.yaml index 13d3f85c62..43b48ebe8a 100644 --- a/.github/workflows/test-fsat.yaml +++ b/.github/workflows/test-fsat.yaml @@ -14,7 +14,7 @@ concurrency: jobs: ansible: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - uses: actions/checkout@v4 - name: Set up Full Stack Runtime @@ -23,7 +23,7 @@ jobs: working-directory: full-stack-asset-transfer-guide appdev: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - uses: actions/checkout@v4 - name: Set up Full Stack Runtime @@ -32,7 +32,7 @@ jobs: working-directory: full-stack-asset-transfer-guide chaincode: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - uses: actions/checkout@v4 - name: Set up Full Stack Runtime @@ -41,7 +41,7 @@ jobs: working-directory: full-stack-asset-transfer-guide cloud: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - uses: actions/checkout@v4 - name: Set up Full Stack Runtime @@ -50,7 +50,7 @@ jobs: working-directory: full-stack-asset-transfer-guide console: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - uses: actions/checkout@v4 - name: Set up Full Stack Runtime diff --git a/.github/workflows/test-network-basic.yaml b/.github/workflows/test-network-basic.yaml index 3c1a153a61..0fb500a19d 100644 --- a/.github/workflows/test-network-basic.yaml +++ b/.github/workflows/test-network-basic.yaml @@ -17,7 +17,7 @@ concurrency: jobs: basic: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} strategy: matrix: chaincode-language: diff --git a/.github/workflows/test-network-events.yaml b/.github/workflows/test-network-events.yaml index 49b9be6228..76da18a4c1 100644 --- a/.github/workflows/test-network-events.yaml +++ b/.github/workflows/test-network-events.yaml @@ -17,7 +17,7 @@ concurrency: jobs: events: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} strategy: matrix: chaincode-language: diff --git a/.github/workflows/test-network-hsm.yaml b/.github/workflows/test-network-hsm.yaml index d904b82493..af36f17427 100644 --- a/.github/workflows/test-network-hsm.yaml +++ b/.github/workflows/test-network-hsm.yaml @@ -17,7 +17,7 @@ concurrency: jobs: hsm: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} strategy: matrix: chaincode-language: diff --git a/.github/workflows/test-network-k8s.yaml b/.github/workflows/test-network-k8s.yaml index 5dc89e1011..6fe6bda04b 100644 --- a/.github/workflows/test-network-k8s.yaml +++ b/.github/workflows/test-network-k8s.yaml @@ -17,7 +17,7 @@ concurrency: jobs: ccaas-java: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - name: Checkout uses: actions/checkout@v4 @@ -29,7 +29,7 @@ jobs: CHAINCODE_LANGUAGE: java ccaas-external: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - name: Checkout uses: actions/checkout@v4 @@ -41,7 +41,7 @@ jobs: CHAINCODE_LANGUAGE: external k8s-builder: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - name: Checkout uses: actions/checkout@v4 @@ -54,7 +54,7 @@ jobs: CHAINCODE_BUILDER: k8s multi-namespace: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/test-network-ledger.yaml b/.github/workflows/test-network-ledger.yaml index a691e1809f..4a185b861e 100644 --- a/.github/workflows/test-network-ledger.yaml +++ b/.github/workflows/test-network-ledger.yaml @@ -17,7 +17,7 @@ concurrency: jobs: basic: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} strategy: matrix: chaincode-language: diff --git a/.github/workflows/test-network-off-chain.yaml b/.github/workflows/test-network-off-chain.yaml index 40693a5bac..31d1eff58c 100644 --- a/.github/workflows/test-network-off-chain.yaml +++ b/.github/workflows/test-network-off-chain.yaml @@ -17,7 +17,7 @@ concurrency: jobs: off-chain: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} strategy: matrix: chaincode-language: diff --git a/.github/workflows/test-network-private.yaml b/.github/workflows/test-network-private.yaml index 3b792263bb..d164a6477b 100644 --- a/.github/workflows/test-network-private.yaml +++ b/.github/workflows/test-network-private.yaml @@ -17,7 +17,7 @@ concurrency: jobs: private: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} strategy: matrix: chaincode-language: diff --git a/.github/workflows/test-network-sbe.yaml b/.github/workflows/test-network-sbe.yaml index 1aa533bb05..3859875ebf 100644 --- a/.github/workflows/test-network-sbe.yaml +++ b/.github/workflows/test-network-sbe.yaml @@ -17,7 +17,7 @@ concurrency: jobs: SBE: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} strategy: matrix: chaincode-language: diff --git a/.github/workflows/test-network-secured.yaml b/.github/workflows/test-network-secured.yaml index 54cfa3632b..79c353e76a 100644 --- a/.github/workflows/test-network-secured.yaml +++ b/.github/workflows/test-network-secured.yaml @@ -17,7 +17,7 @@ concurrency: jobs: secured: - runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-20.04' || 'ubuntu-20.04' }} + runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }} strategy: matrix: chaincode-language: diff --git a/test-network-nano-bash/orderer1.sh b/test-network-nano-bash/orderer1.sh index 1176b6cd27..aed9426f8a 100755 --- a/test-network-nano-bash/orderer1.sh +++ b/test-network-nano-bash/orderer1.sh @@ -27,7 +27,7 @@ then echo "Unsupported input consensus type ${1}" exit 1 fi - export ORDERER_CONSENSUS_TYPE=${1} + export ORDERER_CONSENSUS_TYPE="${1}" fi export ORDERER_CONSENSUS_WALDIR="${PWD}"/data/orderer/consensus/wal export ORDERER_CONSENSUS_SNAPDIR="${PWD}"/data/orderer/consensus/snap diff --git a/test-network-nano-bash/orderer2.sh b/test-network-nano-bash/orderer2.sh index c360477b49..2148806460 100755 --- a/test-network-nano-bash/orderer2.sh +++ b/test-network-nano-bash/orderer2.sh @@ -27,7 +27,7 @@ then echo "Unsupported input consensus type ${1}" exit 1 fi - export ORDERER_CONSENSUS_TYPE=${1} + export ORDERER_CONSENSUS_TYPE="${1}" fi export ORDERER_CONSENSUS_WALDIR="${PWD}"/data/orderer2/consensus/wal export ORDERER_CONSENSUS_SNAPDIR="${PWD}"/data/orderer2/consensus/snap diff --git a/test-network-nano-bash/orderer3.sh b/test-network-nano-bash/orderer3.sh index 5151ee4d14..22aea76362 100755 --- a/test-network-nano-bash/orderer3.sh +++ b/test-network-nano-bash/orderer3.sh @@ -27,7 +27,7 @@ then echo "Unsupported input consensus type ${1}" exit 1 fi - export ORDERER_CONSENSUS_TYPE=${1} + export ORDERER_CONSENSUS_TYPE="${1}" fi export ORDERER_CONSENSUS_WALDIR="${PWD}"/data/orderer3/consensus/wal export ORDERER_CONSENSUS_SNAPDIR="${PWD}"/data/orderer3/consensus/snap diff --git a/test-network-nano-bash/orderer4.sh b/test-network-nano-bash/orderer4.sh index 0a118c67e9..00aee6e977 100755 --- a/test-network-nano-bash/orderer4.sh +++ b/test-network-nano-bash/orderer4.sh @@ -27,7 +27,7 @@ then echo "Unsupported input consensus type ${1}" exit 1 fi - export ORDERER_CONSENSUS_TYPE=${1} + export ORDERER_CONSENSUS_TYPE="${1}" fi export ORDERER_CONSENSUS_WALDIR="${PWD}"/data/orderer4/consensus/wal export ORDERER_CONSENSUS_SNAPDIR="${PWD}"/data/orderer4/consensus/snap