Skip to content

Commit

Permalink
Update azure-pipelines.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dimtsap authored Mar 22, 2021
1 parent 64313aa commit fe5a473
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pr:
include:
- master
- Development
- feature/Restructuring

pool:
vmImage: "macOS-latest"
Expand Down Expand Up @@ -55,7 +54,7 @@ steps:
# condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
- task: SonarCloudPrepare@1
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/master'),eq(variables['Build.SourceBranch'], 'refs/heads/Development'),eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/feature/Restructuring'))
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/master'),eq(variables['Build.SourceBranch'], 'refs/heads/Development'),eq(variables['Build.Reason'], 'PullRequest'))
inputs:
SonarCloud: 'SonarCloud.UQpy'
organization: 'jhusurg'
Expand Down Expand Up @@ -97,10 +96,10 @@ steps:
additionalCodeCoverageFiles: '$(System.DefaultWorkingDirectory)/ **'

- task: SonarCloudAnalyze@1
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/master'),eq(variables['Build.SourceBranch'], 'refs/heads/Development'),eq(variables['Build.Reason'], 'PullRequest'),eq(variables['Build.SourceBranch'], 'refs/heads/feature/Restructuring'))
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/master'),eq(variables['Build.SourceBranch'], 'refs/heads/Development'),eq(variables['Build.Reason'], 'PullRequest'))

- task: SonarCloudPublish@1
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/master'),eq(variables['Build.SourceBranch'], 'refs/heads/Development'),eq(variables['Build.Reason'], 'PullRequest'),eq(variables['Build.SourceBranch'], 'refs/heads/feature/Restructuring'))
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/master'),eq(variables['Build.SourceBranch'], 'refs/heads/Development'),eq(variables['Build.Reason'], 'PullRequest'))
inputs:
pollingTimeoutSec: '300'

Expand All @@ -124,8 +123,8 @@ steps:
publishLocation: 'Container'

- script: |
twine upload --repository-url https://test.pypi.org/legacy/ dist/* --username "$(TESTPYPIU)" --password "$(TESTPYPIP)"
displayName: Upload to Test PyPi
twine upload --repository-url https://upload.pypi.org/legacy/ dist/* --username "$(TESTPYPIU)" --password "$(TESTPYPIP)"
displayName: Upload to PyPi
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
- task: GitHubRelease@1
Expand All @@ -143,6 +142,10 @@ steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')

- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')

- bash: conda create --yes --quiet --name myEnvironment
displayName: Create Anaconda environment
Expand Down

0 comments on commit fe5a473

Please sign in to comment.