Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/multi-4406d42103
Browse files Browse the repository at this point in the history
  • Loading branch information
yshyn-iohk committed Apr 29, 2024
2 parents 270253c + 88806d9 commit 9cdce74
Show file tree
Hide file tree
Showing 35 changed files with 124 additions and 110 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.ATALA_GITHUB_ACTOR }}
password: ${{ secrets.ATALA_GITHUB_TOKEN }}
username: hyperledger-bot
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install Compose
uses: ndeloof/install-compose-action@v0.0.1
Expand All @@ -54,8 +54,8 @@ jobs:
env:
CLOUD_AGENT_PATH: "../.."
ENV_FILE: "infrastructure/local/.env"
GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
GITHUB_ACTOR: hyperledger-bot
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd "${CLOUD_AGENT_PATH}" || exit 129
sbt docker:publishLocal
Expand All @@ -71,16 +71,25 @@ jobs:
env:
PRISM_NODE_VERSION: ${{ steps.build_local_cloud_agent.outputs.prism_node_version }}
OPEN_ENTERPRISE_AGENT_VERSION: ${{ steps.build_local_cloud_agent.outputs.open_enterprise_agent_version }}
ATALA_GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }}
ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
continue-on-error: true
GITHUB_ACTOR: hyperledger-bot
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# continue-on-error: true
run: |
./gradlew test --tests "IntegrationTestsRunner"
- name: Make report of integration tests
if: always()
env:
PRISM_NODE_VERSION: ${{ steps.build_local_cloud_agent.outputs.prism_node_version }}
OPEN_ENTERPRISE_AGENT_VERSION: ${{ steps.build_local_cloud_agent.outputs.open_enterprise_agent_version }}
GITHUB_ACTOR: hyperledger-bot
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew test --tests "IntegrationTestsRunner" || true
./gradlew reports
- name: Extract test results
id: analyze_test_results
if: github.ref_name == 'main'
if: github.ref_name == 'main' && always()
run: |
JSON_RESULTS="target/site/serenity/serenity-summary.json"
CONCLUSION=failure
Expand Down Expand Up @@ -118,14 +127,14 @@ jobs:
check_name: "Integration Test Results"

- name: Upload artifacts
if: github.ref_name == 'main' || steps.analyze_test_results.outputs.conclusion == 'failure'
if: github.ref_name == 'main' || failure()
uses: actions/upload-artifact@v4
with:
name: integration-tests-result
path: ${{ env.REPORTS_DIR }}

- name: Slack Notification
if: github.ref_name == 'main' && steps.analyze_test_results.outputs.conclusion == 'failure'
if: github.ref_name == 'main' && failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ steps.analyze_test_results.outputs.conclusion }}
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/release-clients.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: Publish prism-agent clients
name: Publish Identus-cloud-agent clients

on:
workflow_dispatch:
inputs:
releaseTag:
description: "Tag to release clients (e.g. prism-agent-v1.31.0)"
description: "Tag to release clients (e.g. identus-cloud-agent-v1.33.0)"
required: true
type: string
push:
tags:
- "prism-agent-v*"
- "identus-cloud-agent-v*"

jobs:
publish-clients:
name: 'Build and publish Prism-Agent clients'
name: 'Build and publish Identus-cloud-Agent clients'
runs-on: ubuntu-latest
env:
VERSION_TAG: ${{inputs.releaseTag || github.ref_name}}
ATALA_GITHUB_ACTOR: ${{secrets.ATALA_GITHUB_ACTOR}}
ATALA_GITHUB_TOKEN: ${{secrets.ATALA_GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
GITHUB_ACTOR: "hyperledger-bot"
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

steps:
- name: Checkout
Expand All @@ -30,7 +30,7 @@ jobs:
with:
node-version: "lts/*"
registry-url: https://npm.pkg.github.com/
scope: "@hyperledger-labs"
scope: "@hyperledger"

- name: Setup Python
uses: actions/setup-python@v4
Expand All @@ -44,20 +44,20 @@ jobs:
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.ATALA_GITHUB_ACTOR }}
password: ${{ secrets.ATALA_GITHUB_TOKEN }}
username: ${{ env.GITHUB_ACTOR }}
password: ${{ env.GITHUB_TOKEN }}

- name: Setup yq - portable yaml processor
uses: mikefarah/yq@v4.34.2

- name: Install generator dependencies
working-directory: prism-agent/client/generator
working-directory: cloud-agent/client/generator
run: yarn install

- name: Generate clients
working-directory: prism-agent/client/generator
working-directory: cloud-agent/client/generator
run: yarn generate:all

- name: Publish clients
working-directory: prism-agent/client/generator
working-directory: cloud-agent/client/generator
run: yarn publish:clients
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ target/
**.env.*
workspace.json
docs/architecture/structurizr/.structurizr/
cloud-agent/client/typescript
cloud-agent/client/kotlin/src/main/kotlin/
!cloud-agent/client/kotlin/src/main/kotlin/org/hyperledger/identus/client/models/CredentialSubject.kt
!cloud-agent/client/kotlin/src/main/kotlin/org/hyperledger/identus/client/models/Service.kt
!cloud-agent/client/kotlin/src/main/kotlin/org/hyperledger/identus/client/models/UpdateManagedDIDServiceAction.kt
6 changes: 3 additions & 3 deletions cloud-agent/client/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Prism-agent client generator
# Cloud-agent client generator

This project goal is to generate the models based on the OpenAPI Specification.

Expand All @@ -18,9 +18,9 @@ cd generator
yarn publish:clients
```

## Prism-agent lifecycle
## Cloud-agent lifecycle

`prism-client-generator` creates the clients after the `prism-agent-v*` tag is created.
`identus-client-generator` creates the clients after the `cloud-agent-v*` tag is created.

## Supported clients

Expand Down
2 changes: 1 addition & 1 deletion cloud-agent/client/generator/generate-clients.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ yarn openapi-generator-cli generate \
-i ../../service/api/http/cloud-agent-openapi-spec.yaml \
-o ../kotlin \
--ignore-file-override ../kotlin/.openapi-generator-ignore \
--additional-properties=packageName=io.iohk.atala.prism,serializationLibrary=gson,enumPropertyNaming=UPPERCASE
--additional-properties=packageName=org.hyperledger.identus.client,serializationLibrary=gson,enumPropertyNaming=UPPERCASE

# generate typescript models
yarn openapi-generator-cli generate \
Expand Down
12 changes: 6 additions & 6 deletions cloud-agent/client/kotlin/.openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ build.gradle
docs

# igore broken files
src/main/kotlin/io/iohk/atala/prism/models/UpdateManagedDIDServiceAction.kt
src/main/kotlin/io/iohk/atala/prism/models/UpdateManagedDIDServiceActionType.kt
src/main/kotlin/org/hyperledger/identus/client/models/UpdateManagedDIDServiceAction.kt
src/main/kotlin/org/hyperledger/identus/client/models/UpdateManagedDIDServiceActionType.kt

src/main/kotlin/io/iohk/atala/prism/models/Service.kt
src/main/kotlin/io/iohk/atala/prism/models/ServiceType.kt
src/main/kotlin/org/hyperledger/identus/client/models/Service.kt
src/main/kotlin/org/hyperledger/identus/client/models/ServiceType.kt

src/main/kotlin/io/iohk/atala/prism/models/StatusPurpose.kt
src/main/kotlin/io/iohk/atala/prism/models/CredentialSubject.kt
src/main/kotlin/org/hyperledger/identus/client/models/StatusPurpose.kt
src/main/kotlin/org/hyperledger/identus/client/models/CredentialSubject.kt
8 changes: 4 additions & 4 deletions cloud-agent/client/kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group 'io.iohk.atala.prism'
group 'org.hyperledger.identus'

wrapper {
gradleVersion = '7.5'
Expand Down Expand Up @@ -51,10 +51,10 @@ publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/hyperledger-labs/open-enterprise-agent/"
url = "https://maven.pkg.github.com/hyperledger/identus-cloud-agent/"
credentials {
username = System.getenv("ATALA_GITHUB_ACTOR")
password = System.getenv("ATALA_GITHUB_TOKEN")
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion cloud-agent/client/kotlin/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

rootProject.name = 'prism-kotlin-client'
rootProject.name = 'cloud-agent-client-kotlin'
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"UnusedImport"
)

package org.hyperledger.identus.prism.models
package org.hyperledger.identus.client.models

import com.google.gson.annotations.SerializedName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"UnusedImport"
)

package org.hyperledger.identus.prism.models
package org.hyperledger.identus.client.models

import org.hyperledger.identus.prism.models.Json
import org.hyperledger.identus.client.models.Json

import com.google.gson.annotations.SerializedName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"UnusedImport"
)

package org.hyperledger.identus.prism.models
package org.hyperledger.identus.client.models

import org.hyperledger.identus.prism.models.Json
import org.hyperledger.identus.client.models.Json

import com.google.gson.annotations.SerializedName

Expand Down
12 changes: 6 additions & 6 deletions cloud-agent/client/python/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
Prism Agent
Identus Cloud Agent
No description provided
Expand All @@ -11,7 +11,7 @@

from setuptools import setup, find_packages # noqa: H301

NAME = "open-enterprise-agent-python-client"
NAME = "cloud-agent-client-python"
VERSION = "0.0.1"

REQUIRES = [
Expand All @@ -26,16 +26,16 @@
setup(
name=NAME,
version=VERSION,
description="Prism Agent Client",
description="Identus Cloud Agent Client",
author="Allain Magyar",
author_email="",
url="https://github.com/hyperledger-labs/open-enterprise-agent",
keywords=["Prism Agent"],
url="https://github.com/hyperledger/identus-cloud-agent",
keywords=["Identus Cloud Agent Client"],
python_requires=">=3.7",
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,
long_description="""\
Prism-agent models generated from OpenAPI Specification
Identus Cloud Agent models generated from the OpenAPI Specification
"""
)
6 changes: 3 additions & 3 deletions cloud-agent/client/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@hyperledger-labs/open-enterprise-agent-ts-client",
"name": "@hyperledger/cloud-agent-client-ts",
"version": "0.0.1",
"description": "TypeScript OpenAPI client for Open Enterprise Agent",
"description": "TypeScript OpenAPI client for Identus Cloud Agent",
"author": "allain.magyar@iohk.io",
"repository": {
"type": "git",
"url": "https://github.com/hyperledger-labs/open-enterprise-agent/"
"url": "https://github.com/hyperledger/identus-cloud-agent/"
},
"keywords": [
"fetch",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ Here is an example of the agent configuration for sandbox environment:
1. Docker and Docker Compose are installed.
2. JDK >=17.
3. IntelliJ IDEA with Kotlin and Cucumber plugins.
4. `ATALA_GITHUB_ACTOR` and `ATALA_GITHUB_TOKEN` environment variables are set to download dependencies.
4. `GITHUB_ACTOR` and `GITHUB_TOKEN` environment variables are set to download dependencies.

> If you have troubles with JDK version incompatibilities in IntelliJ IDEA,
> make sure JDK is set not only for the project itself, but also for the Gradle daemon.
Expand Down
6 changes: 3 additions & 3 deletions tests/integration-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ repositories {
maven {
url = uri("https://maven.pkg.github.com/hyperledger/identus-cloud-agent/")
credentials {
username = System.getenv("ATALA_GITHUB_ACTOR")
password = System.getenv("ATALA_GITHUB_TOKEN")
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
Expand All @@ -33,7 +33,7 @@ dependencies {
testImplementation("io.ktor:ktor-server-netty:2.3.0")
testImplementation("io.ktor:ktor-client-apache:2.3.0")
// RestAPI client
testImplementation("io.iohk.atala.prism:prism-kotlin-client:1.31.0")
testImplementation("org.hyperledger.identus:cloud-agent-client-kotlin:1.32.0")
// Test helpers library
testImplementation("io.iohk.atala:atala-automation:0.3.2")
// Hoplite for configuration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package common

import io.iohk.atala.prism.models.CredentialSchemaInput
import org.hyperledger.identus.client.models.CredentialSchemaInput
import models.JsonSchema
import models.JsonSchemaProperty
import java.util.UUID
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package common

import io.iohk.atala.prism.models.*
import org.hyperledger.identus.client.models.*
import java.time.Duration

object TestConstants {
Expand Down
8 changes: 4 additions & 4 deletions tests/integration-tests/src/test/kotlin/models/Events.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package models

import com.google.gson.JsonElement
import com.google.gson.annotations.SerializedName
import io.iohk.atala.prism.models.Connection
import io.iohk.atala.prism.models.IssueCredentialRecord
import io.iohk.atala.prism.models.ManagedDID
import io.iohk.atala.prism.models.PresentationStatus
import org.hyperledger.identus.client.models.Connection
import org.hyperledger.identus.client.models.IssueCredentialRecord
import org.hyperledger.identus.client.models.ManagedDID
import org.hyperledger.identus.client.models.PresentationStatus

data class Event(
@SerializedName("type") var type: String,
Expand Down
4 changes: 2 additions & 2 deletions tests/integration-tests/src/test/kotlin/steps/Setup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import config.AgentRole
import config.Config
import io.cucumber.java.AfterAll
import io.cucumber.java.BeforeAll
import io.iohk.atala.prism.models.CreateWalletRequest
import io.iohk.atala.prism.models.CreateWebhookNotification
import org.hyperledger.identus.client.models.CreateWalletRequest
import org.hyperledger.identus.client.models.CreateWebhookNotification
import io.restassured.RestAssured
import io.restassured.builder.RequestSpecBuilder
import net.serenitybdd.screenplay.Actor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import io.cucumber.java.ParameterType
import io.cucumber.java.en.Given
import io.iohk.atala.automation.extensions.get
import io.iohk.atala.automation.serenity.ensure.Ensure
import io.iohk.atala.prism.models.Connection
import io.iohk.atala.prism.models.ConnectionsPage
import io.iohk.atala.prism.models.IssueCredentialRecord
import io.iohk.atala.prism.models.IssueCredentialRecordPage
import org.hyperledger.identus.client.models.Connection
import org.hyperledger.identus.client.models.ConnectionsPage
import org.hyperledger.identus.client.models.IssueCredentialRecord
import org.hyperledger.identus.client.models.IssueCredentialRecordPage
import net.serenitybdd.rest.SerenityRest
import net.serenitybdd.screenplay.Actor
import net.serenitybdd.screenplay.actors.OnStage
Expand Down

0 comments on commit 9cdce74

Please sign in to comment.