Flatten ci-friendly revision when deploy (#12659)
This commit is contained in:
parent
88f38a41e5
commit
9eaced35de
|
|
@ -176,12 +176,12 @@ jobs:
|
|||
cache: "maven"
|
||||
- name: Build distribution tar
|
||||
run: |
|
||||
./mvnw clean install javadoc:javadoc -B -q -Pall \
|
||||
./mvnw clean flatten:flatten install javadoc:javadoc -B -q -Pall \
|
||||
-Dmaven.test.skip \
|
||||
-Dcheckstyle.skip \
|
||||
-Dgpg.skip
|
||||
- name: Verify builds are reproducible
|
||||
run: ./mvnw -Dmaven.test.skip clean verify artifact:compare -Pall -Dgpg.skip
|
||||
run: ./mvnw -Dmaven.test.skip clean flatten:flatten verify artifact:compare -Pall -Dgpg.skip
|
||||
- uses: actions/upload-artifact@v4
|
||||
name: Upload distribution tar
|
||||
with:
|
||||
|
|
@ -722,7 +722,7 @@ jobs:
|
|||
restore-keys: ${{ runner.os }}-maven-
|
||||
- name: Prepare test services
|
||||
shell: bash
|
||||
run: ./mvnw -B -q -f test/e2e-v2/java-test-service/pom.xml clean package
|
||||
run: ./mvnw -B -q -f test/e2e-v2/java-test-service/pom.xml clean flatten:flatten package
|
||||
- name: Set env var
|
||||
run: |
|
||||
echo "${{ matrix.test.env }}" >> $GITHUB_ENV
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/build/
|
||||
target/
|
||||
.idea/
|
||||
.flattened-pom.xml
|
||||
*.iml
|
||||
.classpath
|
||||
.project
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ git push origin v${RELEASE_VERSION}
|
|||
## Stage the release
|
||||
|
||||
```bash
|
||||
./mvnw install deploy -DskipTests
|
||||
./mvnw flatten:flatten install deploy -DskipTests
|
||||
```
|
||||
|
||||
This command will build, sign, and deploy the release to the Apache staging repository.
|
||||
|
|
@ -86,7 +86,7 @@ You should be prompted for your GPG passphrase during the deployment process.
|
|||
If no prompt is present, you can set the passphrase in the environment variable `MAVEN_GPG_PASSPHRASE`:
|
||||
|
||||
```bash
|
||||
MAVEN_GPG_PASSPHRASE=<your-gpg-passphrase> ./mvnw install deploy -DskipTests
|
||||
MAVEN_GPG_PASSPHRASE=<your-gpg-passphrase> ./mvnw flatten:flatten install deploy -DskipTests
|
||||
```
|
||||
|
||||
- The release will be automatically inserted into a temporary staging repository.
|
||||
|
|
|
|||
14
pom.xml
14
pom.xml
|
|
@ -196,6 +196,7 @@
|
|||
<checkstyle.fails.on.error>true</checkstyle.fails.on.error>
|
||||
<assertj-core.version>3.20.2</assertj-core.version>
|
||||
<cyclonedx-maven-plugin.version>2.8.0</cyclonedx-maven-plugin.version>
|
||||
<flatten-plugin-version>1.6.0</flatten-plugin-version>
|
||||
|
||||
<skipUTs>false</skipUTs>
|
||||
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
|
||||
|
|
@ -446,6 +447,15 @@
|
|||
<retryFailedDeploymentCount>5</retryFailedDeploymentCount>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
<version>${flatten-plugin-version}</version>
|
||||
<configuration>
|
||||
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
||||
<updatePomFile>true</updatePomFile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
|
|
@ -584,6 +594,10 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue