Skip to content

[CBTL-2670] Add additional business group ID #40

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

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
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
8 changes: 5 additions & 3 deletions .github/workflows/shared_deploy_cloudhub_1_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ on:
required: false
BUSINESS_GROUP_ID:
required: true
SECONDARY_BUSINESS_GROUP_ID:
Copy link
Member

Choose a reason for hiding this comment

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

Hi @hoangmirs can you explain a bit on this idea as we didn't consume the SECONDARY_BUSINESS_GROUP_ID in this workflow, why do we need to add it here? 🤔

Or you are missing it in uses: nimblehq/mulesoft-actions/[email protected] step?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@andyduong1920 This enables us to define the repositories here for the app to download.
image
So, from my understanding, whenever we build the app (in test or deploy workflows), we will need to add it so that the app can have access to the correct repository to download the assets (documentation or modules).
For the name, SECONDARY_BUSINESS_GROUP_ID I chose it as this is not the main business group ID of the app, but another one that the app need to fetch the modules, in this case, the GT one. Same for GT app, later we might need to download from other services (maybe from JFC), so I don't think we should name it as UPSTREAM_BUSINESS_GROUP_ID.
For the naming, can we name it as ADDITIONAL_BUSINESS_GROUP_ID?

required: false
ENCRYPTION_KEY:
required: true
NEXUS_USERNAME:
Expand Down Expand Up @@ -97,12 +99,12 @@ jobs:
cat src/main/resources/log4j2.xml

- name: Set up Mulesoft environment
uses: nimblehq/mulesoft-actions/setup@v1.16.0
uses: nimblehq/mulesoft-actions/setup@v1.23.0
with:
java_version: ${{ inputs.java_version }}

- name: Build with Maven
uses: nimblehq/mulesoft-actions/build@v1.16.0
uses: nimblehq/mulesoft-actions/build@v1.23.0
id: build
with:
use_artifacts: false
Expand All @@ -114,7 +116,7 @@ jobs:
maven_settings_path: ${{ inputs.maven_settings_path }}

- name: Deploy to CloudHub
uses: nimblehq/mulesoft-actions/deploy_cloudhub_1_0@v1.20.0
uses: nimblehq/mulesoft-actions/deploy_cloudhub_1_0@v1.23.0
with:
connected_app_client_id: ${{ secrets.CONTD_APP_CLIENT_ID }}
connected_app_client_secret: ${{ secrets.CONTD_APP_CLIENT_SECRET }}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/shared_deploy_exchange.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ on:
required: true
BUSINESS_GROUP_ID:
required: true
SECONDARY_BUSINESS_GROUP_ID:
required: false
NEXUS_USERNAME:
required: false
NEXUS_PASSWORD:
Expand All @@ -50,12 +52,12 @@ jobs:
cat pom.xml

- name: Set up Mulesoft environment
uses: nimblehq/mulesoft-actions/setup@v1.16.0
uses: nimblehq/mulesoft-actions/setup@v1.23.0
with:
java_version: ${{ inputs.java_version }}

- name: Build with Maven
uses: nimblehq/mulesoft-actions/build@v1.16.0
uses: nimblehq/mulesoft-actions/build@v1.23.0
id: build
with:
use_artifacts: false
Expand All @@ -67,12 +69,13 @@ jobs:
maven_settings_path: ${{ inputs.maven_settings_path }}

- name: Deploy to Anypoint Exchange
uses: nimblehq/mulesoft-actions/deploy_exchange@v1.22.0
uses: nimblehq/mulesoft-actions/deploy_exchange@v1.23.0
with:
connected_app_client_id: ${{ secrets.CONTD_APP_CLIENT_ID }}
connected_app_client_secret: ${{ secrets.CONTD_APP_CLIENT_SECRET }}
maven_settings_path: ${{ inputs.maven_settings_path }}
business_group_id: ${{ secrets.BUSINESS_GROUP_ID }}
secondary_business_group_id: ${{ secrets.SECONDARY_BUSINESS_GROUP_ID }}
nexus_username: ${{ secrets.NEXUS_USERNAME }}
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
mule_file_path: ${{ steps.build.outputs.mule_file_path }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/shared_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ on:
required: false
BUSINESS_GROUP_ID:
required: false
SECONDARY_BUSINESS_GROUP_ID:
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -49,12 +51,12 @@ jobs:
uses: actions/checkout@v4

- name: Set up Mulesoft environment
uses: nimblehq/mulesoft-actions/setup@v1.16.0
uses: nimblehq/mulesoft-actions/setup@v1.23.0
with:
java_version: ${{ inputs.java_version }}

- name: Run MUnit tests
uses: nimblehq/mulesoft-actions/test@v1.16.0
uses: nimblehq/mulesoft-actions/test@v1.23.0
with:
nexus_username: ${{ secrets.NEXUS_USERNAME }}
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
Expand All @@ -64,3 +66,4 @@ jobs:
connected_app_client_id: ${{ secrets.CONTD_APP_CLIENT_ID }}
connected_app_client_secret: ${{ secrets.CONTD_APP_CLIENT_SECRET }}
business_group_id: ${{ secrets.BUSINESS_GROUP_ID }}
secondary_business_group_id: ${{ secrets.SECONDARY_BUSINESS_GROUP_ID }}
4 changes: 4 additions & 0 deletions build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ inputs:
business_group_id:
description: Business group ID
required: false
secondary_business_group_id:
description: Secondary business group ID
required: false
nexus_username:
description: Nexus username
required: false
Expand Down Expand Up @@ -51,6 +54,7 @@ runs:
CONNECTED_APP_CLIENT_ID: ${{ inputs.connected_app_client_id }}
CONNECTED_APP_CLIENT_SECRET: ${{ inputs.connected_app_client_secret }}
BUSINESS_GROUP_ID: ${{ inputs.business_group_id }}
SECONDARY_BUSINESS_GROUP_ID: ${{ inputs.secondary_business_group_id }}
NEXUS_USERNAME: ${{ inputs.nexus_username }}
NEXUS_PASSWORD: ${{ inputs.nexus_password }}
JAVA_TOOL_OPTIONS: ${{ env.JAVA_TOOL_OPTIONS }}
Expand Down
4 changes: 4 additions & 0 deletions deploy_cloudhub_1_0/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ inputs:
business_group_id:
description: Business group ID
required: true
secondary_business_group_id:
description: Secondary business group ID
required: false
cloudhub_region:
description: CloudHub region
required: true
Expand Down Expand Up @@ -93,6 +96,7 @@ runs:
PLATFORM_CLIENT_SECRET: ${{ inputs.platform_client_secret }}
CLOUDHUB_ENVIRONMENT: ${{ inputs.cloudhub_environment }}
BUSINESS_GROUP_ID: ${{ inputs.business_group_id }}
SECONDARY_BUSINESS_GROUP_ID: ${{ inputs.secondary_business_group_id }}
CLOUDHUB_REGION: ${{ inputs.cloudhub_region }}
CLOUDHUB_APPLICATION_NAME: ${{ inputs.cloudhub_application_name }}
MULE_RUNTIME_VERSION: ${{ inputs.mule_runtime_version }}
Expand Down
4 changes: 4 additions & 0 deletions deploy_exchange/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
business_group_id:
description: Business group ID
required: true
secondary_business_group_id:
description: Secondary business group ID
required: false
maven_settings_path:
description: Maven settings file path
required: true
Expand Down Expand Up @@ -41,3 +44,4 @@ runs:
NEXUS_PASSWORD: ${{ inputs.nexus_password }}
MULE_RUNTIME_VERSION: ${{ inputs.mule_runtime_version }}
BUSINESS_GROUP_ID: ${{ inputs.business_group_id }}
SECONDARY_BUSINESS_GROUP_ID: ${{ inputs.secondary_business_group_id }}
4 changes: 4 additions & 0 deletions test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ inputs:
business_group_id:
description: Business group ID
required: false
secondary_business_group_id:
description: Secondary business group ID
required: false

runs:
using: composite
Expand All @@ -47,6 +50,7 @@ runs:
CONNECTED_APP_CLIENT_ID: ${{ inputs.connected_app_client_id }}
CONNECTED_APP_CLIENT_SECRET: ${{ inputs.connected_app_client_secret }}
BUSINESS_GROUP_ID: ${{ inputs.business_group_id }}
SECONDARY_BUSINESS_GROUP_ID: ${{ inputs.secondary_business_group_id }}
JAVA_TOOL_OPTIONS: ${{ env.JAVA_TOOL_OPTIONS }}

- name: Upload MUnit reports
Expand Down