Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
35 changes: 25 additions & 10 deletions workflow-templates/DataMiner-CICD-Automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
16 changes: 11 additions & 5 deletions workflow-templates/DataMiner-CICD-Connector-DeployOnly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -61,15 +62,20 @@ 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: |
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: 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 }}
69 changes: 33 additions & 36 deletions workflow-templates/DataMiner-CICD-Connector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
22 changes: 19 additions & 3 deletions workflow-templates/DataMiner-CICD-UpdateCatalogDetails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
# 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 }}