I’m using powerplatform-actions to set up deployment from my PowerPlatform / PowerApps non-prod to prod environment. I’m following this Microsoft tutorial guide.
I encountered this error like in this Github Issue.
> Solution Importing...
> Microsoft PowerPlatform CLI
> Version: 1.25.2+g1c4a1b8
> **Error: CanvasApp import: FAILURE: No file with that name found**
> **CanvasApp import: FAILURE: No file with that name found**
I followed the workaround mentioned in the GitHub issue, which is to force install Power Platform Tools as the first step of my job. But apparently, this step is skipped and my PAC version is not being updated (still 1.25.2+g1c4a1b8 instead of 1.31.6):
enter image description here
Here’s my workflow:
name: release-solution-to-prod-with-inputs
# Reusable workflow
# convert solution to managed (using a build PowerPlatform environment for the conversion)
# upload the solution to the GitHub artifacts and deploy to the PROD environment
on:
workflow_call:
inputs:
#Do Not change these values
#Values are set by the caller
#caller sample: release-action-call.ymnl
solution_name:
description: 'The solution name.'
type: string
default: deploymenttest
solution_shipping_folder:
description: 'folder name for staging the exported solution *do not change*'
type: string
default: out/ship/
solution_outbound_folder:
description: 'staging the unpacked solution folder before check-in *do not change*'
type: string
default: out/solutions/
solution_source_folder:
description: 'folder name to be created and checked in *do not change*'
type: string
default: solutions/
solution_release_folder:
description: 'folder where the released binaries are going to be hosted *do not change*'
type: string
default: out/release
BUILD_ENVIRONMENT_URL:
description: 'Build environment url.'
type: string
required: true
PRODUCTION_ENVIRONMENT_URL:
description: 'Production environment url.'
type: string
required: true
CLIENT_ID:
description: 'The client id'
type: string
required: true
TENANT_ID:
description: 'The tenant id'
type: string
required: true
secrets:
envSecret:
description: 'The secret value for authentication using SPN'
required: true
jobs:
convert-to-managed:
runs-on: windows-latest
# you can say runs-on: ubuntu-latest or windows-latest
env:
RUNNER_DEBUG: 1
steps:
- name: Install Power Platform Tools
uses: microsoft/powerplatform-actions/actions-install@v1
with:
pac-version-override: 1.31.6
- uses: actions/checkout@v2
with:
lfs: true
- name: Pack solution
uses: microsoft/powerplatform-actions/pack-solution@v0
with:
solution-folder: ${{ inputs.solution_source_folder}}/${{ inputs.solution_name }}
solution-file: ${{ inputs.solution_outbound_folder}}/${{ inputs.solution_name }}.zip
solution-type: Unmanaged
- name: Import solution as unmanaged to build env
uses: microsoft/powerplatform-actions/import-solution@v0
with:
environment-url: ${{inputs.BUILD_ENVIRONMENT_URL}}
app-id: ${{inputs.CLIENT_ID}}
client-secret: ${{ secrets.envSecret }}
tenant-id: ${{inputs.TENANT_ID}}
solution-file: ${{ inputs.solution_outbound_folder}}/${{ inputs.solution_name }}.zip
force-overwrite: true
publish-changes: true
- name: Export solution as managed
uses: microsoft/powerplatform-actions/export-solution@v0
with:
environment-url: ${{inputs.BUILD_ENVIRONMENT_URL}}
app-id: ${{inputs.CLIENT_ID}}
client-secret: ${{ secrets.envSecret }}
tenant-id: ${{inputs.TENANT_ID}}
solution-name: ${{ inputs.solution_name }}
managed: true
solution-output-file: ${{ inputs.solution_shipping_folder}}/${{ inputs.solution_name }}_managed.zip
- name: Upload the ready to ship solution to GH artifact store
uses: actions/upload-artifact@v2
with:
name: managedSolutions
path: ${{ inputs.solution_shipping_folder}}/
release-to-prod:
needs: [ convert-to-managed ]
runs-on: windows-latest
env:
RUNNER_DEBUG: 1
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Fetch the ready to ship solution from GH artifact store
uses: actions/download-artifact@v2
with:
name: managedSolutions
path: ${{ inputs.solution_release_folder}}
- name: Import solution to prod env
uses: microsoft/powerplatform-actions/import-solution@v0
with:
environment-url: ${{inputs.PRODUCTION_ENVIRONMENT_URL}}
app-id: ${{inputs.CLIENT_ID}}
client-secret: ${{ secrets.envSecret }}
tenant-id: ${{inputs.TENANT_ID}}
solution-file: ${{ inputs.solution_release_folder}}/${{ inputs.solution_name }}_managed.zip
force-overwrite: true
publish-changes: true
I strongly prefer to set up the deployment with Github Actions, but if not, I’m ok with using Azure DevOps or PowerPlatform Pipelines.
I tried running on ubuntu-latest and using version 1.4.0 for all the powerplatform-actions but nothing worked.
I’m aware manually removing this node from the canvas apps metadata XML probably fixes it:
<AdditionalUris>
<AdditionalUri>solution_AdditionalUris0_identity.json</AdditionalUri>
</AdditionalUris>
But I’m looking for a workaround that does not involve doing anything manually.
nguyen-tran-envoy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.