Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into add-common-sanitizers
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd committed Apr 17, 2024
2 parents eca14ae + 93565cb commit f4df80a
Show file tree
Hide file tree
Showing 68 changed files with 1,782 additions and 969 deletions.
1 change: 0 additions & 1 deletion doc/common/TypeSpec-Project-Scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ additionalDirectories:
- specification/cognitiveservices/OpenAI.Authoring
commit: 14f11cab735354c3e253045f7fbd2f1b9f90f7ca
repo: Azure/azure-rest-api-specs
cleanup: false
```
## TypeSpec-Project-Process.ps1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ steps:
-RepoFullName $(Build.Repository.Name)
-APIViewUri $(ApiChangeDetectRequestUrl)
-ArtifactName ${{ parameters.ArtifactName }}
-DevopsProject $(System.TeamProject)
pwsh: true
displayName: Detect API changes
condition: and(succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest'))
18 changes: 12 additions & 6 deletions eng/common/pipelines/templates/steps/policheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ parameters:
ExclusionDataBaseFileName: ''
TargetDirectory: ''
PublishAnalysisLogs: false
PoliCheckBlobSAS: "$(azuresdk-policheck-blob-SAS)"
ExclusionFilePath: "$(Build.SourcesDirectory)/eng/guardian-tools/policheck/PolicheckExclusions.xml"

steps:
- pwsh: |
azcopy copy "https://azuresdkartifacts.blob.core.windows.net/policheck/${{ parameters.ExclusionDataBaseFileName }}.mdb?${{ parameters.PoliCheckBlobSAS }}" `
"$(Build.BinariesDirectory)"
displayName: 'Download PoliCheck Exclusion Database'
- task: AzurePowerShell@5
displayName: 'Download Policheck Exclusion Database'
inputs:
azureSubscription: 'Azure SDK Artifacts'
ScriptType: 'InlineScript'
azurePowerShellVersion: LatestVersion
pwsh: true
Inline: |
azcopy copy "https://azuresdkartifacts.blob.core.windows.net/policheck/${{ parameters.ExclusionDataBaseFileName }}.mdb" "$(Build.BinariesDirectory)"
env:
AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED'

- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@2
displayName: 'Run PoliCheck'
Expand All @@ -33,4 +39,4 @@ steps:

- ${{ if eq(parameters.PublishAnalysisLogs, 'true') }}:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3
displayName: 'Publish Security Analysis Logs'
displayName: 'Publish Security Analysis Logs'
2 changes: 2 additions & 0 deletions eng/common/scripts/Create-APIReview.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function Upload-SourceArtifact($filePath, $apiLabel, $releaseStatus, $packageVer
try
{
$Response = Invoke-WebRequest -Method 'POST' -Uri $uri -Body $multipartContent -Headers $headers
Write-Host "API review: $($Response.Content)"
$StatusCode = $Response.StatusCode
}
catch
Expand Down Expand Up @@ -114,6 +115,7 @@ function Upload-ReviewTokenFile($packageName, $apiLabel, $releaseStatus, $review
try
{
$Response = Invoke-WebRequest -Method 'GET' -Uri $uri -Headers $headers
Write-Host "API review: $($Response.Content)"
$StatusCode = $Response.StatusCode
}
catch
Expand Down
5 changes: 4 additions & 1 deletion eng/common/scripts/Detect-Api-Changes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Param (
[string] $APIViewUri,
[string] $RepoFullName = "",
[string] $ArtifactName = "packages",
[string] $TargetBranch = ("origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" -replace "refs/heads/")
[string] $TargetBranch = ("origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" -replace "refs/heads/"),
[string] $DevopsProject = "internal"
)

. (Join-Path $PSScriptRoot common.ps1)
Expand All @@ -37,6 +38,7 @@ function Submit-Request($filePath, $packageName)
$query.Add('pullRequestNumber', $PullRequestNumber)
$query.Add('packageName', $packageName)
$query.Add('language', $LanguageShort)
$query.Add('project', $DevopsProject)
$reviewFileFullName = Join-Path -Path $ArtifactPath $packageName $reviewFileName
if (Test-Path $reviewFileFullName)
{
Expand Down Expand Up @@ -87,6 +89,7 @@ function Log-Input-Params()
Write-Host "Language: $($Language)"
Write-Host "Commit SHA: $($CommitSha)"
Write-Host "Repo Name: $($RepoFullName)"
Write-Host "Project: $($DevopsProject)"
}

Log-Input-Params
Expand Down
17 changes: 12 additions & 5 deletions eng/pipelines/githubio-linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
-inputCacheFile "$(cachefile)"
-outputCacheFile "$(cachefile)"
-devOpsLogging: $true
- task: PowerShell@2
displayName: 'tools link check'
condition: succeededOrFailed()
Expand All @@ -111,7 +111,14 @@ jobs:
condition: succeededOrFailed()
displayName: Upload verified links

- pwsh: |
azcopy copy '$(cachefile)' 'https://azuresdkartifacts.blob.core.windows.net/verify-links-cache$(azuresdkartifacts-verify-links-cache-sas)'
condition: succeededOrFailed()
displayName: Upload cache file to blob container
- task: AzurePowerShell@5
displayName: 'Upload cache file to blob container'
inputs:
azureSubscription: 'Azure SDK Artifacts'
ScriptType: 'InlineScript'
azurePowerShellVersion: LatestVersion
pwsh: true
Inline: |
azcopy copy '$(cachefile)' 'https://azuresdkartifacts.blob.core.windows.net/verify-links-cache'
env:
AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED'
2 changes: 1 addition & 1 deletion eng/pipelines/templates/steps/sdk-testgen-set-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:
displayName: "Install Node.js"
- task: GoTool@0
inputs:
version: '1.16.7'
version: '1.22.1'
displayName: "Install Go"
- script: |
npm install -g "@microsoft/rush"
Expand Down
14 changes: 13 additions & 1 deletion packages/java-packages/codesnippet-maven-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Release History

## 1.0.0-beta.10 (2024-04-15)

### Bugs Fixed

- Downgraded Maven prerequisite version to `3.6.3` to prevent compatibility issues with older versions of Maven.

## 1.0.0-beta.9 (2024-04-15)

### Other Changes

- Updated Maven versions used in the plugin.

## 1.0.0-beta.8 (2022-08-18)

### Features Added
Expand Down Expand Up @@ -83,4 +95,4 @@

### Features Added

- Initial release of `codesnippet-maven-plugin`.
- Initial release of `codesnippet-maven-plugin`.
2 changes: 1 addition & 1 deletion packages/java-packages/codesnippet-maven-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ First, reference the plugin in your maven project's `pom.xml` file.
<plugin>
<groupId>com.azure.tools</groupId>
<artifactId>codesnippet-maven-plugin</artifactId>
<version>1.0.0-beta.8</version>
<version>1.0.0-beta.10</version>
<configuration>
<codesnippetGlob>**/src/samples/java/**/*.java</codesnippetGlob>
<codesnippetRootDirectory>${project.basedir}/src/samples/java</codesnippetRootDirectory>
Expand Down
50 changes: 25 additions & 25 deletions packages/java-packages/codesnippet-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.azure.tools</groupId>
<artifactId>codesnippet-maven-plugin</artifactId>
<version>1.0.0-beta.8</version>
<version>1.0.0-beta.10</version>
<packaging>maven-plugin</packaging>

<name>Codesnippet Maven Plugin</name>
Expand Down Expand Up @@ -45,14 +45,14 @@
</scm>

<prerequisites>
<maven>${maven.version}</maven>
<maven>3.6.3</maven>
</prerequisites>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.version>3.6.3</maven.version>
<maven.version>3.9.6</maven.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -83,32 +83,32 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.1</version>
<version>3.12.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>3.3.0</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>1.34</version> <!-- {x-version-update;org.openjdk.jmh:jmh-core;external_dependency} -->
<version>1.37</version> <!-- {x-version-update;org.openjdk.jmh:jmh-core;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>1.34</version> <!-- {x-version-update;org.openjdk.jmh:jmh-generator-annprocess;external_dependency} -->
<version>1.37</version> <!-- {x-version-update;org.openjdk.jmh:jmh-generator-annprocess;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -123,35 +123,35 @@
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<version>3.3.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.13.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<version>3.2.5</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<version>3.1.1</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>3.1.1</version>
</plugin>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.1.0</version>
<version>3.6.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
<version>3.12.0</version>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
Expand All @@ -174,7 +174,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<version>3.6.3</version>
<configuration>
<source>1.8</source>
<linksource>false</linksource>
Expand All @@ -185,7 +185,7 @@
</links>
<detectJavaApiLink>false</detectJavaApiLink>
<failOnError>true</failOnError>
<failOnWarnings>true</failOnWarnings>
<failOnWarnings>false</failOnWarnings>
<doclint>all</doclint>
<quiet>true</quiet>
</configuration>
Expand All @@ -202,14 +202,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<version>3.3.0</version>
</plugin>

<!-- Copy the pom file to output -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version> <!-- {x-version-update;org.apache.maven.plugins:maven-antrun-plugin;external_dependency} -->
<version>3.1.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-antrun-plugin;external_dependency} -->
<executions>
<execution>
<id>copy</id>
Expand All @@ -230,7 +230,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-source-plugin;external_dependency} -->
<version>3.3.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-source-plugin;external_dependency} -->
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -247,7 +247,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<version>3.3.1</version>
<configuration>
<outputDirectory>${basedir}/target/test-classes</outputDirectory>
<resources>
Expand Down
Loading

0 comments on commit f4df80a

Please sign in to comment.