Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: migrate to hyperledger-identus org and Docker Hub #1520

Merged
merged 20 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @hyperledger/identus-maintainers
* @hyperledger-identus/identus-maintainers
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
To submit a new issue, please, use one of the following templates:

https://github.com/hyperledger/identus-cloud-agent/issues/new/choose
<https://github.com/hyperledger-identus/cloud-agent/issues/new/choose>

Thank you!
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
### Description:
### Description
Summarize the changes you're submitting in a few sentences, including Jira ticket ATL-xxxx if applicable.
Link to any discussion, related issues and bug reports to give the context to help the reviewer understand the PR.

### Alternatives Considered (optional):
### Alternatives Considered (optional)
Link to existing ADR (Architecture Decision Record), if any. If relevant, describe other approaches explored and the selected approach. Documenting why the methods were not selected will create a knowledge base for future reference, helping prevent others from revisiting less optimal ideas.

### Checklist:
- [ ] My PR follows the [contribution guidelines](https://github.com/hyperledger/identus-cloud-agent/blob/main/CONTRIBUTING.md) of this project
### Checklist
- [ ] My PR follows the [contribution guidelines](https://github.com/hyperledger-identus/cloud-agent/blob/main/CONTRIBUTING.md) of this project
- [ ] My PR is free of third-party dependencies that don't comply with the [Allowlist](https://toc.hyperledger.org/governing-documents/allowed-third-party-license-policy.html#approved-licenses-for-allowlist)
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
Expand Down
27 changes: 0 additions & 27 deletions .github/docker/Dockerfile

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/build-test-docker.yml

This file was deleted.

56 changes: 29 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@ concurrency:

on:
workflow_dispatch:
push:
branches:
- "main"
- "beta"
paths:
- "cloud-agent/**"
- "castor/**"
- "connect/**"
- "mercury/**"
- "pollux/**"
- "shared/**"
- "shared-test/**"
- "*.sbt"
- "project/**"
- "prism-node/**"

permissions:
contents: write
Expand Down Expand Up @@ -68,11 +53,10 @@ jobs:
node-version: "lts/*"

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ env.GITHUB_ACTOR }}
password: ${{ env.GITHUB_TOKEN }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -97,18 +81,36 @@ jobs:
echo "REVISION_VERSION=${REVISION_VERSION}" >> $GITHUB_ENV
echo "BUILD_VERSION=${BUILD_VERSION}" >> $GITHUB_ENV

- name: Build and push Docker image
- name: Build Docker Image
run: |
sbt "set version := \"${{ env.BUILD_VERSION }}\"" "docker:stage"
docker buildx build --platform=linux/arm64,linux/amd64 --push -t ghcr.io/hyperledger/identus-cloud-agent:${{ env.BUILD_VERSION}} ./cloud-agent/service/server/target/docker/stage
docker buildx build --platform=linux/arm64,linux/amd64 --push -t ${{ vars.DOCKERHUB_ORG }}/identus-cloud-agent:${{ env.BUILD_VERSION }} ./cloud-agent/service/server/target/docker/stage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you missing the docker.io

Suggested change
docker buildx build --platform=linux/arm64,linux/amd64 --push -t ${{ vars.DOCKERHUB_ORG }}/identus-cloud-agent:${{ env.BUILD_VERSION }} ./cloud-agent/service/server/target/docker/stage
docker buildx build --platform=linux/arm64,linux/amd64 --push -t docker.io/${{ vars.DOCKERHUB_ORG }}/identus-cloud-agent:${{ env.BUILD_VERSION }} ./cloud-agent/service/server/target/docker/stage

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FabioPinheiro, afaik, docker.io is a default registry for the docker command
I tested this in the build.yml workflow here


- name: Trigger helm chart update
uses: peter-evans/repository-dispatch@v3
- name: Docker Metadata Action
id: meta
uses: docker/metadata-action@v5
with:
token: ${{ secrets.ATALA_GITHUB_TOKEN }}
repository: input-output-hk/atala-prism-helm-charts
event-type: build-chart-package
client-payload: '{"version": "${{ env.BUILD_VERSION }}", "chart": "cloud-agent"}'
images: ${{ vars.DOCKERHUB_ORG }}/identus-cloud-agent
tags: |
type=semver,pattern={{version}}
labels: |
org.opencontainers.image.title=identus-cloud-agent
org.opencontainers.image.description=Hyperledger Identus Cloud Agent
org.opencontainers.image.url=https://github.com/hyperledger-identus/identus-cloud-agent
org.opencontainers.license=Apache-2.0
latest=${{ github.ref == 'refs/heads/main' && 'true' || 'false' }}
snapshot=${{ github.ref != 'refs/heads/main' && 'true' || 'false' }}

- name: Push Docker Image
id: push
uses: docker/build-push-action@v6
with:
context: ./cloud-agent/service/server/target/docker/stage
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
push: ${{ steps.meta.outputs.tags != '' }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}

- name: Build Cloud-Agent Open API Specification
id: build-oas
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/oasdiff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ permissions:
pull-requests: write
actions: write

# https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/prism-agent-v1.29.0/prism-agent/service/api/http/prism-agent-openapi-spec.yaml
# https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/main/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml
# https://raw.githubusercontent.com/hyperledger-identus/cloud-agent/prism-agent-v1.29.0/prism-agent/service/api/http/prism-agent-openapi-spec.yaml
# https://raw.githubusercontent.com/hyperledger-identus/cloud-agent/main/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml

jobs:
oasdiff-breaking:
Expand All @@ -40,13 +40,13 @@ jobs:
run: |
echo Base tag: "$BASE_TAG"
if [[ "$BASE_TAG" =~ cloud-agent-v* ]]; then
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/${BASE_TAG}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger-identus/cloud-agent/${BASE_TAG}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
elif [[ "$BASE_TAG" =~ prism-agent-v* ]]; then
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/${BASE_TAG}/prism-agent/service/api/http/prism-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger-identus/cloud-agent/${BASE_TAG}/prism-agent/service/api/http/prism-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
elif [[ "$BASE_TAG" == 'main' ]]; then
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/${BASE_TAG}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger-identus/cloud-agent/${BASE_TAG}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
elif [[ "$GITHUB_EVENT_NAME" == 'pull_request' ]]; then
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/main/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger-identus/cloud-agent/main/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
fi

- name: Resolve the revision OpenAPI spec URL
Expand All @@ -57,13 +57,13 @@ jobs:
run: |
echo Revision tag: "$REV_TAG"
if [[ "$REV_TAG" =~ cloud-agent-v* ]]; then
echo "REV_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/${REV_TAG}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
echo "REV_URL=https://raw.githubusercontent.com/hyperledger-identus/cloud-agent/${REV_TAG}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
elif [[ "$REV_TAG" =~ prism-agent-v* ]]; then
echo "REV_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/${REV_TAG}/prism-agent/service/api/http/prism-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
echo "REV_URL=https://raw.githubusercontent.com/hyperledger-identus/cloud-agent/${REV_TAG}/prism-agent/service/api/http/prism-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
elif [[ "$REV_TAG" == 'main' ]]; then
echo "REV_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/${REV_TAG}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
echo "REV_URL=https://raw.githubusercontent.com/hyperledger-identus/cloud-agent/${REV_TAG}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
elif [[ "$GITHUB_EVENT_NAME" == 'pull_request' ]]; then
echo "REV_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/${BRANCH_NAME}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
echo "REV_URL=https://raw.githubusercontent.com/hyperledger-identus/cloud-agent/${BRANCH_NAME}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> "$GITHUB_ENV"
fi

- name: Check URLS
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/release-clients.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ jobs:
registry-url: https://npm.pkg.github.com/
scope: "@hyperledger"

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Setup Gradle
uses: gradle/[email protected]

Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@ jobs:
git_tag_gpgsign: false

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ env.GITHUB_ACTOR }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -68,18 +67,11 @@ jobs:
GIT_AUTHOR_NAME: ${{ steps.import_gpg.outputs.name }}
GIT_COMMITTER_NAME: ${{ steps.import_gpg.outputs.name }}
GITHUB_TOKEN: ${{ secrets.IDENTUS_CI }}
DOCKERHUB_ORG: ${{ vars.DOCKERHUB_ORG }}
run: |
npm install
npx semantic-release

- name: Get release version
id: get_version
run: echo "RELEASE_VERSION=$(cat .release-version)" >> $GITHUB_ENV

- name: Trigger helm chart update
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ATALA_GITHUB_TOKEN }}
repository: input-output-hk/atala-prism-helm-charts
event-type: build-chart-package
client-payload: '{"version": "${{ env.RELEASE_VERSION }}", "chart": "cloud-agent"}'
Loading
Loading