Skip to content

Commit

Permalink
Updated the publisher and release pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Wael Kdouh committed Dec 2, 2022
1 parent b0708e2 commit ac932a0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 11 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/create_github_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,26 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: artifacts
path: ${{ GITHUB.WORKSPACE }}/finalartifacts
path: ${{ GITHUB.WORKSPACE }}/finalartifacts


Generate_Release:
needs: Generate_Artifacts
runs-on: [ubuntu-latest]
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: artifacts
path: ${{ GITHUB.WORKSPACE }}/finalartifacts
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
${{github.workspace}}/finalartifacts/extractor
${{github.workspace}}/finalartifacts/publisher
${{github.workspace}}/finalartifacts/Azure_DevOps.zip
${{github.workspace}}/finalartifacts/Github.zip
name: APIOps Toolkit for Azure APIM ${{ github.event.inputs.Release_Version }}
tag_name: ${{ github.event.inputs.Release_Version }}
generate_release_notes: true
22 changes: 12 additions & 10 deletions tools/azdo_pipelines/run-publisher-with-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ steps:
- 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
displayName: 'Lint API definition'

- task: UniversalPackages@0
displayName: Download publisher
inputs:
downloadDirectory: '$(Pipeline.Workspace)/publisher'
vstsFeed: $(System.TeamProject)/$(ARTIFACTS_FEED_NAME)
vstsFeedPackage: 'publisher'
vstsPackageVersion: '*'

- task: AzureCLI@2
displayName: Set publishing variables
inputs:
Expand Down Expand Up @@ -76,6 +68,16 @@ steps:
tokenPrefix: "{#"
tokenSuffix: "#}"

- task: Bash@3
displayName: Fetch publisher
inputs:
targetType: 'inline'
script: |
wget https://github.com/Azure/apiops/releases/download/$(apiops_release_version)/publisher
result=$?
echo "Exit code is $result"
exit $result
failOnStderr: false

- task: AzureCLI@2
displayName: Run publisher for ${{ parameters.ENVIRONMENT}} environment
Expand All @@ -84,8 +86,8 @@ steps:
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
chmod u+x $(Pipeline.Workspace)/publisher/publisher
$(Pipeline.Workspace)/publisher/publisher
chmod +x ./publisher
./publisher
result=$?
echo "Exit code is $result"
exit $result
Expand Down

0 comments on commit ac932a0

Please sign in to comment.