Skip to content

Commit

Permalink
Fix Monitor ci.yml (#35765)
Browse files Browse the repository at this point in the history
* Fix the formatting of Monitor ci.yml

* Fix missing booleans

* Fix safe name

* Fix the group IDs

* Fix artifactId

* A few more fixes

* Fix Javadocs and README verification

* Fix CHANGELOG
  • Loading branch information
alzimmermsft committed Jul 6, 2023
1 parent c5d092a commit 7baeb72
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 28 deletions.
1 change: 1 addition & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"Onco",
"onenote",
"openai",
"Pnative",
"premf",
"pwsh",
"protonj",
Expand Down
1 change: 1 addition & 0 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ known_content_issues:
- ['sdk/keyvault/README.md', '#3113']
- ['sdk/keyvault/azure-security-keyvault-administration/README.md', '#3113']
- ['sdk/loganalytics/microsoft-azure-loganalytics/README.md', '#3113']
- ['sdk/monitor/azure-monitor-spring-native/README.md', '#3113']
- ['sdk/parents/azure-client-sdk-parent/README.md', '#3113']
- ['sdk/parents/azure-code-customization-parent/README.md', '#3113']
- ['sdk/parents/azure-perf-test-parent/README.md', '#3113']
Expand Down
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ com.azure:azure-communication-email;1.0.3;1.1.0-beta.1
com.azure:azure-developer-loadtesting;1.0.3;1.1.0-beta.1
com.azure:azure-identity-extensions;1.1.5;1.2.0-beta.2
com.azure:azure-analytics-purview-sharing;1.0.0-beta.2;1.0.0-beta.3
com.azure.spring:applicationinsights-spring-native;1.0.0-beta.1;1.0.0-beta.1
com.azure.spring:azure-monitor-spring-native;1.0.0-beta.1;1.0.0-beta.1
com.azure.spring:azure-monitor-spring-native-test;1.0.0-beta.1;1.0.0-beta.1
com.azure.spring:spring-cloud-azure-appconfiguration-config-web;4.9.0;4.10.0-beta.1
com.azure.spring:spring-cloud-azure-appconfiguration-config;4.9.0;4.10.0-beta.1
Expand Down
90 changes: 88 additions & 2 deletions sdk/monitor/azure-monitor-spring-native-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<dependencies>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>applicationinsights-spring-native</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure.spring:applicationinsights-spring-native;dependency} -->
<artifactId>azure-monitor-spring-native</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-monitor-spring-native;dependency} -->
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -48,4 +48,90 @@
</dependency>
</dependencies>

<profiles>
<!-- Library cannot build for Java 17 and below -->
<profile>
<id>belowJava17</id>
<activation>
<jdk>[,17)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.9</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-compiler-plugin;external_dependency} -->
<configuration>
<skipMain>true</skipMain>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-javadoc-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version> <!-- {x-version-update;org.apache.maven.plugins:maven-jar-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version> <!-- {x-version-update;org.apache.maven.plugins:maven-checkstyle-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.2.2</version> <!-- {x-version-update;com.github.spotbugs:spotbugs-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.revapi</groupId>
<artifactId>revapi-maven-plugin</artifactId>
<version>0.14.6</version> <!-- {x-version-update;org.revapi:revapi-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
10 changes: 10 additions & 0 deletions sdk/monitor/azure-monitor-spring-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# Release History

## 1.0.0-beta.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
4 changes: 2 additions & 2 deletions sdk/monitor/azure-monitor-spring-native/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Application Insights for Spring native
# Azure Monitor Spring native library for Java

This project allows providing telemetry data to Azure Monitor for Spring Boot applications packaged as GraalVM native images.

Expand All @@ -19,7 +19,7 @@ For more information, please read [introduction to Application Insights][applica
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>applicationinsights-spring-native</artifactId>
<artifactId>azure-monitor-spring-native</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
Expand Down
77 changes: 73 additions & 4 deletions sdk/monitor/azure-monitor-spring-native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
<maven.compiler.target>${jdk.version}</maven.compiler.target>
<maven.compiler.testSource>${jdk-test.version}</maven.compiler.testSource>
<maven.compiler.testTarget>${jdk-test.version}</maven.compiler.testTarget>
<maven.javadoc.skip>true
</maven.javadoc.skip> <!-- For the Application Insights Spring Boot starter for Spring native, users have only to declare the starter dependency. Users won't manipulate the Java classes of this Spring Boot starter. -->
</properties>

<groupId>com.azure.spring</groupId>
<artifactId>applicationinsights-spring-native</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure.spring:applicationinsights-spring-native;current} -->
<artifactId>azure-monitor-spring-native</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-monitor-spring-native;current} -->

<distributionManagement>
<site>
Expand Down Expand Up @@ -85,6 +83,77 @@
</rules>
</configuration>
</plugin>

<!-- START: Empty Java Doc -->
<!-- The following code will generate an empty javadoc with just a README.md. This is necessary
to pass the required checks on Maven. The way this works is by setting the classesDirectory
to a directory that only contains the README.md, which we need to copy. If the classesDirectory
is set to the root, where the README.md lives, it still won't have javadocs but the jar file
will contain a bunch of files that shouldn't be there. The faux sources directory is deleted
and recreated with the README.md being copied every time to guarantee that, when building locally,
it'll have the latest copy of the README.md file.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-javadoc-plugin;external_dependency} -->
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version> <!-- {x-version-update;org.apache.maven.plugins:maven-jar-plugin;external_dependency} -->
<executions>
<execution>
<id>empty-javadoc-jar-with-readme</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>javadoc</classifier>
<classesDirectory>${project.basedir}/javadocTemp</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-antrun-plugin;external_dependency} -->
<executions>
<execution>
<id>copy-readme-to-javadocTemp</id>
<phase>prepare-package</phase>
<configuration>
<target>
<echo>Deleting existing ${project.basedir}/javadocTemp</echo>
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${project.basedir}/javadocTemp"/>
</delete>
<echo>Copying ${project.basedir}/README.md to
${project.basedir}/javadocTemp/README.md
</echo>
<copy file="${project.basedir}/README.md" tofile="${project.basedir}/javadocTemp/README.md"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- END: Empty Java Doc -->
</plugins>
</build>

Expand Down
33 changes: 14 additions & 19 deletions sdk/monitor/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@ trigger:
- release/*
paths:
include:
- sdk/monitor/ci.yml
- sdk/monitor/azure-monitor-ingestion/
- sdk/monitor/azure-monitor-opentelemetry-exporter/
- sdk/monitor/azure-monitor-spring-native/
- sdk/monitor/azure-monitor-query/
- sdk/monitor/
exclude:
- sdk/monitor/pom.xml
- sdk/monitor/azure-monitor-ingestion/pom.xml
- sdk/monitor/azure-monitor-ingestion-perf/pom.xml
- sdk/monitor/azure-monitor-opentelemetry-exporter/pom.xml
- sdk/monitor/azure-monitor-spring-native/pom.xml
- sdk/monitor/azure-monitor-query/pom.xml
- sdk/monitor/azure-monitor-query-perf/pom.xml
- sdk/monitor/azure-monitor-spring-native/pom.xml
- sdk/monitor/azure-monitor-spring-native-test/pom.xml

pr:
branches:
Expand All @@ -31,16 +27,15 @@ pr:
- release/*
paths:
include:
- sdk/monitor/ci.yml
- sdk/monitor/azure-monitor-ingestion/
- sdk/monitor/azure-monitor-opentelemetry-exporter/
- sdk/monitor/azure-monitor-spring-native/
- sdk/monitor/azure-monitor-query/
- sdk/monitor/
exclude:
- sdk/monitor/pom.xml
- sdk/monitor/azure-monitor-ingestion/pom.xml
- sdk/monitor/azure-monitor-ingestion-perf/pom.xml
- sdk/monitor/azure-monitor-opentelemetry-exporter/pom.xml
- sdk/monitor/azure-monitor-spring-native/pom.xml
- sdk/monitor/azure-monitor-query/pom.xml
- sdk/monitor/azure-monitor-query-perf/pom.xml
- sdk/monitor/azure-monitor-spring-native/pom.xml
- sdk/monitor/azure-monitor-spring-native-test/pom.xml

parameters:
- name: release_dependsonlivetests
Expand All @@ -54,11 +49,11 @@ parameters:
- name: release_azuremonitoropentelemetryexporter
displayName: 'azure-monitor-opentelemetry-exporter'
type: boolean
default:
default: true
- name: release_azuremonitorspringnative
displayName: 'azure-monitor-azure-monitor-spring-native'
displayName: 'azure-monitor-spring-native'
type: boolean
default:
default: true
- name: release_azuremonitorquery
displayName: 'azure-monitor-query'
type: boolean
Expand All @@ -79,7 +74,7 @@ extends:
safeName: azuremonitoropentelemetryexporter
releaseInBatch: ${{ parameters.release_azuremonitoropentelemetryexporter }}
- name: azure-monitor-spring-native
groupId: com.azure
groupId: com.azure.spring
safeName: azuremonitorspringnative
releaseInBatch: ${{ parameters.release_azuremonitorspringnative }}
- name: azure-monitor-query
Expand All @@ -88,7 +83,7 @@ extends:
releaseInBatch: ${{ parameters.release_azuremonitorquery }}
AdditionalModules:
- name: azure-monitor-spring-native-test
groupId: com.azure
groupId: com.azure.spring
- name: azure-monitor-query-perf
groupId: com.azure
- name: azure-monitor-ingestion-perf
Expand Down

0 comments on commit 7baeb72

Please sign in to comment.