mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
try fixing directory
This commit is contained in:
parent
ad2fe9290e
commit
4f07a1cc43
1 changed files with 14 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ jobs:
|
|||
- task: Bash@3
|
||||
displayName: checkout source branch
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
script: |
|
||||
FORKURI=$(curl -X GET "https://api.github.com/repos/$BUILD_REPOSITORY_NAME/pulls/$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER" | jq -r '.head.repo.clone_url')
|
||||
git clone "$FORKURI" .
|
||||
|
|
@ -35,6 +36,7 @@ jobs:
|
|||
env:
|
||||
GITHUBNAME: $(GITHUBNAME)
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
script: |
|
||||
LASTAUTHOR=$(git log -n 1 --pretty=format:"%an")
|
||||
LASTMSG=$(git log -n 1 --pretty=format:"%s")
|
||||
|
|
@ -76,7 +78,7 @@ jobs:
|
|||
env:
|
||||
GITHUBNAME: $(GITHUBNAME)
|
||||
inputs:
|
||||
workingDirectory: server/src
|
||||
workingDirectory: $(Build.SourcesDirectory)/server/src
|
||||
script: |
|
||||
MIGLIST=$(dotnet ef migrations list -p FilterLists.Data.Migrations -s FilterLists.Api)
|
||||
echo "$MIGLIST"
|
||||
|
|
@ -89,6 +91,7 @@ jobs:
|
|||
- task: Bash@3
|
||||
displayName: merge upstream data
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
script: |
|
||||
git remote add upstream https://github.com/collinbarrett/FilterLists.git
|
||||
git fetch upstream
|
||||
|
|
@ -105,12 +108,13 @@ jobs:
|
|||
- task: CmdLine@2
|
||||
displayName: add migration
|
||||
inputs:
|
||||
workingDirectory: server/src
|
||||
workingDirectory: $(Build.SourcesDirectory)/server/src
|
||||
script: dotnet ef migrations add $(System.PullRequest.PullRequestNumber) -p FilterLists.Data.Migrations -s FilterLists.Api
|
||||
|
||||
- task: Bash@3
|
||||
displayName: commit or abandon migration
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
script: |
|
||||
DIFF=$(git status -s | wc -l)
|
||||
echo "$DIFF file(s) changed"
|
||||
|
|
@ -132,30 +136,35 @@ jobs:
|
|||
- task: DockerCompose@0
|
||||
displayName: build test-data
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
dockerComposeFile: docker-compose.data.tests.yml
|
||||
dockerComposeCommand: build api
|
||||
|
||||
- task: Docker@2
|
||||
displayName: create volume test-data-results
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
command: volume
|
||||
arguments: create test-data-results
|
||||
|
||||
- task: DockerCompose@0
|
||||
displayName: up test-data db
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
dockerComposeFile: docker-compose.data.tests.yml
|
||||
dockerComposeCommand: up -d mariadb
|
||||
|
||||
- task: DockerCompose@0
|
||||
displayName: run test-data
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
dockerComposeFile: docker-compose.data.tests.yml
|
||||
dockerComposeCommand: run api
|
||||
|
||||
- task: Docker@2
|
||||
displayName: create container test-data-results
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
command: container
|
||||
arguments: create --name test-data-results -v test-data-results:/results hello-world
|
||||
condition: succeededOrFailed()
|
||||
|
|
@ -163,6 +172,7 @@ jobs:
|
|||
- task: Docker@2
|
||||
displayName: copy out test-data results
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
command: cp
|
||||
arguments: test-data-results:/results $(System.DefaultWorkingDirectory)
|
||||
condition: succeededOrFailed()
|
||||
|
|
@ -170,6 +180,7 @@ jobs:
|
|||
- task: PublishTestResults@2
|
||||
displayName: publish test results
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
testResultsFormat: VSTest
|
||||
testResultsFiles: "**/*.trx"
|
||||
condition: succeededOrFailed()
|
||||
|
|
@ -185,6 +196,7 @@ jobs:
|
|||
env:
|
||||
GITHUBPAT: $(GITHUBPAT)
|
||||
inputs:
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
script: |
|
||||
git config --global credential.helper store
|
||||
echo "https://$GITHUBPAT:x-oauth-basic@github.com" >> ~/.git-credentials
|
||||
|
|
|
|||
Loading…
Reference in a new issue