...
Deploy workflow will have an optional step for deleting the report from the target workspace, performing the deployment of the report/dataset as chosen by user and rebinding the report to the dataset.
We will consider singular value for the simplicity purpose of this tutorial while specifying the deletion and rebinding step. One might reconfigure them to handle multiple values as needed. If those two steps are not needed at all then one may delete them altogether as well.
...
title | DeployPowerBIArtifacts |
---|
...
Design Considerations
For simplicity purpose, we are considering the approach of deploying the one or multiple datasets within the package to one workspace, defined by parameter key name datasetWorkspaceName. To support multiple workspaces, additional coding needs to be done that will specify which dataset should go to which workspace.
Similarly for reports as well, they will get deployed to one workspace at a time, defined by the parameter key name reportsWorkspaceName
The given workflow will showcase the deletion and rebinding step with a hardcoded report and dataset name, in order to demonstrate how the functionality works. One might reconfigure them to handle multiple values as needed. If those two steps are not needed at all then one may delete them altogether as well, in case when report and dataset are in one single pbix file and rebinding not needed.
...
We will consider singular value for the simplicity purpose of this tutorial while specifying the deletion and rebinding step. One might reconfigure them to handle multiple values as needed. If those two steps are not needed at all then one may delete them altogether as well.
...
Expand |
---|
title | DeployPowerBIArtifacts |
---|
|
Code Block |
---|
name: DeployPowerBIArtifacts
description: ''
inputs:
- code: DELETE
|
|
...
...
...
...
defaultValueExpression: false
|
|
...
...
listDataExpression: false
|
|
...
...
...
encrypted: false
variables:
- code: ENV_DETAILS
|
|
...
...
...
...
...
scope: LOCAL
- code: RELEASE_ID
|
|
...
...
...
...
...
scope: LOCAL
- code: ENVIRONMENT_ID
|
|
...
...
...
...
...
scope: LOCAL
- code: RELEASE_URL
|
|
...
...
...
...
...
scope: LOCAL
steps:
- id: '1'
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
pluginName: FlexagonAzurePlugin
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
FDAZ_DEVOPS_INP_RELEASE_DEFINITION_ID
value:
value: '2'
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
isExpression: false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_PROJECT_ |
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
value:
value: PROJECT_NAME
isExpression: true
isEncrypted: false
- name: FDAZ_DEVOPS_INP_ |
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
true
isEncrypted: false
- name: FDAZ_DEVOPS_INP_PROPERTIES
value:
isExpression: false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_ |
|
...
MANUAL_ENVIRONMENTS
value:
isExpression: false
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
- name: FDAZ_DEVOPS_INP_RELEASE_ |
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
value: 'true'
isExpression: false
isEncrypted: false
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
endpointInstanceOverride:
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
false
endpointSelection:
choice: All
endpointExecution:
choice: Any
stopOnError: false
outputs:
- output: FDAZ_DEVOPS_OUT_RESP
- output: FDAZ_DEVOPS_OUT_RELEASE_WEB_URL
- output: FDAZ_DEVOPS_OUT_REL_ENV_STAGE_DETAILS
- output: FDAZ_DEVOPS_OUT_RELEASE_ID
userInputs: []
userOutputs: []
condition: ((DELETE == "YES") && (!POWERBIRESOURCETYPE.contains("dataset")))
elseIfBlock: []
- id: '2'
name: createRelease
type: INVOKE_PLUGIN
data:
pluginName: FlexagonAzurePlugin
pluginOperation: createRelease
inputs:
- name: FDAZ_DEVOPS_INP_RELEASE_DEFINITION_ID
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
value: RELEASE_DEFINITION_ID
isExpression: true
isEncrypted: false
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
value: PROJECT_NAME
isExpression: true
isEncrypted: false
|
|
...
...
- name: FDAZ_DEVOPS_INP_VARIABLES_LIST
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
+ FD_PACKAGE_NAME + "-" + PACKAGE_NAME +
"##buildNumber:" + BuildNumber + "##resourceType:" +
POWERBIRESOURCETYPE
isExpression: true
isEncrypted: false
- name: FDAZ_DEVOPS_ |
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_MANUAL_ENVIRONMENTS
value:
isExpression: false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_RELEASE_ |
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Execution
Discover the files from SCM and create package selecting the intended ones.
...
Upon submitting the Build, the build ID from Devops is returned, which denotes the Id against which the resources are stored. As report points to dataset in our case, hence we chose the strategy of deplying dataset before report.
...
This value gets saved as Output as well, so that can be utilized in the Deploy workflow.
...
endpointInstanceOverride:
isExpression: false
consumesArtifacts: false
producesArtifacts: false
endpointSelection:
choice: All
endpointExecution:
choice: Any
stopOnError: false
outputs:
- output: FDAZ_DEVOPS_OUT_RESP
- output: FDAZ_DEVOPS_OUT_RELEASE_WEB_URL
- output: FDAZ_DEVOPS_OUT_REL_ENV_STAGE_DETAILS
variable: ENV_DETAILS
- output: FDAZ_DEVOPS_OUT_RELEASE_ID
variable: RELEASE_ID
userInputs: []
userOutputs: []
- id: '3'
name: Parse Environment specific Id
type: INVOKE_PLUGIN
data:
pluginName: FlexagonXPathPlugin
pluginOperation: parseJson
inputs:
- name: FDP_SOURCE
value:
value: ENV_DETAILS
isExpression: true
isEncrypted: false
- name: FDP_XPATH
value:
value: '''$..[?(@.name==\''''+FD_ENVIRONMENT_NAME+''\'') ].id'''
isExpression: true
isEncrypted: false
endpointInstanceOverride:
isExpression: false
consumesArtifacts: false
producesArtifacts: false
endpointSelection:
choice: All
endpointExecution:
choice: Any
stopOnError: false
outputs:
- output: FDP_VALUE
variable: ENVIRONMENT_ID
userInputs: []
userOutputs: []
- id: '4'
name: updateReleaseEnvStatus
type: INVOKE_PLUGIN
data:
pluginName: FlexagonAzurePlugin
pluginOperation: updateReleaseEnvStatus
inputs:
- name: FDAZ_DEVOPS_INP_RELEASE_ID
value:
value: RELEASE_ID
isExpression: true
isEncrypted: false
- name: FDAZ_DEVOPS_INP_RELEASE_ENVIRONMENT_ID
value:
value: ENVIRONMENT_ID.substring(1,ENVIRONMENT_ID.length()-1)
isExpression: true
isEncrypted: false
- name: FDAZ_DEVOPS_INP_PROJECT_NAME
value:
value: PROJECT_NAME
isExpression: true
isEncrypted: false
- name: FDAZ_DEVOPS_INP_RELEASE_ENVIRONMENT_STATUS
value:
value: InProgress
isExpression: false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_VARIABLES_LIST
value:
value: ENVIRONMENT_VARIABLES_LIST
isExpression: true
isEncrypted: false
- name: FDAZ_DEVOPS_INP_RELEASE_COMMENT
value:
isExpression: false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_SCHEDULED_DEPLOYMENT_TIME
value:
isExpression: false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_REL_ENV_STATUS_CHECK
value:
value: 'true'
isExpression: false
isEncrypted: false
endpointInstanceOverride:
isExpression: false
consumesArtifacts: false
producesArtifacts: false
endpointSelection:
choice: All
endpointExecution:
choice: Any
stopOnError: false
outputs:
- output: FDAZ_DEVOPS_OUT_RESP
- output: FDAZ_DEVOPS_OUT_REL_ENV_WEB_URL
variable: RELEASE_URL
userInputs: []
userOutputs: []
- id: '5'
name: If
type: IF
data:
steps:
- id: '5.1'
name: RebindReports
type: INVOKE_PLUGIN
data:
pluginName: FlexagonAzurePlugin
pluginOperation: createRelease
inputs:
- name: FDAZ_DEVOPS_INP_RELEASE_DEFINITION_ID
value:
value: '3'
isExpression: false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_ARTIFACTS_PAYLOAD
value:
isExpression: false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_PROJECT_NAME
value:
value: PROJECT_NAME
isExpression: true
isEncrypted: false
- name: FDAZ_DEVOPS_INP_VARIABLES_LIST
value:
value: REBINDREPORTS
isExpression: true
isEncrypted: false
- name: FDAZ_DEVOPS_INP_PROPERTIES
value:
isExpression: false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_MANUAL_ENVIRONMENTS
value:
isExpression: false
isEncrypted: false
- name: FDAZ_DEVOPS_INP_RELEASE_STATUS_CHECK
value:
value: 'true'
isExpression: false
isEncrypted: false
endpointInstanceOverride:
isExpression: false
consumesArtifacts: false
producesArtifacts: false
endpointSelection:
choice: All
endpointExecution:
choice: Any
stopOnError: false
outputs:
- output: FDAZ_DEVOPS_OUT_RESP
- output: FDAZ_DEVOPS_OUT_RELEASE_WEB_URL
- output: FDAZ_DEVOPS_OUT_REL_ENV_STAGE_DETAILS
- output: FDAZ_DEVOPS_OUT_RELEASE_ID
userInputs: []
userOutputs: []
condition: '!POWERBIRESOURCETYPE.contains("dataset")'
elseIfBlock: []
|
|
Execution
Discover the files from SCM and create package selecting the intended ones.
...
Upon submitting the Build, the build ID from Devops is returned, which denotes the Id against which the resources are stored. As report points to dataset in our case, hence we chose the strategy of deplying dataset before report.
...
This value gets saved as Output as well, so that can be utilized in the Deploy workflow.
Below are the examples of how to pass the Release Variables List in json format for denoting the parameters related to Delete Report and Rebind Report step:
Delete Report:
Code Block |
---|
|
{
"reportName": {
"value": "report"
},
"reportsWorkspaceName": {
"value": "ReportsWS"
}
} |
Rebind Report:
Code Block |
---|
{
"datasetName": {
"value": "localdataset"
},
"datasetWorkspaceName": {
"value": "DatasetCommon"
},
"reportName": {
"value": "localreport"
},
"reportsWorkspaceName": {
"value": "ReportsWS"
}
} |
...
Once the dataset and report are deployed to respective workspaces, in Power BI console it would look like:
...