From 3a63269da7247b4df8abd2335f03f883c1d4c50a Mon Sep 17 00:00:00 2001 From: VRamakrishna Date: Thu, 25 Jul 2024 12:38:06 +0000 Subject: [PATCH] Fixed build errors, added protos-rs publish action, updated tutorial instructions Fabric Interop CC Docker image building errors were fixed. Interop CorDapp and sample CorDapp dependencies were updated. Updated Golang dependency for building and testing from v16 to v20. Signed-off-by: VRamakrishna --- .github/workflows/deploy_relay-server.yml | 25 ++++++++++++++++++- core/network/corda-interop-app/build.gradle | 2 +- core/network/fabric-interop-cc/Dockerfile | 2 +- core/network/fabric-interop-cc/makefile | 3 ++- .../test-network/setup-local-docker.md | 2 +- .../test-network/setup-local.md | 2 +- .../test-network/setup-packages-docker.md | 2 +- .../test-network/setup-packages.md | 2 +- .../corda-simple-application/build.gradle | 2 +- 9 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy_relay-server.yml b/.github/workflows/deploy_relay-server.yml index e54750565..b9b69f63b 100644 --- a/.github/workflows/deploy_relay-server.yml +++ b/.github/workflows/deploy_relay-server.yml @@ -15,9 +15,32 @@ on: workflow_dispatch: jobs: + publish-protos-rs: + if: github.repository_owner == 'hyperledger-labs' + runs-on: ubuntu-latest + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4.1.1 + + - name: Install RUST Toolchain minimal stable with clippy and rustfmt + uses: actions-rs/toolchain@v1.0.6 + with: + profile: minimal + toolchain: stable + components: rustfmt, clippy + + - name: Publish + run: cargo publish --token ${CRATES_TOKEN} + env: + CRATES_TOKEN: ${{ secrets.CARGO_CRATES_IO_TOKEN }} + working-directory: common/protos-rs/pkg + relay-image: if: github.repository_owner == 'hyperledger-labs' + needs: publish-protos-rs runs-on: ubuntu-latest + steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4.1.1 @@ -41,4 +64,4 @@ jobs: - name: Push latest tag if: ${{ env.RELAY_PUSH == 'true' }} run: (cat out | grep "exists") || make push-server-latest - working-directory: core/relay \ No newline at end of file + working-directory: core/relay diff --git a/core/network/corda-interop-app/build.gradle b/core/network/corda-interop-app/build.gradle index e5db853e2..c2eb6e0e0 100644 --- a/core/network/corda-interop-app/build.gradle +++ b/core/network/corda-interop-app/build.gradle @@ -48,7 +48,7 @@ buildscript { plugins { id 'java' id 'org.jetbrains.dokka' version '0.10.1' - id "com.jfrog.artifactory" version "4.16.1" + id "com.jfrog.artifactory" version "5.2.3" id "maven-publish" } diff --git a/core/network/fabric-interop-cc/Dockerfile b/core/network/fabric-interop-cc/Dockerfile index ce10e7aec..755b3bab8 100644 --- a/core/network/fabric-interop-cc/Dockerfile +++ b/core/network/fabric-interop-cc/Dockerfile @@ -9,7 +9,7 @@ RUN cd /fabric-interop-cc/contracts/interop && CC=musl-gcc go build -o interop # Production ready image # Pass the binary to the prod image -FROM alpine:3.11 as prod +FROM alpine:3.11 AS prod RUN apk add libc6-compat libstdc++ zlib>1.2.11-r4 zlib-dev>1.2.11-r4 COPY --from=build /fabric-interop-cc/contracts/interop/interop /app/interop diff --git a/core/network/fabric-interop-cc/makefile b/core/network/fabric-interop-cc/makefile index f448cb080..aaf2595a6 100644 --- a/core/network/fabric-interop-cc/makefile +++ b/core/network/fabric-interop-cc/makefile @@ -15,8 +15,9 @@ list-names: echo ${DOCKER_IMAGE_NAME}:$(DOCKER_TAG) image: - (cd contracts/interop && make run-vendor) + (cd contracts/interop && make run-vendor && go mod tidy) docker build --build-arg GIT_URL=$(GIT_URL) -t ${DOCKER_IMAGE_NAME}:$(DOCKER_TAG) . + (cd contracts/interop && make undo-vendor) check-if-tag-exists: !(DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_NAME):$(DOCKER_TAG) > /dev/null) diff --git a/docs/docs/external/getting-started/test-network/setup-local-docker.md b/docs/docs/external/getting-started/test-network/setup-local-docker.md index b7dd8b3e8..b5f83246b 100644 --- a/docs/docs/external/getting-started/test-network/setup-local-docker.md +++ b/docs/docs/external/getting-started/test-network/setup-local-docker.md @@ -27,7 +27,7 @@ Before starting, make sure you have the following software installed on your hos - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) - Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) -- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher) +- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported) - Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/) diff --git a/docs/docs/external/getting-started/test-network/setup-local.md b/docs/docs/external/getting-started/test-network/setup-local.md index 146d25ef0..d294cbdf3 100644 --- a/docs/docs/external/getting-started/test-network/setup-local.md +++ b/docs/docs/external/getting-started/test-network/setup-local.md @@ -28,7 +28,7 @@ Before starting, make sure you have the following software installed on your hos - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) - Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) -- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher) +- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported) - Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/) diff --git a/docs/docs/external/getting-started/test-network/setup-packages-docker.md b/docs/docs/external/getting-started/test-network/setup-packages-docker.md index 5d8f67648..4b9a39e94 100644 --- a/docs/docs/external/getting-started/test-network/setup-packages-docker.md +++ b/docs/docs/external/getting-started/test-network/setup-packages-docker.md @@ -27,7 +27,7 @@ Before starting, make sure you have the following software installed on your hos - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) - Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) -- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher) +- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 11 to Version 16 Supported) - Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/) diff --git a/docs/docs/external/getting-started/test-network/setup-packages.md b/docs/docs/external/getting-started/test-network/setup-packages.md index b405de1b3..5effa4645 100644 --- a/docs/docs/external/getting-started/test-network/setup-packages.md +++ b/docs/docs/external/getting-started/test-network/setup-packages.md @@ -27,7 +27,7 @@ Before starting, make sure you have the following software installed on your hos - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) - Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) -- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher) +- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported) - Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/) diff --git a/samples/corda/corda-simple-application/build.gradle b/samples/corda/corda-simple-application/build.gradle index ea6255f84..61a7b798b 100644 --- a/samples/corda/corda-simple-application/build.gradle +++ b/samples/corda/corda-simple-application/build.gradle @@ -33,7 +33,7 @@ buildscript { } plugins { - id "com.jfrog.artifactory" version "4.16.1" + id "com.jfrog.artifactory" version "5.2.3" id "maven-publish" id 'org.jetbrains.dokka' version '0.10.1' }