Skip to content

Commit ac932a0

Browse files
author
Wael Kdouh
committed
Updated the publisher and release pipelines
1 parent b0708e2 commit ac932a0

File tree

2 files changed

+35
-11
lines changed

2 files changed

+35
-11
lines changed

.github/workflows/create_github_release.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,26 @@ jobs:
7575
uses: actions/upload-artifact@v2
7676
with:
7777
name: artifacts
78-
path: ${{ GITHUB.WORKSPACE }}/finalartifacts
78+
path: ${{ GITHUB.WORKSPACE }}/finalartifacts
79+
80+
81+
Generate_Release:
82+
needs: Generate_Artifacts
83+
runs-on: [ubuntu-latest]
84+
steps:
85+
- name: Download artifacts
86+
uses: actions/download-artifact@v2
87+
with:
88+
name: artifacts
89+
path: ${{ GITHUB.WORKSPACE }}/finalartifacts
90+
- name: Release
91+
uses: softprops/action-gh-release@v1
92+
with:
93+
files: |
94+
${{github.workspace}}/finalartifacts/extractor
95+
${{github.workspace}}/finalartifacts/publisher
96+
${{github.workspace}}/finalartifacts/Azure_DevOps.zip
97+
${{github.workspace}}/finalartifacts/Github.zip
98+
name: APIOps Toolkit for Azure APIM ${{ github.event.inputs.Release_Version }}
99+
tag_name: ${{ github.event.inputs.Release_Version }}
100+
generate_release_notes: true

tools/azdo_pipelines/run-publisher-with-env.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ steps:
4040
- script: spectral lint "$(Build.SourcesDirectory)\${{ parameters.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }}\apis\*.{json,yml,yaml}" --ruleset https://raw.githubusercontent.com/connectedcircuits/devops-api-linter/main/rules.yaml
4141
displayName: 'Lint API definition'
4242

43-
- task: UniversalPackages@0
44-
displayName: Download publisher
45-
inputs:
46-
downloadDirectory: '$(Pipeline.Workspace)/publisher'
47-
vstsFeed: $(System.TeamProject)/$(ARTIFACTS_FEED_NAME)
48-
vstsFeedPackage: 'publisher'
49-
vstsPackageVersion: '*'
50-
5143
- task: AzureCLI@2
5244
displayName: Set publishing variables
5345
inputs:
@@ -76,6 +68,16 @@ steps:
7668
tokenPrefix: "{#"
7769
tokenSuffix: "#}"
7870

71+
- task: Bash@3
72+
displayName: Fetch publisher
73+
inputs:
74+
targetType: 'inline'
75+
script: |
76+
wget https://github.com/Azure/apiops/releases/download/$(apiops_release_version)/publisher
77+
result=$?
78+
echo "Exit code is $result"
79+
exit $result
80+
failOnStderr: false
7981

8082
- task: AzureCLI@2
8183
displayName: Run publisher for ${{ parameters.ENVIRONMENT}} environment
@@ -84,8 +86,8 @@ steps:
8486
scriptType: bash
8587
scriptLocation: inlineScript
8688
inlineScript: |
87-
chmod u+x $(Pipeline.Workspace)/publisher/publisher
88-
$(Pipeline.Workspace)/publisher/publisher
89+
chmod +x ./publisher
90+
./publisher
8991
result=$?
9092
echo "Exit code is $result"
9193
exit $result

0 commit comments

Comments
 (0)