Skip to content

Commit

Permalink
Make Mastodon URL as Pipeline parameter (#1407)
Browse files Browse the repository at this point in the history
* Paramterise the Mastodon URL
  • Loading branch information
rfennell authored Nov 21, 2022
1 parent 5776621 commit 1ca0b2c
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Extensions/ArtifactDescription/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,5 @@ stages:
parameters:
buildNumber: $(Build.BuildNumber)
extensionName: $(Build.DefinitionName)
mastodonkey: $(mastodonkey)
mastodonUrl: $(mastodonurl)
mastodonKey: $(mastodonkey)
3 changes: 2 additions & 1 deletion Extensions/BuildUpdating/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,5 @@ stages:
parameters:
buildNumber: $(Build.BuildNumber)
extensionName: $(Build.DefinitionName)
mastodonkey: $(mastodonkey)
mastodonUrl: $(mastodonurl)
mastodonKey: $(mastodonkey)
3 changes: 2 additions & 1 deletion Extensions/DevTestLab/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ stages:
parameters:
buildNumber: $(Build.BuildNumber)
extensionName: $(Build.DefinitionName)
mastodonkey: $(mastodonkey)
mastodonUrl: $(mastodonurl)
mastodonKey: $(mastodonkey)
3 changes: 2 additions & 1 deletion Extensions/FileUtilities/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,5 @@ stages:
parameters:
buildNumber: $(Build.BuildNumber)
extensionName: $(Build.DefinitionName)
mastodonkey: $(mastodonkey)
mastodonUrl: $(mastodonurl)
mastodonKey: $(mastodonkey)
3 changes: 2 additions & 1 deletion Extensions/Versioning/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,4 +313,5 @@ stages:
parameters:
buildNumber: $(Build.BuildNumber)
extensionName: $(Build.DefinitionName)
mastodonkey: $(mastodonkey)
mastodonUrl: $(mastodonurl)
mastodonKey: $(mastodonkey)
3 changes: 2 additions & 1 deletion Extensions/WikiPDFExport/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,5 @@ stages:
parameters:
buildNumber: $(Build.BuildNumber)
extensionName: $(Build.DefinitionName)
mastodonkey: $(mastodonkey)
mastodonUrl: $(mastodonurl)
mastodonKey: $(mastodonkey)
3 changes: 2 additions & 1 deletion Extensions/WikiUpdater/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -445,4 +445,5 @@ stages:
parameters:
buildNumber: $(Build.BuildNumber)
extensionName: $(Build.DefinitionName)
mastodonkey: $(mastodonkey)
mastodonUrl: $(mastodonurl)
mastodonKey: $(mastodonkey)
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,6 @@ stages:
parameters:
buildNumber: $(Build.BuildNumber)
extensionName: $(Build.DefinitionName)
mastodonkey: $(mastodonkey)
mastodonUrl: $(mastodonurl)
mastodonKey: $(mastodonkey)

3 changes: 2 additions & 1 deletion Extensions/YamlGenerator/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,5 @@ stages:
parameters:
buildNumber: $(Build.BuildNumber)
extensionName: $(Build.DefinitionName)
mastodonkey: $(mastodonkey)
mastodonUrl: $(mastodonurl)
mastodonKey: $(mastodonkey)
6 changes: 4 additions & 2 deletions YAMLTemplates/post-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ parameters:
type: string
- name: extensionName
type: string
- name: mastodonkey
- name: mastodonUrl
type: string
- name: mastodonKey
type: string

steps:
Expand All @@ -27,5 +29,5 @@ steps:

- powershell: |
Write-Host "Posting to Mastodon"
Invoke-WebRequest -Uri https://techhub.social/api/v1/statuses -Method POST -Headers @{Authorization='Bearer ${{parameters.mastodonkey}}'} -Body @{status='I have just released Version ${{parameters.buildNumber}} of my Azure DevOps Pipeline ${{parameters.extensionName}} http://bit.ly/VSTS-RF $(OutputedText)'}
Invoke-WebRequest -Uri ${{parameters.mastodonUrl}}/api/v1/statuses -Method POST -Headers @{Authorization='Bearer ${{parameters.mastodonKey}}'} -Body @{status='I have just released Version ${{parameters.buildNumber}} of my Azure DevOps Pipeline ${{parameters.extensionName}} http://bit.ly/VSTS-RF $(OutputedText)'}
displayName: 'Posting to Mastodon about new release'

0 comments on commit 1ca0b2c

Please sign in to comment.