Skip to content

Update github/codeql-action requirement to 277b89701e930e6af7a758f50a… #558

Update github/codeql-action requirement to 277b89701e930e6af7a758f50a…

Update github/codeql-action requirement to 277b89701e930e6af7a758f50a… #558

Workflow file for this run

name: CI
on: [push]
env:
DOCKER_REGIRSTY_HOST: ghcr.io
DOCKER_REGISTRY: ghcr.io/lmco/chaordicledger
CUSTOM_BUILDER_IMAGE_NAME: customgradlebuilder
CUSTOM_BUILDER_IMAGE_VERSION: 0.0.1
GENERATED_CODE_DIR: generated
# Intentionally using the version 2 generator here; while the online editor will generate Upload options correctly for multipart/form-data,
# neither the downloadable generated nodejs server code nor the codegen-cli handle it properly, instead creating a JSON input.
# Version 2.4.27 however appears to work.
SWAGGER_CODEGEN_CLI_SOURCE_JAR: https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.27/swagger-codegen-cli-2.4.27.jar
#SWAGGER_CODEGEN_CLI_SOURCE_JAR: https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.34/swagger-codegen-cli-3.0.34.jar
SWAGGER_CODEGEN_CLI_LOCAL_JAR: swagger-codegen-cli.jar
SWAGGER_API_FILE: api/swagger.json
OUT_GO: out/go
OUT_JAVA: out/java
OUT_NODEJS: out/nodejs
jobs:
generate-api-code:
# Reference: https://github.com/swagger-api/swagger-codegen/blob/master/standalone-gen-dev/standalone-generator-development.md
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: API Generation Setup
run: |
wget ${{ env.SWAGGER_CODEGEN_CLI_SOURCE_JAR }} -O ${{ env.SWAGGER_CODEGEN_CLI_LOCAL_JAR }}
- name: API Generation - GO
run: |
mkdir -p ${{ env.OUT_GO }}
java -jar ${{ env.SWAGGER_CODEGEN_CLI_LOCAL_JAR }} generate -i ${{ env.SWAGGER_API_FILE }} -l go -o ${{ env.OUT_GO }}
- name: Archive generated GO code
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3
with:
name: go-api
path: ${{ env.OUT_GO }}
- name: API Generation - Java
run: |
mkdir -p ${OUT_JAVA}
java -jar ${{ env.SWAGGER_CODEGEN_CLI_LOCAL_JAR }} generate -i ${{ env.SWAGGER_API_FILE }} -l java -o ${{ env.OUT_JAVA }}
# As of 2022-Mar-31, jcenter no longer exists.
sed -i "s|jcenter|mavenCentral|g" ${{ env.OUT_JAVA }}/build.gradle
# In Gradle 7.x: The maven plugin has been removed; need to use the maven-publish plugin instead.
#sed -i "s|apply plugin: 'maven'|apply plugin: 'maven-publish'|g" ${{ env.OUT_JAVA }}/build.gradle
# # May need to override the generated manifest file to specify the internal classpath and specify the main class.
# ls -rotl ${OUT_JAVA}/build/tmp/jar
# cat ${OUT_JAVA}/build/tmp/jar/MANIFEST.MF
mainClassName=ArtifactsApiExample
ls -rotl
ls -rotl api/
cp api/${mainClassName}.java ${OUT_JAVA}/src/main/java/
# Update the pom file to include the manifest
cp ${OUT_JAVA}/pom.xml ${OUT_JAVA}/pom.xml.orig
cat ${OUT_JAVA}/pom.xml.orig | tr '\n' '|' | sed "s|\(<artifactId>maven-jar-plugin</artifactId>.*<executions>.*<configuration>\).*\(</configuration>[^<]*</plugin>\)|\1\|<archive><manifest><mainClass>${mainClassName}</mainClass></manifest></archive>\|\2|" | tr '|' '\n' > ${OUT_JAVA}/pom.xml
cat ${OUT_JAVA}/pom.xml
ls -rotl ${OUT_JAVA}
- name: Archive generated JAVA code
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3
with:
name: java-api
path: ${{ env.OUT_JAVA }}
- name: API Server Generation - NodeJS
run: |
mkdir -p ${{ env.OUT_NODEJS }}
java -jar ${{ env.SWAGGER_CODEGEN_CLI_LOCAL_JAR }} generate -i ${{ env.SWAGGER_API_FILE }} -l nodejs-server -o ${{ env.OUT_NODEJS }}
- name: API Server Implementation - NodeJS
uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2
with:
python-version: 3.8 #install the python needed
- name: Overlay NodeJS Server Implementation
run: |
# Need to overlay the functional implementation to the generated code.
# Probably easiest to do this with python...
ArtifactsServiceInputDir="./api/server/nodejs/functionScripts/ArtifactsService"
ls -rotl $ArtifactsServiceInputDir
ArtifactsServiceFunctionMapFile="$ArtifactsServiceInputDir/functionMap.json"
python ./api/server/nodejs/overlayServerImplementation.py -i $ArtifactsServiceInputDir -m $ArtifactsServiceFunctionMapFile -o ${{ env.OUT_NODEJS }}/service -f ArtifactsService.js
BlockchainServiceInputDir="./api/server/nodejs/functionScripts/BlockchainService"
ls -rotl $BlockchainServiceInputDir
BlockchainServiceFunctionMapFile="$BlockchainServiceInputDir/functionMap.json"
python ./api/server/nodejs/overlayServerImplementation.py -i $BlockchainServiceInputDir -m $BlockchainServiceFunctionMapFile -o ${{ env.OUT_NODEJS }}/service -f BlockchainService.js
MetadataServiceInputDir="./api/server/nodejs/functionScripts/MetadataService"
ls -rotl $MetadataServiceInputDir
MetadataServiceFunctionMapFile="$MetadataServiceInputDir/functionMap.json"
python ./api/server/nodejs/overlayServerImplementation.py -i $MetadataServiceInputDir -m $MetadataServiceFunctionMapFile -o ${{ env.OUT_NODEJS }}/service -f MetadataService.js
RelationshipsServiceInputDir="./api/server/nodejs/functionScripts/RelationshipsService"
ls -rotl $RelationshipsServiceInputDir
RelationshipsServiceFunctionMapFile="$RelationshipsServiceInputDir/functionMap.json"
python ./api/server/nodejs/overlayServerImplementation.py -i $RelationshipsServiceInputDir -m $RelationshipsServiceFunctionMapFile -o ${{ env.OUT_NODEJS }}/service -f RelationshipsService.js
SystemTestServiceInputDir="./api/server/nodejs/functionScripts/SystemTestService"
ls -rotl $SystemTestServiceInputDir
SystemTestServiceFunctionMapFile="$SystemTestServiceInputDir/functionMap.json"
python ./api/server/nodejs/overlayServerImplementation.py -i $SystemTestServiceInputDir -m $SystemTestServiceFunctionMapFile -o ${{ env.OUT_NODEJS }}/service -f SystemTestService.js
- name: Add API processing extension methods
run: |
cat ./api/server/nodejs/writerFunctions.js >> ${{ env.OUT_NODEJS }}/utils/writer.js
cat ./api/server/nodejs/customArtifactControllerFunctions.js >> ${{ env.OUT_NODEJS }}/controllers/Artifacts.js
#cat ./api/server/nodejs/customRelationshipControllerFunctions.js >> ${{ env.OUT_NODEJS }}/controllers/Relationships.js
cp ./tools/digraphReducer.py ${{ env.OUT_NODEJS }}/utils/
# - name: Generate NPM package details
# run: |
- name: Archive generated NodeJS code
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3
with:
name: nodejs-server
path: ${{ env.OUT_NODEJS }}
docker-API-Builder:
runs-on: ubuntu-latest
env:
# TAG: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
BUILD_DIR: api/builder
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Build image
run: |
imageTag=${{ env.DOCKER_REGISTRY }}/${{ env.CUSTOM_BUILDER_IMAGE_NAME }}:${{ env.CUSTOM_BUILDER_IMAGE_VERSION }}
docker build --tag $imageTag ${{ env.BUILD_DIR }} --no-cache
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 }}
build-java-api:
runs-on: ubuntu-latest
needs: [generate-api-code, docker-API-Builder]
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
- name: List java-api Directory Contents
run: ls -rotl java-api
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${{ env.DOCKER_REGIRSTY_HOST }} -u ${{ github.actor }} --password-stdin
- name: Build Java API
run: |
cd java-api
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 test --no-daemon
ls -rotl
echo "buildRoot=${PWD}" >> $GITHUB_ENV
- name: Publish Java client jar
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3
with:
name: java-client
path: ${{ env.buildRoot }}/build/libs/*.jar
- name: Package Java API
run: |
cd java-api
docker run --rm -u root --name my-maven-project -v "$PWD":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-8 mvn clean package
ls -rotl
ls -rotl build/tmp/jar
echo $PWD
ls -rotl ${PWD}/target
echo "targetRoot=${PWD}/target" >> $GITHUB_ENV
- name: Publish packaged Java client jar
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3
with:
name: java-client-package
path: |
${{ env.targetRoot }}/*.jar
${{ env.targetRoot }}/lib/*.jar
docker-API-UI:
runs-on: ubuntu-latest
env:
IMAGE_NAME: swagger-ui
IMAGE_VERSION: 0.0.1
BUILD_DIR: api/ui
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Copy API Definition
run: cp ${{ env.SWAGGER_API_FILE }} ${{ env.BUILD_DIR }}
- name: Build image
run: |
imageTag=${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
docker build --tag $imageTag ${{ env.BUILD_DIR }}
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 }}
docker-casestudy-storefront:
runs-on: ubuntu-latest
env:
IMAGE_NAME: storefront
IMAGE_VERSION: 0.0.1
BUILD_DIR: case_study/storefrontApp/app
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Build image
run: |
imageTag=${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
docker build --tag $imageTag ${{ env.BUILD_DIR }}
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 }}
docker-graphjob:
runs-on: ubuntu-latest
env:
IMAGE_NAME: graphjob
IMAGE_VERSION: 0.0.1
BUILD_DIR: graph
DOCKERFILE: JobDockerfile
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Build image
run: |
imageTag=${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
docker build --tag $imageTag ${{ env.BUILD_DIR }} -f ${{ env.BUILD_DIR }}/${{ env.DOCKERFILE }}
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 }}
docker-graphprocessor:
runs-on: ubuntu-latest
env:
IMAGE_NAME: graphprocessor
IMAGE_VERSION: 0.0.1
BUILD_DIR: graph
DOCKERFILE: ProcessorDockerfile
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Build image
run: |
imageTag=${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
docker build --tag $imageTag ${{ env.BUILD_DIR }} -f ${{ env.BUILD_DIR }}/${{ env.DOCKERFILE }}
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 }}
# docker-metadata-chaincode:
# uses: lmco/ChaordicLedger/.github/workflows/build-and-push-docker.yml@api_hookup
# secrets:
# registry: ${{ env.DOCKER_REGISTRY }}
# registry_host: ${{ env.DOCKER_REGIRSTY_HOST }}
# image_name: ${{ env.IMAGE_NAME }}
# image_version: ${{ env.IMAGE_VERSION }}
# secrets:
# user: ${{ github.actor }}
# token: ${{ secrets.GITHUB_TOKEN }}
docker-content-chaincode:
runs-on: ubuntu-latest
env:
IMAGE_NAME: content-chaincode
IMAGE_VERSION: v0.0.0
BUILD_DIR: chaincode/artifact-content/docker/
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Build image
run: |
imageTag=${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
docker build --tag $imageTag ${{ env.BUILD_DIR }}
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 }}
docker-relationship-chaincode:
runs-on: ubuntu-latest
env:
IMAGE_NAME: relationship-chaincode
IMAGE_VERSION: v0.0.0
BUILD_DIR: chaincode/artifact-relationship/docker/
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Build image
run: |
imageTag=${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
docker build --tag $imageTag ${{ env.BUILD_DIR }}
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 }}
docker-metadata-chaincode:
runs-on: ubuntu-latest
env:
IMAGE_NAME: metadata-chaincode
IMAGE_VERSION: v0.0.0
BUILD_DIR: chaincode/artifact-metadata/docker/
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Build image
run: |
imageTag=${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
docker build --tag $imageTag ${{ env.BUILD_DIR }}
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 }}
build-obsidian-lightswitch-chaincode:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Checkout the Obsidian repo
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # 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@ee0669bd1cc54295c223e0bb666b733df41de1c5 # 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: |
# ghcr.io/chaordicledger/swagger-ui:latest
# ghcr.io/chaordicledger/swagger-ui:0.0.1
# References: https://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html
# https://github.com/hyperledger/fabric-samples/tree/main/test-network-k8s
# prerequisites:
# runs-on: ubuntu-latest
# env:
# AGNOSTIC_SETUP_DIR: setup/agnostic
# AGNOSTIC_CLEANUP_DIR: cleanup/agnostic
# UBUNTU_SETUP_DIR: setup/ubuntu
# RHEL_SETUP_DIR: setup/rhel
# steps:
# - uses: actions/checkout@v2
# - name: Setup local
# run: |
# source ${AGNOSTIC_SETUP_DIR}/local_source
# ${AGNOSTIC_SETUP_DIR}/local_setup.sh
# - name: Get kubectl
# run: ${AGNOSTIC_SETUP_DIR}/get_kubectl.sh
# - name: Get kind
# run: ${AGNOSTIC_SETUP_DIR}/get_kind.sh
# - name: Get jq
# run: ${AGNOSTIC_SETUP_DIR}/get_jq.sh
# - name: Update package manager
# run: ${UBUNTU_SETUP_DIR}/update_package_manager.sh
# - name: Get prerequisite tools
# run: ${UBUNTU_SETUP_DIR}/get_prerequisite_tools.sh
# - name: Get Docker
# run: ${UBUNTU_SETUP_DIR}/get_docker.sh
# - name: Setup Docker
# run: ${AGNOSTIC_SETUP_DIR}/setup_docker.sh
# - name: Setup Test Network for Hyperledger
# run: ${AGNOSTIC_SETUP_DIR}/setup_hyperledger.sh
# - name: Cleanup
# run: ${AGNOSTIC_CLEANUP_DIR}/cleanup_hyperledger.sh
# test:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/checkout@v2
# - name: Install shellspec
# run: curl -fsSL https://git.io/shellspec | sh -s 0.28.1 --yes
# - name: Execute shellspec
# run: shellspec
# PrerequisiteRootCA:
# runs-on: ubuntu-latest
# needs: test
# steps:
# - uses: actions/checkout@v2
# - name: Create Root Certificate Authority (CA)
# env:
# ROOT_PASSPHRASE: ${{ secrets.ROOT_PASSPHRASE }}
# run: |
# ROOT_RESULTS_FILE_NAME="rootCAResults.json"
# COUNTRY_CODE="AU"
# STATE="WA"
# LOCATION="Northbridge"
# ORGANIZATION="Hotels"
# ORGANIZATIONAL_UNIT="Fancy"
# ROOT_COMMON_NAME="Yet another root cert authority"
# OUTPUT_DIR="."
# ./certificates/generateRootCA/bin/generateRootCA.sh -f "$ROOT_RESULTS_FILE_NAME" -p "$ROOT_PASSPHRASE" -o "$OUTPUT_DIR" -c "$COUNTRY_CODE" -s "$STATE" -l "$LOCATION" -r "$ORGANIZATION" -u "$ORGANIZATIONAL_UNIT" -n "$ROOT_COMMON_NAME"
# openssl x509 -text -noout -in rootCACert.pem
# docker:
# #needs: PrerequisiteRootCA
# runs-on: ubuntu-latest
# services:
# registry:
# image: registry:2
# ports:
# - 5000:5000
# steps:
# -
# name: Checkout
# uses: actions/checkout@v2
# -
# name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# -
# name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# with:
# driver-opts: network=host
# -
# name: Build and push to local registry
# uses: docker/build-push-action@v2
# with:
# context: .
# push: true
# tags: localhost:5000/name/chaordic-ledger:latest
# #tags: localhost:5000/name/chaordic-ledger:$(date +%s)
# -
# name: Inspect
# run: |
# docker buildx imagetools inspect localhost:5000/name/chaordic-ledger:latest