From 77cfefd4c5b2b1975dfd6783f2dbabab6cbad5a4 Mon Sep 17 00:00:00 2001 From: "Dr. Michael F. Marchini" Date: Wed, 8 Jan 2025 17:43:31 +0000 Subject: [PATCH] fix: Disabled obsidian jobs. --- .github/workflows/ci.yml | 216 +++++++++++++++++++-------------------- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0618cb..a95780c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -390,114 +390,114 @@ jobs: run: | docker push ${{ env.imageTag }} - build-obsidian-lightswitch-chaincode: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2 - - name: Checkout the Obsidian repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2 - with: - repository: mcoblenz/Obsidian - path: './Obsidian' - - name: Modify Obsidian build contents - run: | - pushd ./Obsidian - - # Upgrade protocol buffer - sed -i 's|"protobuf-java" % "3\.11\.4"|"protobuf-java" % "3\.19\.1"|g' build.sbt - sed -i "s|'protobuf-java', version: '3.11.4'|'protobuf-java', version: '3.19.1'|g" fabric/java/build.gradle - - # Upgrade chaincode shim - sed -i 's|"fabric-chaincode-shim" % "1\.4\.4"|"fabric-chaincode-shim" % "2\.2\.3"|g' build.sbt - sed -i "s|'fabric-chaincode-shim', version: '1.4.4'|'fabric-chaincode-shim', version: '2.2.3'|g" fabric/java/build.gradle - - # Skips running the tests. - mv ./src/test ./src/test_save - - sbt assembly - popd - - name: Execute Obsidian compiler - run: | - # Install prerequisite - protobuf - wget https://github.com/protocolbuffers/protobuf/releases/download/v21.1/protoc-21.1-linux-x86_64.zip -P /tmp - unzip -d /tmp/protoc /tmp/protoc-21.1-linux-x86_64.zip - export PATH=/tmp/protoc/bin:${PATH} - protoc --version - pwd - ./Obsidian/bin/obsidianc obsidian/contracts/simple/lightswitch.obs --output-path out/ - ls -rotl out/LightSwitch - - - name: Execute Gradle - run: | - pushd out/LightSwitch - - docker run --rm -u root -v "$PWD":/home/gradle/project -w /home/gradle/project ${{ env.DOCKER_REGISTRY }}/${{ env.CUSTOM_BUILDER_IMAGE_NAME }}:${{ env.CUSTOM_BUILDER_IMAGE_VERSION }} gradle build shadowJar #-x checkstyleMain -x checkstyleTest - ls -rotl build/libs - echo "buildRoot=${PWD}" >> $GITHUB_ENV - popd - - name: Publish chaincode jar - uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3 - with: - name: lightswitch-chaincode - path: | - out/LightSwitch - - docker-lightswitch-chaincode: - runs-on: ubuntu-latest - needs: [build-obsidian-lightswitch-chaincode] - env: - IMAGE_NAME: obsidian-lightswitch - IMAGE_VERSION: v0.0.0 - BUILD_DIR: chaincode/lightswitch/docker/ - permissions: - packages: write - contents: read - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2 - - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 - - name: Prepare - run: | - pushd lightswitch-chaincode/build/libs - ls -rotl ../../../${{ env.BUILD_DIR }} - cp ../../../${{ env.BUILD_DIR }}/chaincode.env . - cp ../../../${{ env.BUILD_DIR }}/connection.json . - cp ../../../${{ env.BUILD_DIR }}/Dockerfile . - cp ../../../${{ env.BUILD_DIR }}/metadata.json . - cp ../../../${{ env.BUILD_DIR }}/logging.properties . - cp ../../../${{ env.BUILD_DIR }}/docker-entrypoint.sh . - - name: Build image - run: | - pushd lightswitch-chaincode/build/libs - ls -rotl - imageTag=${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }} - docker build --tag $imageTag . - echo "imageTag=${imageTag}" >> $GITHUB_ENV - - - name: Log in to registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${{ env.DOCKER_REGIRSTY_HOST }} -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - docker push ${{ env.imageTag }} - - # steps: - # - - # name: Set up QEMU - # uses: docker/setup-qemu-action@v1 - # - - # name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v1 - # - - # name: Login to DockerHub - # uses: docker/login-action@v1 - # with: - # registry: ghcr.io - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} - # - - # name: Build and push - # uses: docker/build-push-action@v2 - # with: +# build-obsidian-lightswitch-chaincode: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2 +# - name: Checkout the Obsidian repo +# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2 +# with: +# repository: mcoblenz/Obsidian +# path: './Obsidian' +# - name: Modify Obsidian build contents +# run: | +# pushd ./Obsidian +# +# # Upgrade protocol buffer +# sed -i 's|"protobuf-java" % "3\.11\.4"|"protobuf-java" % "3\.19\.1"|g' build.sbt +# sed -i "s|'protobuf-java', version: '3.11.4'|'protobuf-java', version: '3.19.1'|g" fabric/java/build.gradle +# +# # Upgrade chaincode shim +# sed -i 's|"fabric-chaincode-shim" % "1\.4\.4"|"fabric-chaincode-shim" % "2\.2\.3"|g' build.sbt +# sed -i "s|'fabric-chaincode-shim', version: '1.4.4'|'fabric-chaincode-shim', version: '2.2.3'|g" fabric/java/build.gradle +# +# # Skips running the tests. +# mv ./src/test ./src/test_save +# +# sbt assembly +# popd +# - name: Execute Obsidian compiler +# run: | +# # Install prerequisite - protobuf +# wget https://github.com/protocolbuffers/protobuf/releases/download/v21.1/protoc-21.1-linux-x86_64.zip -P /tmp +# unzip -d /tmp/protoc /tmp/protoc-21.1-linux-x86_64.zip +# export PATH=/tmp/protoc/bin:${PATH} +# protoc --version +# pwd +# ./Obsidian/bin/obsidianc obsidian/contracts/simple/lightswitch.obs --output-path out/ +# ls -rotl out/LightSwitch +# +# - name: Execute Gradle +# run: | +# pushd out/LightSwitch +# +# docker run --rm -u root -v "$PWD":/home/gradle/project -w /home/gradle/project ${{ env.DOCKER_REGISTRY }}/${{ env.CUSTOM_BUILDER_IMAGE_NAME }}:${{ env.CUSTOM_BUILDER_IMAGE_VERSION }} gradle build shadowJar #-x checkstyleMain -x checkstyleTest +# ls -rotl build/libs +# echo "buildRoot=${PWD}" >> $GITHUB_ENV +# popd +# - name: Publish chaincode jar +# uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3 +# with: +# name: lightswitch-chaincode +# path: | +# out/LightSwitch +# +# docker-lightswitch-chaincode: +# runs-on: ubuntu-latest +# needs: [build-obsidian-lightswitch-chaincode] +# env: +# IMAGE_NAME: obsidian-lightswitch +# IMAGE_VERSION: v0.0.0 +# BUILD_DIR: chaincode/lightswitch/docker/ +# permissions: +# packages: write +# contents: read +# steps: +# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2 +# - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 +# - name: Prepare +# run: | +# pushd lightswitch-chaincode/build/libs +# ls -rotl ../../../${{ env.BUILD_DIR }} +# cp ../../../${{ env.BUILD_DIR }}/chaincode.env . +# cp ../../../${{ env.BUILD_DIR }}/connection.json . +# cp ../../../${{ env.BUILD_DIR }}/Dockerfile . +# cp ../../../${{ env.BUILD_DIR }}/metadata.json . +# cp ../../../${{ env.BUILD_DIR }}/logging.properties . +# cp ../../../${{ env.BUILD_DIR }}/docker-entrypoint.sh . +# - name: Build image +# run: | +# pushd lightswitch-chaincode/build/libs +# ls -rotl +# imageTag=${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }} +# docker build --tag $imageTag . +# echo "imageTag=${imageTag}" >> $GITHUB_ENV +# +# - name: Log in to registry +# run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${{ env.DOCKER_REGIRSTY_HOST }} -u ${{ github.actor }} --password-stdin +# +# - name: Push image +# run: | +# docker push ${{ env.imageTag }} +# +# # steps: +# # - +# # name: Set up QEMU +# # uses: docker/setup-qemu-action@v1 +# # - +# # name: Set up Docker Buildx +# # uses: docker/setup-buildx-action@v1 +# # - +# # name: Login to DockerHub +# # uses: docker/login-action@v1 +# # with: +# # registry: ghcr.io +# # username: ${{ github.actor }} +# # password: ${{ secrets.GITHUB_TOKEN }} +# # - +# # name: Build and push +# # uses: docker/build-push-action@v2 +# # with: # context: "{{defaultContext}}:api" # push: true # tags: |