Skip to content

Commit bb6c83c

Browse files
committed
test: add another test case on gen build spec maven project with jdk version from github action workflow
1 parent db932d6 commit bb6c83c

File tree

4 files changed

+60
-0
lines changed

4 files changed

+60
-0
lines changed

src/macaron/build_spec_generator/reproducible_central/reproducible_central.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
# Even though it's called gitTag, a commit hash would work.
3636
# https://github.com/jvm-repo-rebuild/reproducible-central/blob/46de9b405cb30ff94effe0ba47c1ebecc5a1c17e/bin/includes/fetchSource.sh#L59C1-L59C72
3737
STRING_TEMPLATE = """# Copyright (c) 2025, Oracle and/or its affiliates.
38+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
3839
# Generated by Macaron version {macaron_version}
3940
4041
{extra_comment}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2025, Oracle and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
3+
# Generated by Macaron version 0.15.0
4+
5+
# Input PURL - pkg:github/behnazh-w/example-maven-app@1.0
6+
# Initial default JDK version 8 and default build command [['mvn', '-DskipTests=true', '-Dmaven.test.skip=true', '-Dmaven.site.skip=true', '-Drat.skip=true', '-Dmaven.javadoc.skip=true', 'clean', 'package']].
7+
# The lookup build command: ['./mvnw', 'clean', 'package']
8+
# Jdk version from lookup build command 17.
9+
10+
groupId=behnazh-w
11+
artifactId=example-maven-app
12+
version=1.0
13+
14+
gitRepo=https://github.com/behnazh-w/example-maven-app
15+
16+
gitTag=2deca75ed5dd365eaf1558a82347b1f11306135f
17+
18+
tool=mvn
19+
jdk=17
20+
21+
newline=lf
22+
23+
command="./mvnw -DskipTests=true -Dmaven.test.skip=true -Dmaven.site.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true clean package"
24+
25+
buildinfo=target/example-maven-app-1.0.buildinfo
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright (c) 2025 - 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
3+
4+
description: |
5+
Test the build spec generation on a Maven project with JDK version obtained
6+
from the github action worfklow.
7+
8+
tags:
9+
- macaron-python-package
10+
- macaron-docker-image
11+
- macaron-gen-build-spec
12+
13+
steps:
14+
- name: Run macaron analyze
15+
kind: analyze
16+
options:
17+
command_args:
18+
- -purl
19+
- pkg:github/behnazh-w/example-maven-app@1.0
20+
- name: Run Reproducible-central build spec generation
21+
kind: gen-build-spec
22+
options:
23+
command_args:
24+
- -purl
25+
- pkg:github/behnazh-w/example-maven-app@1.0
26+
- --output-format
27+
- rc-buildspec
28+
- name: Compare Buildspec.
29+
kind: compare
30+
options:
31+
kind: rc_build_spec
32+
result: ./output/macaron.buildspec
33+
expected: expected_macaron.buildspec

tests/integration/cases/micronaut-projects_micronaut-core/expected_macaron.buildspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright (c) 2025, Oracle and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
23
# Generated by Macaron version 0.15.0
34

45
# Input PURL - pkg:maven/io.micronaut/micronaut-core@4.2.3

0 commit comments

Comments
 (0)