Prevent useless builds and update azure pipelines

pull/4054/head
Bogdan 9 months ago
parent b0afd1a784
commit 21cc0530f3

@ -27,6 +27,10 @@ trigger:
include: include:
- develop - develop
- master - master
paths:
exclude:
- .github
- src/Lidarr.Api.*/openapi.json
pr: pr:
branches: branches:
@ -34,6 +38,7 @@ pr:
- develop - develop
paths: paths:
exclude: exclude:
- .github
- src/NzbDrone.Core/Localization/Core - src/NzbDrone.Core/Localization/Core
- src/Lidarr.Api.*/openapi.json - src/Lidarr.Api.*/openapi.json
@ -392,6 +397,7 @@ stages:
displayName: Unit Tests displayName: Unit Tests
dependsOn: Build_Backend dependsOn: Build_Backend
condition: succeeded() condition: succeeded()
jobs: jobs:
- job: Prepare - job: Prepare
pool: pool:
@ -459,7 +465,7 @@ stages:
- bash: | - bash: |
chmod a+x _tests/fpcalc chmod a+x _tests/fpcalc
displayName: Make fpcalc Executable displayName: Make fpcalc Executable
condition: and(succeeded(), or(eq(variables['osName'], 'Mac'), eq(variables['testName'], 'linux-x64'))) condition: and(succeeded(), and(ne(variables['osName'], 'Windows'), ne(variables['poolName'], 'FreeBSD')))
- bash: find ${TESTSFOLDER} -name "Lidarr.Test.Dummy" -exec chmod a+x {} \; - bash: find ${TESTSFOLDER} -name "Lidarr.Test.Dummy" -exec chmod a+x {} \;
displayName: Make Test Dummy Executable displayName: Make Test Dummy Executable
condition: and(succeeded(), ne(variables['osName'], 'Windows')) condition: and(succeeded(), ne(variables['osName'], 'Windows'))
@ -518,9 +524,11 @@ stages:
artifactName: $(artifactName) artifactName: $(artifactName)
targetPath: $(testsFolder) targetPath: $(testsFolder)
- bash: | - bash: |
find ${TESTSFOLDER} -name "Lidarr.Test.Dummy" -exec chmod a+x {} \;
chmod a+x _tests/fpcalc chmod a+x _tests/fpcalc
displayName: Make fpcalc and Test Dummy Executable displayName: Make fpcalc Executable
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
- bash: find ${TESTSFOLDER} -name "Lidarr.Test.Dummy" -exec chmod a+x {} \;
displayName: Make Test Dummy Executable
condition: and(succeeded(), ne(variables['osName'], 'Windows')) condition: and(succeeded(), ne(variables['osName'], 'Windows'))
- bash: | - bash: |
chmod a+x ${TESTSFOLDER}/test.sh chmod a+x ${TESTSFOLDER}/test.sh
@ -576,6 +584,7 @@ stages:
-e POSTGRES_PASSWORD=lidarr \ -e POSTGRES_PASSWORD=lidarr \
-e POSTGRES_USER=lidarr \ -e POSTGRES_USER=lidarr \
-p 5432:5432/tcp \ -p 5432:5432/tcp \
-v /usr/share/zoneinfo/America/Chicago:/etc/localtime:ro \
postgres:14 postgres:14
displayName: Start postgres displayName: Start postgres
- bash: | - bash: |
@ -651,6 +660,7 @@ stages:
- stage: Integration - stage: Integration
displayName: Integration displayName: Integration
dependsOn: Packages dependsOn: Packages
jobs: jobs:
- job: Prepare - job: Prepare
pool: pool:
@ -1055,6 +1065,7 @@ stages:
dependsOn: dependsOn:
- Setup - Setup
displayName: Analyze displayName: Analyze
jobs: jobs:
- job: Prepare - job: Prepare
pool: pool:
@ -1152,10 +1163,9 @@ stages:
git config --global user.name "Servarr" git config --global user.name "Servarr"
git checkout -b api-docs git checkout -b api-docs
git add . git add .
git status if git status | grep -q modified
if git status | grep modified
then then
git commit -am 'Automated API Docs update [skip ci]' git commit -am 'Automated API Docs update'
git push -f --set-upstream origin api-docs git push -f --set-upstream origin api-docs
curl -X POST -H "Authorization: token ${GITHUBTOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/lidarr/lidarr/pulls -d '{"head":"api-docs","base":"develop","title":"Update API docs"}' curl -X POST -H "Authorization: token ${GITHUBTOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/lidarr/lidarr/pulls -d '{"head":"api-docs","base":"develop","title":"Update API docs"}'
else else
@ -1261,3 +1271,4 @@ stages:
DISCORDCHANNELID: $(discordChannelId) DISCORDCHANNELID: $(discordChannelId)
DISCORDWEBHOOKKEY: $(discordWebhookKey) DISCORDWEBHOOKKEY: $(discordWebhookKey)
DISCORDTHREADID: $(discordThreadId) DISCORDTHREADID: $(discordThreadId)

Loading…
Cancel
Save