Skip to content

Commit

Permalink
[Update] Update AATH backchannel to build image (#1221)
Browse files Browse the repository at this point in the history
* try in pipelines

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* unneeded var

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* revert to no role (von compatible)

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* improve endorser vs trustee logic

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* some docco

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* change docker image cache

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* switch up CI logic

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* change some vars

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* a bit cleaner

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* lint fix

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* fix some did_peer stuff

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* fmt

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* fmt

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* temporary to trigger a publish

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* undo

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* didpeer test fix

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* include reference in service (acapy expects)

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* enalbbe

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* try multibase

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* fix padding rules in a few spots

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

---------

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>
  • Loading branch information
gmulhearn-anonyome authored Jun 19, 2024
1 parent 9065d36 commit 912fc2d
Show file tree
Hide file tree
Showing 22 changed files with 584 additions and 5,066 deletions.
77 changes: 68 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:
DOCKER_IMAGE_POOL: ghcr.io/hyperledger/aries-vcx/indy_pool_localhost:1.15.0

DOCKER_REPO_LOCAL_VDRPROXY: vdrproxy
DOCKER_REPO_LOCAL_AATH: aath-backchannel

RUST_TOOLCHAIN_VERSION: 1.76.0
NODE_VERSION: 18.x
Expand Down Expand Up @@ -43,12 +44,14 @@ jobs:
RELEASE: ${{ steps.run-info.outputs.release }}
PRERELEASE: ${{ steps.run-info.outputs.pre-release }}
BRANCH_NAME: ${{ steps.run-info.outputs.branch-name }}
IS_MAIN_BRANCH: ${{ steps.run-info.outputs.branch-name == env.MAIN_BRANCH }}
IS_FORK: ${{ steps.run-info.outputs.is-fork }}

SKIP_NAPI_M1: ${{ steps.skip-info.outputs.skip-napi-m1 }}
SKIP_CI: ${{ steps.skip-info.outputs.skip-ci }}

DOCKER_IMG_CACHED_VDRPROXY: ${{ steps.docker-imgs.outputs.DOCKER_IMG_CACHED_VDRPROXY }}
DOCKER_IMG_CACHED_AATH: ${{ steps.docker-imgs.outputs.DOCKER_IMG_CACHED_AATH }}
steps:
- name: "Git checkout"
uses: actions/checkout@v1
Expand All @@ -67,19 +70,15 @@ jobs:
run: |
set -x
HASH_DOCKERFILE_LIBVCX=${{ hashFiles('.github/ci/libvcx.dockerfile') }}
HASH_DOCKERFILE_VDRPROXY=${{ hashFiles('.github/ci/vdrproxy.dockerfile') }}
HASH_SRC_LIBVDRTOOLS=${{ hashFiles('libvdrtools') }}
HASH_SRC_LIBVCX=${{ hashFiles('libvcx') }}
HASH_SRC_ARIESVCX=${{ hashFiles('aries_vcx') }}
HASH_SRC_ARIESVCX_CORE=${{ hashFiles('aries_vcx_core') }}
HASH_SRC_AGENCYCLIENT=${{ hashFiles('agency_client') }}
HASH_SRC_DIDDOC=${{ hashFiles('diddoc') }}
HASH_SRC_MESSAGES=${{ hashFiles('messages') }}
HASH_SRC_ARIES=${{ hashFiles('aries') }}
HASH_SRC_DID_CORE=${{ hashFiles('did_core') }}
HASH_SRC_MISC=${{ hashFiles('misc') }}
SEED_HASH_ARIESVCX=${HASH_SRC_LIBVDRTOOLS:0:11}-${HASH_SRC_ARIESVCX_CORE:0:11}-${HASH_SRC_ARIESVCX:0:11}-${HASH_SRC_AGENCYCLIENT:0:11}-${HASH_SRC_DIDDOC:0:11}-${HASH_SRC_MESSAGES:0:11}}
SEED_HASH_ARIESVCX=${HASH_SRC_ARIES:0:11}-${HASH_SRC_DID_CORE:0:11}-${HASH_SRC_MISC:0:11}
HASH_ARIESVCX=$(echo -n "$SEED_HASH_ARIESVCX" | sha256sum | awk '{print $1}')
echo "DOCKER_IMG_CACHED_VDRPROXY=$DOCKER_REPO_LOCAL_VDRPROXY:$HASH_DOCKERFILE_VDRPROXY" >> $GITHUB_OUTPUT
echo "DOCKER_IMG_CACHED_AATH=$DOCKER_REPO_LOCAL_AATH:$HASH_ARIESVCX" >> $GITHUB_OUTPUT
workflow-setup-check:
runs-on: ubuntu-20.04
Expand All @@ -91,10 +90,12 @@ jobs:
echo "RELEASE ${{ needs.workflow-setup.outputs.RELEASE }}"
echo "PRERELEASE ${{ needs.workflow-setup.outputs.PRERELEASE }}"
echo "BRANCH_NAME ${{ needs.workflow-setup.outputs.BRANCH_NAME }}"
echo "IS_MAIN_BRANCH ${{ needs.workflow-setup.outputs.IS_MAIN_BRANCH }}"
echo "IS_FORK ${{ needs.workflow-setup.outputs.IS_FORK }}"
echo "SKIP_NAPI_M1 ${{ needs.workflow-setup.outputs.SKIP_NAPI_M1 }}"
echo "SKIP_CI ${{ needs.workflow-setup.outputs.SKIP_CI }}"
echo "DOCKER_IMG_CACHED_VDRPROXY ${{ needs.workflow-setup.outputs.DOCKER_IMG_CACHED_VDRPROXY }}"
echo "DOCKER_IMG_CACHED_AATH ${{ needs.workflow-setup.outputs.DOCKER_IMG_CACHED_AATH }}"
workspace_clippy:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -173,6 +174,36 @@ jobs:
docker-repo-local-name: ${{ env.DOCKER_REPO_LOCAL_VDRPROXY }}
url-docker-registry: ${{ env.URL_DOCKER_REGISTRY }}

# builds and publishes main branch AATH backchannels
build-docker-aath-backchannel:
needs: [ workflow-setup ]
if: ${{ needs.workflow-setup.outputs.IS_MAIN_BRANCH == 'true' }}
runs-on: ubuntu-20.04
env:
DOCKER_IMG_CACHED: ${{ needs.workflow-setup.outputs.DOCKER_IMG_CACHED_AATH }}
BRANCH_NAME: ${{ needs.workflow-setup.outputs.BRANCH_NAME }}
outputs:
image-name: ${{ steps.meta.outputs.tags }}
steps:
- name: "Git checkout"
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build and cache image"
uses: ./.github/actions/build-image
with:
docker-img: ${{ env.DOCKER_IMG_CACHED }}
dockerfile-path: "aries/agents/aath-backchannel/Dockerfile.aries-vcx"
build-arg: "ALPINE_CORE_IMAGE=$DOCKER_IMG_CACHED_ALPINE_CORE"
branch-name: ${{ env.BRANCH_NAME }}
branch-main: ${{ env.MAIN_BRANCH }}
docker-repo-local-name: ${{ env.DOCKER_REPO_LOCAL_AATH }}
url-docker-registry: ${{ env.URL_DOCKER_REGISTRY }}

##########################################################################################
############################## DOCKER PUBLISH ########################################

Expand Down Expand Up @@ -203,6 +234,34 @@ jobs:
publish-version: ${{ env.PUBLISH_VERSION }}
url-docker-registry: ${{ env.URL_DOCKER_REGISTRY }}

# additional publish of the AATH backchannel image with tagged versions for tags
publish-docker-aath-backchannel:
runs-on: ubuntu-20.04
needs: [ workflow-setup, build-docker-aath-backchannel ]
if: ${{ needs.workflow-setup.outputs.RELEASE == 'true' || needs.workflow-setup.outputs.PRERELEASE == 'true' }}
env:
DOCKER_IMG_CACHED: ${{ needs.workflow-setup.outputs.DOCKER_IMG_CACHED_AATH }}
PUBLISH_VERSION: ${{ needs.workflow-setup.outputs.PUBLISH_VERSION }}
BRANCH_NAME: ${{ needs.workflow-setup.outputs.BRANCH_NAME }}
IS_FORK: ${{ needs.workflow-setup.outputs.IS_FORK }}
steps:
- name: "Git checkout"
if: ${{ env.IS_FORK == 'false' }}
uses: actions/checkout@v3
- name: "Docker Login"
uses: azure/docker-login@v1
with:
login-server: ${{ env.URL_DOCKER_REGISTRY }}
username: $GITHUB_ACTOR
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Publish versioned image"
if: ${{ env.IS_FORK == 'false' }}
uses: ./.github/actions/publish-image
with:
docker-img: ${{ env.DOCKER_IMG_CACHED }}
publish-version: ${{ env.PUBLISH_VERSION }}
url-docker-registry: ${{ env.URL_DOCKER_REGISTRY }}

##########################################################################################
############################### TESTING ###########################################

Expand Down
Loading

0 comments on commit 912fc2d

Please sign in to comment.