From c56d90602c91914b0958289b72a70354d6928cf9 Mon Sep 17 00:00:00 2001 From: janstaelensskyline <71829634+janstaelensskyline@users.noreply.github.com> Date: Tue, 3 Jun 2025 00:50:39 +0000 Subject: [PATCH] [create-pull-request] automated change --- .../DataMiner-CICD-Automation-DeployOnly.yml | 2 +- .../DataMiner-CICD-Automation.yml | 35 +++++++--- .../DataMiner-CICD-Connector-DeployOnly.yml | 16 +++-- .../DataMiner-CICD-Connector.yml | 69 +++++++++---------- .../DataMiner-CICD-UpdateCatalogDetails.yml | 22 +++++- 5 files changed, 89 insertions(+), 55 deletions(-) diff --git a/workflow-templates/DataMiner-CICD-Automation-DeployOnly.yml b/workflow-templates/DataMiner-CICD-Automation-DeployOnly.yml index 1fcd591..61f4940 100644 --- a/workflow-templates/DataMiner-CICD-Automation-DeployOnly.yml +++ b/workflow-templates/DataMiner-CICD-Automation-DeployOnly.yml @@ -84,4 +84,4 @@ jobs: run: echo "id=$(dataminer-catalog-upload --path-to-artifact "${{ github.workspace }}/${{ steps.packageName.outputs.name }}.dmapp" --dm-catalog-token ${{ secrets.DATAMINER_DEPLOY_KEY }})" >> $GITHUB_OUTPUT - name: Deploy to DataMiner - run: dataminer-package-deploy from-catalog --artifact-id "${{ steps.uploadToCatalog.outputs.id }}" --dm-catalog-token ${{ secrets.DATAMINER_DEPLOY_KEY }} + run: dataminer-package-deploy from-volatile --artifact-id "${{ steps.uploadToCatalog.outputs.id }}" --dm-system-token ${{ secrets.DATAMINER_DEPLOY_KEY }} diff --git a/workflow-templates/DataMiner-CICD-Automation.yml b/workflow-templates/DataMiner-CICD-Automation.yml index c8b2291..07b373a 100644 --- a/workflow-templates/DataMiner-CICD-Automation.yml +++ b/workflow-templates/DataMiner-CICD-Automation.yml @@ -18,16 +18,31 @@ jobs: CI: uses: SkylineCommunications/_ReusableWorkflows/.github/workflows/Automation Master Workflow.yml@main with: - referenceName: ${{ github.ref_name }} - runNumber: ${{ github.run_number }} - referenceType: ${{ github.ref_type }} - repository: ${{ github.repository }} - owner: ${{ github.repository_owner }} sonarCloudProjectName: #TODO: Go to 'https://sonarcloud.io/projects/create' and create a project. Then enter the id of the project as mentioned in the sonarcloud project url here. - secrets: - # The API-key: generated in the DCP Admin app (https://admin.dataminer.services/) as authentication for a certain DataMiner System. - api-key: ${{ secrets.DATAMINER_DEPLOY_KEY }} - sonarCloudToken: ${{ secrets.SONAR_TOKEN }} + # secrets: + # These secrets are only required when: + # - The repository is not part of the SkylineCommunications GitHub Organization. + # - You want to publish to a DataMiner Catalog belonging to a different organization than Skyline Communications. + + # The API key used for authentication with the DataMiner Catalog. + # Generate this key in the DCP Admin app: https://admin.dataminer.services/ + # Uncomment when publishing to a Catalog of a different organization than Skyline Communications. + # api-key: ${{ secrets.DATAMINER_TOKEN }} + + # Token used for SonarCloud integration. + # Not needed when working within the SkylineCommunications organization. + # sonarCloudToken: ${{ secrets.SONAR_TOKEN }} + + # Optional OIDC inputs, required only when running workflows from a repository + # outside of the SkylineCommunications GitHub Organization and you don't provide individual secrets. + # + # A prerequisite is an Azure Key Vault named `kv-master-cicd-secrets`, + # which must contain all required secrets as defined in the reusable workflows under `secret_names=...`. + + # oidc-client-id: ${{ secrets.OIDC_CLIENT_ID }} + # oidc-tenant-id: ${{ secrets.OIDC_TENANT_ID }} + # oidc-subscription-id: ${{ secrets.OIDC_SUBSCRIPTION_ID }} + # # Optional 0 or More CD Jobs as needed # CD: @@ -44,4 +59,4 @@ jobs: # run: dotnet tool install -g Skyline.DataMiner.CICD.Tools.DataMinerDeploy # - name: Deploy to DataMiner - # run: dataminer-package-deploy from-catalog --artifact-id "${{ needs.CI.outputs.artifact-id }}" --dm-catalog-token ${{ secrets.DATAMINER_DEPLOY_KEY }} + # run: dataminer-package-deploy from-catalog --catalog-id "TODO:Fill-In-Catalog-GUID" --catalog-version ${{ github.ref_name }} --agent-destination-id "TODO:Fill-In-DataMiner-Agent-GUID" --dm-catalog-token ${{ secrets.DATAMINER_TOKEN }} diff --git a/workflow-templates/DataMiner-CICD-Connector-DeployOnly.yml b/workflow-templates/DataMiner-CICD-Connector-DeployOnly.yml index 7a811ab..9effde3 100644 --- a/workflow-templates/DataMiner-CICD-Connector-DeployOnly.yml +++ b/workflow-templates/DataMiner-CICD-Connector-DeployOnly.yml @@ -30,6 +30,7 @@ jobs: - name: Install .NET Tools run: | dotnet tool install -g Skyline.DataMiner.CICD.Tools.Packager + dotnet tool install -g Skyline.DataMiner.CICD.Tools.CatalogUpload dotnet tool install -g Skyline.DataMiner.CICD.Tools.DataMinerDeploy #ON RELEASE OR PRE-RELEASE @@ -61,7 +62,6 @@ jobs: dataminer-package-create dmprotocol "${{ github.workspace }}" --name "${{ github.repository }}_${{ github.run_number }}" --output "${{ github.workspace }}/_PackageResults" --version-override "${{ env.PROTOCOL_VERSION }}_B${{ github.run_number }}" shell: bash - # Deploys the artifact directly to an internet-accessible DataMiner Agent. - name: Find .dmprotocol id: findcreatedpackage run: | @@ -69,7 +69,13 @@ jobs: echo packageName=$(find _PackageResults -type f -name '*.dmprotocol') >> $GITHUB_OUTPUT unset IFS shell: bash - - - name: Direct Agent Deployment - run: dataminer-package-deploy from-artifact --path-to-artifact "${{ steps.findcreatedpackage.outputs.packageName }}" --dm-server-location "${{ secrets.serverLocation }}" --dm-user "${{ secrets.dataminerUser }}" --dm-password "${{ secrets.dataminerPassword }}" - \ No newline at end of file + + # - name: Direct Agent Deployment Alternative + # run: dataminer-package-deploy from-artifact --path-to-artifact "${{ steps.findcreatedpackage.outputs.packageName }}" --dm-server-location "${{ secrets.serverLocation }}" --dm-user "${{ secrets.dataminerUser }}" --dm-password "${{ secrets.dataminerPassword }}" + + - name: Volatile Upload to Catalog + id: uploadToCatalog + run: echo "id=$(dataminer-catalog-upload --path-to-artifact "${{ steps.findcreatedpackage.outputs.packageName }}" --dm-catalog-token ${{ secrets.DATAMINER_DEPLOY_KEY }})" >> $GITHUB_OUTPUT + + - name: Deploy to DataMiner + run: dataminer-package-deploy from-volatile --artifact-id "${{ steps.uploadToCatalog.outputs.id }}" --dm-system-token ${{ secrets.DATAMINER_DEPLOY_KEY }} \ No newline at end of file diff --git a/workflow-templates/DataMiner-CICD-Connector.yml b/workflow-templates/DataMiner-CICD-Connector.yml index 484ef88..cc0531d 100644 --- a/workflow-templates/DataMiner-CICD-Connector.yml +++ b/workflow-templates/DataMiner-CICD-Connector.yml @@ -18,47 +18,44 @@ jobs: CI: uses: SkylineCommunications/_ReusableWorkflows/.github/workflows/Connector Master Workflow.yml@main with: - referenceName: ${{ github.ref_name }} - runNumber: ${{ github.run_number }} - referenceType: ${{ github.ref_type }} - repository: ${{ github.repository }} - owner: ${{ github.repository_owner }} sonarCloudProjectName: #TODO: Go to 'https://sonarcloud.io/projects/create' and create a project. Then enter the id of the project as mentioned in the sonarcloud project url here. - secrets: - # The API-key: generated in the DCP Admin app (https://admin.dataminer.services/) as authentication for a certain DataMiner System. - api-key: ${{ secrets.DATAMINER_DEPLOY_KEY }} - sonarCloudToken: ${{ secrets.SONAR_TOKEN }} + # secrets: + # These secrets are only required when: + # - The repository is not part of the SkylineCommunications GitHub Organization. + # - You want to publish to a DataMiner Catalog belonging to a different organization than Skyline Communications. + + # The API key used for authentication with the DataMiner Catalog. + # Generate this key in the DCP Admin app: https://admin.dataminer.services/ + # Uncomment when publishing to a Catalog of a different organization than Skyline Communications. + # api-key: ${{ secrets.DATAMINER_TOKEN }} + + # Token used for SonarCloud integration. + # Not needed when working within the SkylineCommunications organization. + # sonarCloudToken: ${{ secrets.SONAR_TOKEN }} + + # Optional OIDC inputs, required only when running workflows from a repository + # outside of the SkylineCommunications GitHub Organization and you don't provide individual secrets. + # + # A prerequisite is an Azure Key Vault named `kv-master-cicd-secrets`, + # which must contain all required secrets as defined in the reusable workflows under `secret_names=...`. + + # oidc-client-id: ${{ secrets.OIDC_CLIENT_ID }} + # oidc-tenant-id: ${{ secrets.OIDC_TENANT_ID }} + # oidc-subscription-id: ${{ secrets.OIDC_SUBSCRIPTION_ID }} - # Optional 0 or More CD Jobs as needed + # Optional 0 or More CD Jobs as needed # CD: - # # if: github.ref_type == 'tag' - # environment: staging + # if: github.ref_type == 'tag' + # environment: production # name: CD - # runs-on: windows-latest + # runs-on: ubuntu-latest # needs: CI - + # steps: # - uses: actions/checkout@v4 - - # - name: Install DataMiner Deploy - # run: dotnet tool install -g Skyline.DataMiner.CICD.Tools.DataMinerDeploy - - # # Deploys the artifact directly to an internet-accessible DataMiner Agent. Deployment from the catalog currently not supported. - # - name: Download Created Connector Package - # id: downloadPackage - # uses: actions/download-artifact@v4 - # with: - # name: Connector Package - # path: _PackageResults - - # - name: Find .dmprotocol - # id: findcreatedpackage - # run: | - # IFS=$'\n' - # echo packageName=$(find _PackageResults -type f -name '*.dmprotocol') >> $GITHUB_OUTPUT - # unset IFS - # shell: bash - # - name: Direct Agent Deployment - # run: dataminer-package-deploy from-artifact --path-to-artifact "${{ steps.findcreatedpackage.outputs.packageName }}" --dm-server-location "${{ secrets.serverLocation }}" --dm-user "${{ secrets.dataminerUser }}" --dm-password "${{ secrets.dataminerPassword }}" - + # - name: Install .NET Tools + # run: dotnet tool install -g Skyline.DataMiner.CICD.Tools.DataMinerDeploy + + # - name: Deploy to DataMiner + # run: dataminer-package-deploy from-catalog --catalog-id "TODO:Fill-In-Catalog-GUID" --catalog-version ${{ github.ref_name }} --agent-destination-id "TODO:Fill-In-DataMiner-Agent-GUID" --dm-catalog-token ${{ secrets.DATAMINER_TOKEN }} \ No newline at end of file diff --git a/workflow-templates/DataMiner-CICD-UpdateCatalogDetails.yml b/workflow-templates/DataMiner-CICD-UpdateCatalogDetails.yml index e4539a1..30fa64c 100644 --- a/workflow-templates/DataMiner-CICD-UpdateCatalogDetails.yml +++ b/workflow-templates/DataMiner-CICD-UpdateCatalogDetails.yml @@ -17,6 +17,22 @@ jobs: Catalog: uses: SkylineCommunications/_ReusableWorkflows/.github/workflows/Update Catalog Details Workflow.yml@main - secrets: - # The API-key: generated in the DCP Admin app (https://admin.dataminer.services/) as authentication for a certain DataMiner Organization or Agent. - api-key: ${{ secrets.DATAMINER_DEPLOY_KEY }} \ No newline at end of file + # secrets: + # These secrets are only required when: + # - The repository is not part of the SkylineCommunications GitHub Organization. + # - You want to publish to a DataMiner Catalog belonging to a different organization than Skyline Communications. + + # The API key used for authentication with the DataMiner Catalog. + # Generate this key in the DCP Admin app: https://admin.dataminer.services/ + # Uncomment when publishing to a Catalog of a different organization than Skyline Communications. + # api-key: ${{ secrets.DATAMINER_TOKEN }} + + # Optional OIDC inputs, required only when running workflows from a repository + # outside of the SkylineCommunications GitHub Organization and you don't provide individual secrets. + # + # A prerequisite is an Azure Key Vault named `kv-master-cicd-secrets`, + # which must contain all required secrets as defined in the reusable workflows under `secret_names=...`. + + # oidc-client-id: ${{ secrets.OIDC_CLIENT_ID }} + # oidc-tenant-id: ${{ secrets.OIDC_TENANT_ID }} + # oidc-subscription-id: ${{ secrets.OIDC_SUBSCRIPTION_ID }} \ No newline at end of file