Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run dependency checker during Analyze #3075

Merged
merged 2 commits into from
Mar 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .azure-pipelines/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,28 @@ jobs:
publishJUnitResults: false
goals: 'site:site site:stage'

- script: |
git clone https://github.com/JonathanGiles/DependencyChecker.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsiegel @mitchdenny should we be publishing this package instead of cloning the repo during our builds?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in general we should download tools that are published either to GH releases, or public registries (depending on what the tools are/do).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked @JonathanGiles this exact question, his opinion at the time was that it was best to pull from source.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think we will want to consume this via a published package at some point. We have the azure-sdk-tools repo specifically for produce such tool packages.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I filed Azure/azure-sdk-tools#44 as a follow-up on this.

mkdir input && cp dependencies.json input/
displayName: 'Download dependency checker'

- task: Maven@3
displayName: 'Analyze dependencies'
inputs:
mavenPomFile: 'DependencyChecker/pom.xml'
options: '-Dexec.args="-showall"'
mavenOptions: '$(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'clean package exec:java'

- powershell: |
copy -r target/staging $(Build.ArtifactStagingDirectory)
copy eng/code-quality-reports/src/main/resources/index.html $(Build.ArtifactStagingDirectory)
copy eng/spotbugs-aggregate-report/target/spotbugs/spotbugsXml.html (Join-Path $(Build.ArtifactStagingDirectory) "staging")
copy output/dependencies.html (Join-Path $(Build.ArtifactStagingDirectory) "staging")
displayName: 'Copy reports to artifact staging'

- task: PublishBuildArtifacts@1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| Component | Build Status |
| --------- | ------------ |
| Management Libraries | [![Build Status](https://travis-ci.org/Azure/azure-sdk-for-java.svg?branch=master)](https://travis-ci.org/Azure/azure-sdk-for-java) |
| Client Libraries | [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/17?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=17) |
| Client Libraries | [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/17?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=17)<br>[![Build Documentation](https://img.shields.io/badge/documentation-published-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java/index.html)|

:+1: [Try Azure for FREE](http://go.microsoft.com/fwlink/?LinkId=330212)

Expand Down
6 changes: 6 additions & 0 deletions dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"projectName": "azure-sdk-for-java",
"pomUrls": ["file:./pom.client.xml"]
}
]
4 changes: 4 additions & 0 deletions eng/code-quality-reports/src/main/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,10 @@ <h2>Azure Java SDK</h2>
<ion-icon name="book"></ion-icon>
<a href="staging/index.html" target="_blank" class="links">Maven Site</a>
</li>
<li class="list-group-item sub-component">
<ion-icon name="clipboard"></ion-icon>
<a href="staging/dependencies.html" target="_blank" class="links">Dependencies</a>
</li>
<li class="list-group-item sub-component">
<ion-icon name="bug"></ion-icon>
<a href="staging/spotbugsXml.html" target="_blank" class="links">SpotBugs (Aggregate)</a>
Expand Down