Check for SNAPSHOT dependencies before release

This commit is contained in:
dotasek 2024-08-28 11:20:22 -04:00
parent 1e5cb4da49
commit bc974b75f8
2 changed files with 43 additions and 1 deletions

30
pom.xml
View File

@ -779,6 +779,36 @@
</plugins>
</build>
</profile>
<profile>
<id>checkForSnapshotDependencies</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>checkForSnapshotDependencies</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<skip>false</skip>
<rules>
<requireJavaVersion>
<version>(11,)</version>
</requireJavaVersion>
<requireReleaseDeps>
<message>No Snapshots Allowed!</message>
</requireReleaseDeps>
</rules>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>OWASP_CHECK</id>
<build>

View File

@ -10,6 +10,18 @@ variables:
VERSION:
jobs:
- job: check_all_dependencies_are_releases
timeoutInMinutes: 5
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
options: '-DcheckForSnapshotDependencies'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'enforcer:enforce'
- job: check_release_notes
timeoutInMinutes: 5
steps:
@ -119,7 +131,7 @@ jobs:
# is that once we pull the code, it won't change again on this branch until the release is complete. We
# want to fail fast if there is an issue, and avoid running the tests more than once so it doesn't take all day.
timeoutInMinutes: 360
dependsOn: ['get_release_version', 'get_branch_id', 'check_release_notes']
dependsOn: ['get_release_version', 'get_branch_id', 'check_release_notes', 'check_all_dependencies_are_releases']
variables:
version_from_pom: $[ dependencies.get_release_version.outputs['setOutput.version_from_pom'] ]
steps: