Last active
June 22, 2020 12:44
-
-
Save mirontoli/b79204d3b2f0191f31ca3f941df96084 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az storage blob upload-batch \ | |
--source $(sourceFolder)/bundledFiles \ | |
--destination $(storageContainer)/$(toolPath) \ | |
--account-name $(storageAccount) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export OFFICE365CLI_AADAPPID=506af689-32aa-46c8-afb5-972ebf9d218a | |
export OFFICE365CLI_TENANT=e8954f17-a373-4b61-b54d-45c038fe3188 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- task: Bash@3 # login | |
displayName: "Login to O365 spAppCatalogSiteUrl with user $(username)" | |
inputs: | |
targetType: "inline" | |
script: 'o365 login "${{ parameters.spAppCatalogSiteUrl }}" -t password -u $(username) -p $(password)' | |
env: | |
OFFICE365CLI_AADAPPID: "${{ parameters.o365cliAppId }}" | |
OFFICE365CLI_TENANT: "${{ parameters.tenantId }}" | |
- task: Bash@3 #upload | |
displayName: "Upload web part ${{ parameters.spfxPackageName }} to catalog" | |
inputs: | |
targetType: "inline" | |
script: 'o365 spo app add -p "$(Pipeline.Workspace)/${{ parameters.environment }}/${{ parameters.spfxPackageName }}" --overwrite' | |
env: | |
OFFICE365CLI_AADAPPID: "${{ parameters.o365cliAppId }}" | |
OFFICE365CLI_TENANT: "${{ parameters.tenantId }}" | |
- task: Bash@3 #deploy | |
displayName: "Deploy ${{ parameters.spfxPackageName }} web part" | |
inputs: | |
targetType: "inline" | |
script: 'o365 spo app deploy --name "${{ parameters.spfxPackageName }}" --appCatalogUrl "${{ parameters.spAppCatalogSiteUrl }}"' | |
env: | |
OFFICE365CLI_AADAPPID: "${{ parameters.o365cliAppId }}" | |
OFFICE365CLI_TENANT: "${{ parameters.tenantId }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- task: Bash@3 # login | |
displayName: "Login to O365 spAppCatalogSiteUrl with user $(username)" | |
inputs: | |
targetType: "inline" | |
script: 'o365 login "${{ parameters.spAppCatalogSiteUrl }}" -t password -u $(username) -p $(password)' | |
- task: Bash@3 #upload | |
displayName: "Upload web part ${{ parameters.spfxPackageName }} to catalog" | |
inputs: | |
targetType: "inline" | |
script: 'o365 spo app add -p "$(Pipeline.Workspace)/${{ parameters.environment }}/${{ parameters.spfxPackageName }}" --overwrite' | |
- task: Bash@3 #deploy | |
displayName: "Deploy ${{ parameters.spfxPackageName }} web part" | |
inputs: | |
targetType: "inline" | |
script: 'o365 spo app deploy --name "${{ parameters.spfxPackageName }}" --appCatalogUrl "${{ parameters.spAppCatalogSiteUrl }}"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#runs in Ubuntu 20.04 Bash Task | |
sudo npm install -g @pnp/office365-cli | |
export OFFICE365CLI_AADAPPID="$(OFFICE365CLI_AADAPPID)" | |
export OFFICE365CLI_TENANT="$(OFFICE365CLI_TENANT)" | |
o365 login --authType password --userName $(AppCatalogUsername) --password "$(AppCatalogPassword)" | |
export filePath="$(System.DefaultWorkingDirectory)/dist/$(env)/$(fileName)" | |
o365 spo app add -p "$filePath" --overwrite | |
o365 spo app deploy --name "$(fileName)" --appCatalogUrl "$(AppCatalogSiteUrl)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment