diff --git a/.github/workflows/deploy-managed-solution.yml b/.github/workflows/deploy-managed-solution.yml new file mode 100644 index 0000000..07af693 --- /dev/null +++ b/.github/workflows/deploy-managed-solution.yml @@ -0,0 +1,87 @@ +name: deploy-managed-solution +# Check out solution from Main, pack solution as managed and deploy to destination environment + +on: + workflow_dispatch: + inputs: + # Change this value + solution_name: + description: 'name of the solution to worked on from Power Platform' + required: true + default: ALMLab + destination_environment_url: + description: 'Url of the Power Platform Environment to deploy to' + required: true + default: 'https://loutimtest.crm9.dynamics.com' + +permissions: + contents: write +env: +#edit your values here + # ENVIRONMENT_URL should not be needed, testing before removing + ENVIRONMENT_URL: 'https://loutimdev.crm9.dynamics.com' + PP_BUILD_URL: 'https://loutimbuild.crm9.dynamics.com' + CLIENT_ID: '8e4bb30c-79c5-4a03-a11d-184322a0a793' + TENANT_ID: 'c0daba30-fba7-4669-a2fc-36142728b7e9' + SOLUTION_FOLDER: out/solutions/ + SOLUTION_SOURCE_FOLDER: solutions/ + +jobs: + export-from-dev: + runs-on: windows-latest + # or you can say runs-on: ubuntu-latest + env: + RUNNER_DEBUG: 1 + + steps: + - uses: actions/checkout@v2 + with: + lfs: true + + - name: who-am-i action + uses: microsoft/powerplatform-actions/who-am-i@v0 + with: + environment-url: ${{inputs.destination_environment_url}} + app-id: ${{env.CLIENT_ID}} + client-secret: ${{ secrets.PowerPlatformSPN }} + tenant-id: ${{env.TENANT_ID}} + + - name: Pack solution + uses: microsoft/powerplatform-actions/pack-solution@v0 + with: + solution-folder: ${{ env.SOLUTION_SOURCE_FOLDER}}/${{ inputs.solution_name }} + solution-file: ${{ env.SOLUTION_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: ${{env.PP_BUILD_URL}} + app-id: ${{env.CLIENT_ID}} + client-secret: ${{ secrets.PowerPlatformSPN }} + tenant-id: ${{env.TENANT_ID}} + solution-file: ${{ env.SOLUTION_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: ${{env.PP_BUILD_URL}} + app-id: ${{env.CLIENT_ID}} + client-secret: ${{ secrets.PowerPlatformSPN }} + tenant-id: ${{env.TENANT_ID}} + solution-name: ${{ inputs.solution_name }} + managed: true + solution-output-file: ${{ env.SOLUTION_FOLDER}}/${{ inputs.solution_name }}_managed.zip + + - name: Import solution to destination env + uses: microsoft/powerplatform-actions/import-solution@v0 + with: + environment-url: ${{inputs.destination_environment_url}} + app-id: ${{env.CLIENT_ID}} + client-secret: ${{ secrets.PowerPlatformSPN }} + tenant-id: ${{env.TENANT_ID}} + solution-file: ${{ env.SOLUTION_FOLDER}}/${{ inputs.solution_name }}_managed.zip + force-overwrite: true + publish-changes: true diff --git a/README.md b/README.md index 47cd1b5..95cd16e 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ The following Power Platforms are used as part of this project. |---------|:---------------------------:| | DEV | Main development environment will all work is performed on the solution | | BUILD | Build environment that is used by GitHub actions for building solution | +| TEST | Test environment that is used by GitHub actions | | HOTFIX| Special hotfix environment to be used for working on hotfixes and keeping dev work isolated from hotfixes | | PROD| Production environment that will host the final solution for production use| @@ -23,10 +24,17 @@ The following Power Platforms are used as part of this project. | TENANT_ID | The Tenant ID for the Tenant hosting the Power Platform solution | | ENVIRONMENT_URL | The URL for the Power Platform environment | | BUILD_ENVIRONMENT_URL | The URL for the Power Platform Build environment | +| TEST_ENVIRONMENT_URL | The URL for the Power Platform Test environment | | PRODUCTION_ENVIRONMENT_URL | The URL for the Power Platform Production environmnet | | PowerPlatformSPN | The Secret for the Client ID that has been registered for Power Platform. This is stored in secrets on GitHub | | GITHUB_TOKEN | +### Create App Registration in Azure for Dataverse (Power Platform) +Within Azure, create an App Registration with API access to Dataverse. + +### Store App Registration Secret in GitHub Environments +Within GitHub, create an environment to store the App Registration Secret. In GitHub under Environments you can store secrets (secure information) so that it will be available but is secured. + ### backfill-main-to-dev.yml Export solution from DEV as unmanaged, upload export solution to GitHub artifact store, pack solution as unmanaged and deploy to dev/hotfix diff --git a/solutions/ALMLab/Entities/user9_TimeOffRequest/Entity.xml b/solutions/ALMLab/Entities/user9_TimeOffRequest/Entity.xml index ecefd0c..99056fb 100644 --- a/solutions/ALMLab/Entities/user9_TimeOffRequest/Entity.xml +++ b/solutions/ALMLab/Entities/user9_TimeOffRequest/Entity.xml @@ -732,7 +732,7 @@ user9_name user9_name required - PrimaryName|ValidForAdvancedFind|ValidForForm|ValidForGrid|RequiredForForm + ActivityPointerRegardingName|PrimaryName|ValidForAdvancedFind|ValidForForm|ValidForGrid|RequiredForForm auto 1 1 @@ -932,6 +932,7 @@ 0 0 0 + 0 0 0 @@ -940,6 +941,7 @@ 0 0 UserOwned + ActivityPointer 0 0 0 @@ -981,10 +983,12 @@ 0 1 0 + 0 1 0 0 + True diff --git a/solutions/ALMLab/Other/Customizations.xml b/solutions/ALMLab/Other/Customizations.xml index 5308d2e..955666c 100644 --- a/solutions/ALMLab/Other/Customizations.xml +++ b/solutions/ALMLab/Other/Customizations.xml @@ -11,6 +11,8 @@ + + diff --git a/solutions/ALMLab/Other/Solution.xml b/solutions/ALMLab/Other/Solution.xml index f0e32f8..fd4683e 100644 --- a/solutions/ALMLab/Other/Solution.xml +++ b/solutions/ALMLab/Other/Solution.xml @@ -1,5 +1,5 @@  - + ALMLab @@ -82,6 +82,8 @@ + + diff --git a/solutions/ALMLab/PluginAssemblies/USDAALMTimeOff-DFA2EAB9-17C7-4FE7-BE38-F722EA53AA8C/USDAALMTimeOff.dll b/solutions/ALMLab/PluginAssemblies/USDAALMTimeOff-DFA2EAB9-17C7-4FE7-BE38-F722EA53AA8C/USDAALMTimeOff.dll new file mode 100644 index 0000000..5760e06 Binary files /dev/null and b/solutions/ALMLab/PluginAssemblies/USDAALMTimeOff-DFA2EAB9-17C7-4FE7-BE38-F722EA53AA8C/USDAALMTimeOff.dll differ diff --git a/solutions/ALMLab/PluginAssemblies/USDAALMTimeOff-DFA2EAB9-17C7-4FE7-BE38-F722EA53AA8C/USDAALMTimeOff.dll.data.xml b/solutions/ALMLab/PluginAssemblies/USDAALMTimeOff-DFA2EAB9-17C7-4FE7-BE38-F722EA53AA8C/USDAALMTimeOff.dll.data.xml new file mode 100644 index 0000000..4b85717 --- /dev/null +++ b/solutions/ALMLab/PluginAssemblies/USDAALMTimeOff-DFA2EAB9-17C7-4FE7-BE38-F722EA53AA8C/USDAALMTimeOff.dll.data.xml @@ -0,0 +1,12 @@ + + + 2 + 0 + 1.0 + /PluginAssemblies/USDAALMTimeOff-DFA2EAB9-17C7-4FE7-BE38-F722EA53AA8C/USDAALMTimeOff.dll + + + ade2b64b-62bd-4b74-a66a-9186eea33de7 + + + \ No newline at end of file diff --git a/solutions/ALMLab/SdkMessageProcessingSteps/{fd9b55b1-5fe4-ed11-a7c6-001dd80706ea}.xml b/solutions/ALMLab/SdkMessageProcessingSteps/{fd9b55b1-5fe4-ed11-a7c6-001dd80706ea}.xml new file mode 100644 index 0000000..d7ec25f --- /dev/null +++ b/solutions/ALMLab/SdkMessageProcessingSteps/{fd9b55b1-5fe4-ed11-a7c6-001dd80706ea}.xml @@ -0,0 +1,20 @@ + + + 9ebdbb1b-ea3e-db11-86a7-000a3a5473e8 + USDAALMTimeOff.TimeOffPlugin, USDAALMTimeOff, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6b8a928a6b32759f + 067970b9-44e7-4640-9d67-64f6f116b1c0 + user9_timeoffrequest + 0 + USDAALMTimeOff.TimeOffPlugin: Create of user9_timeoffrequest + + 1 + 0 + 1 + 4602 + 40 + 1 + 0 + 0 + 1.0 + + \ No newline at end of file