-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add separate reproducibility check workflow (#271)
Adds a reproducibility check workflow based on a Nexus repository and not the local Maven repo. We also deprecate the reproducibility check in `build-reusable.yaml`.
- Loading branch information
Showing
4 changed files
with
123 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to you under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
name: verify-reproducibility-reusable | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
java-version: | ||
description: The Java compiler version | ||
default: 17 | ||
type: string | ||
maven-args: | ||
description: Additional Maven arguments | ||
type: string | ||
nexus-url: | ||
description: The URL of the reference Nexus repository | ||
type: string | ||
runs-on: | ||
description: The type of runners to use as JSON array | ||
default: '["ubuntu-latest"]' | ||
type: string | ||
|
||
env: | ||
MAVEN_ARGS: ${{ inputs.maven-args }} | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: ${{ fromJSON(inputs.runs-on) }} | ||
|
||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # 4.2.1 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # 4.4.0 | ||
with: | ||
distribution: zulu | ||
java-version: ${{ inputs.java-version }} | ||
cache: maven | ||
|
||
# `clean verify artifact:compare` is required to generate the build reproducibility report. | ||
# For details, see: https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility | ||
- name: Verify build reproducibility | ||
shell: bash | ||
run: | | ||
./mvnw \ | ||
--show-version --batch-mode --errors --no-transfer-progress \ | ||
-DskipTests=true \ | ||
-Dreference.repo=${{ inputs.nexus-url }} \ | ||
clean verify artifact:compare | ||
# Upload reproducibility results if the build fails. | ||
- name: Upload reproducibility results | ||
if: failure() | ||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # 4.4.3 | ||
with: | ||
name: reproducibility-${{matrix.os}}-${{github.run_number}}-${{github.run_attempt}} | ||
path: | | ||
**/target/bom.xml | ||
**/target/*.buildcompare | ||
**/target/*.jar | ||
**/target/*.zip | ||
**/target/reference/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://logging.apache.org/xml/ns" | ||
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd" | ||
type="changed"> | ||
<issue id="246" link="https://github.com/apache/logging-parent/pull/246"/> | ||
<description format="asciidoc"> | ||
Adds a `verify_reproducibility-reusable.yaml` workflow to check reproducibility of artifacts in a Maven repo. | ||
Deprecates the reproducibility check in `build-reusable.yaml`. | ||
</description> | ||
</entry> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters