Skip to content

Commit

Permalink
feat!: multi-repo development instances (#52)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: extract build definition IDs and Azure DevOps projects configured in environment variables will need to be migrated into the new fields added to the solution entity.
  • Loading branch information
ewingjm authored Jan 5, 2021
1 parent 794d325 commit 30c8630
Show file tree
Hide file tree
Showing 17 changed files with 576 additions and 154 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Follow Microsoft's guide [here](https://docs.microsoft.com/en-us/powerapps/devel

### Configure Azure DevOps

Navigate to _Project Settings -> Repositories_ in your Azure DevOps project. Select the relevant repository and assign the following privilges to the project Build Service user:
Navigate to _Project Settings -> Repositories_ in your Azure DevOps project. Select the relevant repository and assign the following privileges to the project Build Service user:

* Bypass policies when pushing
* Contribute
Expand Down Expand Up @@ -77,8 +77,6 @@ $settings = [PSCustomObject]@{
ApprovalsConnectionName = '<the connection name of the Approvals connection>'
AzureDevOpsConnectionName = '<the connection name of the Azure DevOps connection>'
AzureDevOpsOrganisation = '<the name of the Azure DevOps organisation>'
AzureDevOpsPipelineId = '<the ID of the Azure DevOps extract pipeline>'
AzureDevOpsProject = '<the name of the Azure DevOps project>'
SolutionPublisherPrefix = '<the prefix of the publisher (without leading underscore)>'
}
$settingsArray = $obj.PSObject.Properties | ForEach-Object { "$($_.Name)=$($_.Value)" }
Expand All @@ -99,7 +97,9 @@ Master environments are configured with **Environment** records. Enter a URL and

Create (or import) your unmanaged solutions in the master environment and register them by creating **Solution** records.

![Environment](./docs/images/solution.png)
You will need to specify the Azure DevOps project and extract build definition ID that correspond to this solution within the _Azure DevOps_ tab.

![Solution](./docs/images/solution.png)

> ℹ Update the version numbers to match the solution in the master environment if you are migrating to the Development Hub with an existing solution.
Expand Down
2 changes: 1 addition & 1 deletion deploy/DevelopmentHub.Deployment.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies" Version="9.0.2.28">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CrmSdk.Deployment" Version="9.0.2.28">
<PackageReference Include="Microsoft.CrmSdk.Deployment" Version="9.0.2.29">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CrmSdk.Workflow" Version="9.0.2.28">
Expand Down
Binary file modified docs/images/solution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name LocalizedName="Solution" OriginalName="Solution">devhub_solution</Name>
<EntityInfo>
<entity Name="devhub_solution">
<attributes>
<attribute PhysicalName="devhub_AzureDevOpsExtractBuildDefinitionID">
<Type>int</Type>
<Name>devhub_azuredevopsextractbuilddefinitionid</Name>
<LogicalName>devhub_azuredevopsextractbuilddefinitionid</LogicalName>
<RequiredLevel>required</RequiredLevel>
<DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
<ImeMode>disabled</ImeMode>
<ValidForUpdateApi>1</ValidForUpdateApi>
<ValidForReadApi>1</ValidForReadApi>
<ValidForCreateApi>1</ValidForCreateApi>
<IsCustomField>1</IsCustomField>
<IsAuditEnabled>1</IsAuditEnabled>
<IsSecured>0</IsSecured>
<IntroducedVersion>0.2.1</IntroducedVersion>
<IsCustomizable>1</IsCustomizable>
<IsRenameable>1</IsRenameable>
<CanModifySearchSettings>1</CanModifySearchSettings>
<CanModifyRequirementLevelSettings>1</CanModifyRequirementLevelSettings>
<CanModifyAdditionalSettings>1</CanModifyAdditionalSettings>
<SourceType>0</SourceType>
<IsGlobalFilterEnabled>0</IsGlobalFilterEnabled>
<IsSortableEnabled>0</IsSortableEnabled>
<CanModifyGlobalFilterSettings>1</CanModifyGlobalFilterSettings>
<CanModifyIsSortableSettings>1</CanModifyIsSortableSettings>
<IsDataSourceSecret>0</IsDataSourceSecret>
<AutoNumberFormat></AutoNumberFormat>
<IsSearchable>1</IsSearchable>
<IsFilterable>0</IsFilterable>
<IsRetrievable>0</IsRetrievable>
<IsLocalizable>0</IsLocalizable>
<Format>none</Format>
<MinValue>0</MinValue>
<MaxValue>2147483647</MaxValue>
<displaynames>
<displayname description="Azure DevOps Extract Build Definition ID" languagecode="1033" />
</displaynames>
<Descriptions>
<Description description="The Azure DevOps extract build definition ID for this solution." languagecode="1033" />
</Descriptions>
</attribute>
<attribute PhysicalName="devhub_AzureDevOpsProject">
<Type>nvarchar</Type>
<Name>devhub_azuredevopsproject</Name>
<LogicalName>devhub_azuredevopsproject</LogicalName>
<RequiredLevel>required</RequiredLevel>
<DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
<ImeMode>auto</ImeMode>
<ValidForUpdateApi>1</ValidForUpdateApi>
<ValidForReadApi>1</ValidForReadApi>
<ValidForCreateApi>1</ValidForCreateApi>
<IsCustomField>1</IsCustomField>
<IsAuditEnabled>1</IsAuditEnabled>
<IsSecured>0</IsSecured>
<IntroducedVersion>0.2.1</IntroducedVersion>
<IsCustomizable>1</IsCustomizable>
<IsRenameable>1</IsRenameable>
<CanModifySearchSettings>1</CanModifySearchSettings>
<CanModifyRequirementLevelSettings>1</CanModifyRequirementLevelSettings>
<CanModifyAdditionalSettings>1</CanModifyAdditionalSettings>
<SourceType>0</SourceType>
<IsGlobalFilterEnabled>0</IsGlobalFilterEnabled>
<IsSortableEnabled>0</IsSortableEnabled>
<CanModifyGlobalFilterSettings>1</CanModifyGlobalFilterSettings>
<CanModifyIsSortableSettings>1</CanModifyIsSortableSettings>
<IsDataSourceSecret>0</IsDataSourceSecret>
<AutoNumberFormat></AutoNumberFormat>
<IsSearchable>0</IsSearchable>
<IsFilterable>0</IsFilterable>
<IsRetrievable>0</IsRetrievable>
<IsLocalizable>0</IsLocalizable>
<Format>text</Format>
<MaxLength>64</MaxLength>
<Length>128</Length>
<displaynames>
<displayname description="Azure DevOps Project" languagecode="1033" />
</displaynames>
<Descriptions>
<Description description="The Azure DevOps project that contains the repository for this solution." languagecode="1033" />
</Descriptions>
</attribute>
</attributes>
</entity>
</EntityInfo>
<FormXml />
<RibbonDiffXml />
</Entity>
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
<?xml version="1.0" encoding="utf-8"?>
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<systemform>
<formid>{6d588ec7-f362-43b4-b68a-e2181734f959}</formid>
<IntroducedVersion>0.0.1.0</IntroducedVersion>
<FormPresentation>1</FormPresentation>
<FormActivationState>1</FormActivationState>
<form headerdensity="HighWithControls" shownavigationbar="true" showImage="false" maxWidth="1920">
<tabs>
<tab verticallayout="true" id="{80977aef-85bb-46cc-9c30-4ab517bee6bd}" IsUserDefined="1" name="{80977aef-85bb-46cc-9c30-4ab517bee6bd}" locklevel="0" expanded="true" showlabel="false">
<labels>
<label description="General" languagecode="1033" />
</labels>
<columns>
<column width="50%">
<sections>
<section showlabel="false" showbar="false" IsUserDefined="0" id="{9df7542f-44b1-41e1-a5d1-bb002d3ef7ef}" name="{9df7542f-44b1-41e1-a5d1-bb002d3ef7ef}" columns="1" locklevel="0" labelwidth="130" celllabelalignment="Left" celllabelposition="Left">
<labels>
<label description="Information" languagecode="1033" />
</labels>
<rows>
<row>
<cell id="{2f901e38-da1d-4f66-b039-f1856d8bd0a6}">
<labels>
<label description="Display Name" languagecode="1033" />
</labels>
<control id="devhub_displayname" classid="{4273EDBD-AC1D-40d3-9FB2-095C621B552D}" datafieldname="devhub_displayname" />
</cell>
</row>
<row>
<cell id="{06904c4c-21c8-be97-5240-023974e0c043}" showlabel="true" locklevel="0">
<labels>
<label description="Unique Name" languagecode="1033" />
</labels>
<control id="devhub_uniquename" classid="{4273EDBD-AC1D-40d3-9FB2-095C621B552D}" datafieldname="devhub_uniquename" disabled="false" />
</cell>
</row>
<row>
<cell id="{1bb9d182-10a3-a0ad-343a-65a3be837291}" showlabel="true" locklevel="0">
<labels>
<label description="Description" languagecode="1033" />
</labels>
<control id="devhub_description" classid="{E0DECE4B-6FC8-4a8f-A065-082708572369}" datafieldname="devhub_description" disabled="false" uniqueid="{217ec1b2-099d-9d4e-a0db-a8b4b749b1be}" />
</cell>
</row>
<row>
<cell id="{9aa15507-7008-c434-248d-d6284d3192bc}" showlabel="true" locklevel="0">
<labels>
<label description="Staging Environment" languagecode="1033" />
</labels>
<control id="devhub_stagingenvironment" classid="{270BD3DB-D9AF-4782-9025-509E298DEC0A}" datafieldname="devhub_stagingenvironment" disabled="false" />
</cell>
</row>
</rows>
</section>
</sections>
</column>
<column width="50%">
<sections>
<section name="{80977aef-85bb-46cc-9c30-4ab517bee6bd}_section_3" showlabel="false" showbar="false" locklevel="0" id="{0cdbe593-e2a2-3804-d095-cdbe62c05d58}" IsUserDefined="0" layout="varwidth" columns="111" labelwidth="115" celllabelalignment="Left" celllabelposition="Top">
<labels>
<label description="Version" languagecode="1033" />
</labels>
<rows>
<row>
<cell id="{e19301c6-463e-5c3e-6700-c673cabaa697}" showlabel="true" locklevel="0">
<labels>
<label description="Major Version" languagecode="1033" />
</labels>
<control id="devhub_majorversion" classid="{C6D124CA-7EDA-4a60-AEA9-7FB8D318B68F}" datafieldname="devhub_majorversion" disabled="false" uniqueid="{d32664c3-7098-dc7c-ceaa-d9dca570b8a3}" />
</cell>
<cell id="{5103b9da-c724-d938-8148-a7134446722e}" showlabel="true" locklevel="0">
<labels>
<label description="Minor Version" languagecode="1033" />
</labels>
<control id="devhub_minorversion" classid="{C6D124CA-7EDA-4a60-AEA9-7FB8D318B68F}" datafieldname="devhub_minorversion" disabled="false" uniqueid="{e54ad56a-c78b-9d51-31a4-ae26ee76e1d7}" />
</cell>
<cell id="{e3776aca-c481-d9b3-1111-39178420094b}" showlabel="true" locklevel="0">
<labels>
<label description="Patch Version" languagecode="1033" />
</labels>
<control id="devhub_patchversion" classid="{C6D124CA-7EDA-4a60-AEA9-7FB8D318B68F}" datafieldname="devhub_patchversion" disabled="false" uniqueid="{9972edae-eebb-06cb-620b-5ad58de4975c}" />
</cell>
</row>
</rows>
</section>
</sections>
</column>
</columns>
</tab>
<tab name="tab_azuredevops" id="061cc0d8-1fac-4421-bde2-98acb8971229" IsUserDefined="0" locklevel="0" showlabel="true">
<labels>
<label description="Azure DevOps" languagecode="1033" />
</labels>
<columns>
<column width="100%">
<sections>
<section name="tab_azuredevops_section_details" id="ee8da8ae-227e-4137-ad1e-93f255165759" IsUserDefined="0" locklevel="0" showlabel="false" showbar="false" layout="varwidth" celllabelalignment="Left" celllabelposition="Left" columns="1" labelwidth="115">
<labels>
<label description="Details" languagecode="1033" />
</labels>
<rows>
<row>
<cell id="{b6c21b1d-dad4-4335-8c77-f6a32f7b8571}" locklevel="0">
<labels>
<label description="Azure DevOps Project" languagecode="1033" />
</labels>
<control id="devhub_azuredevopsproject" classid="{4273EDBD-AC1D-40D3-9FB2-095C621B552D}" datafieldname="devhub_azuredevopsproject" disabled="false" />
</cell>
</row>
<row>
<cell id="{c4bc12b8-abfa-4c4d-b98d-0dd96df0e95d}" locklevel="0">
<labels>
<label description="Azure DevOps Extract Build Definition ID" languagecode="1033" />
</labels>
<control id="devhub_azuredevopsextractbuilddefinitionid" classid="{C6D124CA-7EDA-4A60-AEA9-7FB8D318B68F}" datafieldname="devhub_azuredevopsextractbuilddefinitionid" disabled="false" />
</cell>
</row>
</rows>
</section>
</sections>
</column>
</columns>
</tab>
<tab name="tab_2" id="{ecc66872-531e-37d5-cdd2-36047e2a27ea}" IsUserDefined="0" locklevel="0" showlabel="true" expanded="true">
<labels>
<label description="Version History" languagecode="1033" />
</labels>
<columns>
<column width="100%">
<sections>
<section name="tab_2_section_1" showlabel="false" showbar="false" locklevel="0" id="{728b7e44-68cd-d436-570d-b9a32968376a}" IsUserDefined="0" layout="varwidth" columns="1" labelwidth="115">
<labels>
<label description="Section" languagecode="1033" />
</labels>
<rows>
<row>
<cell showlabel="false" locklevel="0" id="{1f0e8768-74d5-4e00-a0f4-3aa026b15877}" rowspan="1" colspan="1">
<labels>
<label description="Solution Versions" languagecode="1033" />
</labels>
<control id="subgrid_SolutionVersions" classid="{E7A81278-8635-4D9E-8D4D-59480B391C5B}" indicationOfSubgrid="true">
<parameters>
<TargetEntityType>devhub_solutionversion</TargetEntityType>
<ViewId>{8A73DCFA-5D50-4090-A788-44AF43EF1C93}</ViewId>
<ViewIds>{8A73DCFA-5D50-4090-A788-44AF43EF1C93}</ViewIds>
<EnableViewPicker>false</EnableViewPicker>
<RelationshipName>devhub_SolutionVersion_Solution_devhub_solution</RelationshipName>
</parameters>
</control>
</cell>
</row>
</rows>
</section>
</sections>
</column>
</columns>
</tab>
</tabs>
<header id="{09c868aa-9b19-4887-8d17-6ec17eb9584a}" columns="111">
<rows>
<row>
<cell id="{6564ad49-e6b7-43c3-9ad3-aab5b08fe061}" showlabel="false">
<labels>
<label description="" languagecode="1033" />
</labels>
</cell>
<cell id="{6be944a9-b3ea-a00b-d48e-a81ea8c0c371}" showlabel="true" locklevel="0">
<labels>
<label description="Owner" languagecode="1033" />
</labels>
<control id="header_ownerid" classid="{270BD3DB-D9AF-4782-9025-509E298DEC0A}" datafieldname="ownerid" disabled="false" />
</cell>
<cell id="{29e83648-ce14-19b8-37bb-76661c01be81}" showlabel="true" locklevel="0">
<labels>
<label description="Status Reason" languagecode="1033" />
</labels>
<control id="header_statuscode" classid="{5D68B988-0661-4db2-BC3E-17598AD3BE6C}" datafieldname="statuscode" disabled="false" />
</cell>
</row>
</rows>
</header>
<footer id="{b467c14d-33f6-4802-b016-11346e96b9e8}" columns="111">
<rows>
<row>
<cell id="{3324598d-c0f2-463c-94ff-552424d779f6}" showlabel="false">
<labels>
<label description="" languagecode="1033" />
</labels>
</cell>
<cell id="{88d78072-d395-4b28-4136-ec589e948c67}" showlabel="true" locklevel="0">
<labels>
<label description="Created By" languagecode="1033" />
</labels>
<control id="footer_createdby" classid="{270BD3DB-D9AF-4782-9025-509E298DEC0A}" datafieldname="createdby" disabled="true" />
</cell>
<cell id="{c5754141-b740-8d55-4e10-2eb5182718dc}" showlabel="true" locklevel="0">
<labels>
<label description="Created On" languagecode="1033" />
</labels>
<control id="footer_createdon" classid="{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}" datafieldname="createdon" disabled="true" />
</cell>
</row>
</rows>
</footer>
<Navigation>
<NavBar />
<NavBarAreas>
<NavBarArea Id="Info">
<Titles>
<Title LCID="1033" Text="Common" />
</Titles>
</NavBarArea>
<NavBarArea Id="Sales">
<Titles>
<Title LCID="1033" Text="Sales" />
</Titles>
</NavBarArea>
<NavBarArea Id="Service">
<Titles>
<Title LCID="1033" Text="Service" />
</Titles>
</NavBarArea>
<NavBarArea Id="Marketing">
<Titles>
<Title LCID="1033" Text="Marketing" />
</Titles>
</NavBarArea>
<NavBarArea Id="ProcessCenter">
<Titles>
<Title LCID="1033" Text="Process Sessions" />
</Titles>
</NavBarArea>
</NavBarAreas>
</Navigation>
<controlDescriptions />
<DisplayConditions Order="0" FallbackForm="true" />
</form>
<LocalizedNames>
<LocalizedName description="Information" languagecode="1033" />
</LocalizedNames>
<Descriptions>
<Description description="A form for this entity." languagecode="1033" />
</Descriptions>
</systemform>
</forms>
Loading

0 comments on commit 30c8630

Please sign in to comment.