Hi,
I previsouly created a CICD pipeline with muliple steps like building solution, creating DMAPP package, uploading DMAPP package and deploying DMAPP package with success (using secret key).
Now i am trying to do the same but with a connector/protocol solution.
- name: Create protocol package
if: github.ref_type == 'branch'
run: dataminer-package-create dmprotocol "${{ github.workspace }}/Protocol" --output "${{ github.workspace }}" --name "test"- name: Upload protocol
id: UploadDmprotocol
run: |
echo "uploadOutput=$(dataminer-catalog-upload --path-to-artifact "${{ github.workspace }}/test.dmprotocol" --dm-catalog-token ${{ secrets.DATAMINER_DEPLOY_KEY }})" >> $GITHUB_OUTPUT
shell: bash- name: Deploy protocol
run: |
dataminer-package-deploy from-catalog --artifact-id "${{ steps.UploadDmprotocol.outputs.uploadOutput }}" --dm-catalog-token "${{ secrets.DATAMINER_DEPLOY_KEY }}" --debug
For the last step "Deploy protocol", the deployment always fails. I don't have details of the error (even with --debug option).
Run dataminer-package-deploy from-catalog --artifact-id "[15:52:50 INF] {"artifactId":"dmscript/ac35a155-bfd9-4080-9c47-fbf8c49914b5"}" --dm-catalog-token "***" --debug
8[15:52:54 DBG] Attempting deployment with provided argument as token for artifact: dmscript/ac35a155-bfd9-4080-9c47-fbf8c49914b5...
9[15:52:54 DBG] Deploying dmscript/ac35a155-bfd9-4080-9c47-fbf8c49914b5
10[15:52:54 DBG] Deployment c7cf102c-2efb-4976-a780-9dc9d969a95e started...
11[15:52:54 DBG] Deployment started...
12[15:52:54 DBG] Waiting 3s before checking deployment status.
13[15:52:57 DBG] Checking deployment status...
14[15:52:58 FTL] Deployment Failed with status Error for artifact dmscript/ac35a155-bfd9-4080-9c47-fbf8c49914b5.
15[15:52:58 DBG] Deployment finished.
16[15:52:58 INF] {"Status":"Error"}
17[15:52:58 FTL] Fail-Deployment returned false
18Error: Process completed with exit code 1.
If anyone can help me resolve this error, I'd appreciate it.
Thanks
Apologies for the delay in responding. I wanted to ensure that I could provide you with a useful update, so my team and I re-prioritized QA and the release of a new version of the Deployer Tool. This update provides a workaround for your current issue.
Issue Acknowledgment & Upcoming Fix
First of all, thank you for reporting this. It helped us identify a gap in our current implementation. At the moment, performing a volatile upload of a *.dmprotocol
item and then attempting to deploy it is not supported, as the necessary code does not yet exist.
I have discussed this internally, and we plan to introduce support for this within the next month. Once available, I will follow up to confirm the update, at which point your CI/CD pipeline should function as expected.
Workaround: Deploying from Catalog
In the meantime, we have released a new version of the dataminer-package-deploy tool that allows deployments directly from a registered catalog item. As a workaround, you can first perform a registered upload (note: this will make the version visible in the Catalog UI) and then deploy from the Catalog using the new functionality.
- Registered Upload Documentation:
Catalog Upload Tool – Registered Uploads - Deploying from the Catalog Documentation:
DataMiner Deploy Tool – Deploying from Catalog
Pipeline Adjustments
If you choose to apply this workaround, your CI/CD pipeline should be updated as follows:
<code class="language-yaml">name: DataMiner CICD Connector Deploy Only # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the master branch push: branches: [] tags: - "[0-9]+.[0-9]+.[0-9]+.[0-9]+" - "[0-9]+.[0-9]+.[0-9]+.[0-9]+-**" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # Optional 0 or More CD Jobs as needed CD: # if: github.ref_type == 'tag' environment: development name: CD runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - 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 - name: Create protocol package if: github.ref_type == 'branch' run: dataminer-package-create dmprotocol "${{ github.workspace }}" --output "${{ github.workspace }}" --name "test" - name: Upload protocol to Catalog id: UploadDmprotocol shell: pwsh run: | dataminer-catalog-upload with-registration --path-to-artifact "${{ github.workspace }}/test.dmprotocol" ` --catalog-identifier "TODO:Add a GUID" ` --uri-sourcecode "https://github.com/${{ github.repository }}" ` --artifact-version "0.0.${{ github.run_number }}-prerelease" ` --dm-catalog-token ${{ secrets.DATAMINER_DEPLOY_KEY }} - name: Deploy protocol shell: pwsh run: | dataminer-package-deploy from-catalog --catalog-id "TODO:Add SAME GUID" ` --catalog-version "0.0.${{ github.run_number }}-prerelease" ` --agent-destination-id "TODO: SEE BELOW" ` --dm-catalog-token ${{ secrets.DATAMINER_DEPLOY_KEY }} </code>
Important Considerations:
- This approach will make each upload visible in the Catalog UI, which may not be ideal for build or pre-release testing.
- The token/key used for deployment must be an Organization Key rather than a key from a specific DataMiner system.
Deployment Parameters & Configuration
dm-catalog-token
: Must be an Organization Key with permissions to deploy a version of a catalog item.catalog-id
: The GUID of the catalog item you wish to deploy. This should match the ID used during registration. To find an existing catalog item’s ID, navigate to its details page in the Catalog (it is the last part of the URL).catalog-version
: The specific version number of the catalog item to deploy.agent-destination-id
: The identifier of the target DataMiner system. This can be found in the Admin app, where it appears as the last GUID in the system’s details page URL.
You can find a working example of this workflow here:
https://github.com/SkylineCommunications/BoostTestConnector/actions/workflows/dataminer-cicd-connector-deployonly.yml
If you have any further questions or encounter any issues, feel free to reach out. I will update you once the planned fix for volatile uploads is implemented.