Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed May 11, 2022
2 parents b52392a + f406c61 commit bb5bf60
Show file tree
Hide file tree
Showing 31 changed files with 153 additions and 52 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,3 @@ jobs:
sonar-run-on-java-version: 11
sonar-token: ${{ secrets.SONAR_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build and verify example
run: ./mvnw -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean verify -f example
9 changes: 9 additions & 0 deletions changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 https://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
<body>

<release version="1.14.8" date="2022-05-11">
<action type="fix" dev="sseifert">
conga-maven-plugin: Fix version resolution for references JAR maven artifacts without explicit type definition.
</action>
<action type="fix" dev="sseifert">
YAML model export: Avoid generating YAML alias for tenant roles arrays.
</action>
</release>

<release version="1.14.6" date="2022-03-15">
<action type="update" dev="sseifert">
Update dependencies.
Expand Down
4 changes: 2 additions & 2 deletions generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand All @@ -44,7 +44,7 @@
<dependency>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.model</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<scope>compile</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ private void addTenant(List<Map<String, Object>> tenants, ExportNodeRoleTenantDa

tenantMap.put("tenant", context.getVariableStringResolver().resolve(tenantData.getTenant(), tenantData.getConfig()));
if (!tenantData.getRoles().isEmpty()) {
tenantMap.put("roles", tenantData.getRoles());
// copy role list for each tenant to avoid alias in YAML export
tenantMap.put("roles", new ArrayList<>(tenantData.getRoles()));
}
tenantMap.put("config", context.getModelExportConfigProcessor().apply(tenantData.getConfig()));

Expand Down
4 changes: 2 additions & 2 deletions model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand All @@ -40,7 +40,7 @@
<dependency>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.resource</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<parent>
<groupId>io.wcm.devops</groupId>
<artifactId>io.wcm.devops.parent_toplevel</artifactId>
<version>1.3.0</version>
<version>1.3.2</version>
<relativePath />
</parent>

<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<packaging>pom</packaging>

<name>CONGA</name>
Expand Down
6 changes: 2 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<relativePath>parent/pom.xml</relativePath>
</parent>

<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.root</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<packaging>pom</packaging>

<name>CONGA</name>
Expand All @@ -56,8 +56,6 @@
<module>generator</module>
<module>tooling/conga-cli</module>
<module>tooling/conga-maven-plugin</module>
<!-- This is not included in main build due to conga-maven-plugin dependency -->
<!--module>example</module-->
</modules>

<build>
Expand Down
2 changes: 1 addition & 1 deletion resource/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand Down
1 change: 0 additions & 1 deletion src/site/markdown/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ Definitions for CONGA:
[usage]: usage.html
[general-concepts]: general-concepts.html
[extensibility]: extensibility.html
[examples]: examples.html
[yaml-definitions]: yaml-definitions.html
[handlebars-quickstart]: handlebars-quickstart.html
[handlebars-helpers]: handlebars-helpers.html
Expand Down
6 changes: 2 additions & 4 deletions src/site/markdown/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ Make sure you have installed:
* Java 8 or higher
* Apache Maven 3.3 or higher

To start with the example project by cloning this GIT repository:
https://github.com/wcm-io-devops/conga/

The example project is in a subfolder `example`.
Example project can be found at:
https://github.com/wcm-io-devops/conga/tree/develop/tooling/conga-maven-plugin/src/it/example


### Definitions
Expand Down
4 changes: 2 additions & 2 deletions src/site/markdown/yaml-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Please note that the Java Bean naming conventions are applied: For the property
### Role definitions

Example role definitions:<br/>
https://github.com/wcm-io-devops/conga/tree/develop/example/definitions/src/main/roles
https://github.com/wcm-io-devops/conga/tree/develop/tooling/conga-maven-plugin/src/it/example/definitions/src/main/roles

The filename of the role YAML file is the role name.

Expand Down Expand Up @@ -50,7 +50,7 @@ In this case the current role inherits all configuration and files from the supe
### Environment definitions
Example environment definitions:<br/>
https://github.com/wcm-io-devops/conga/tree/develop/example/environments/src/main/environments
https://github.com/wcm-io-devops/conga/tree/develop/tooling/conga-maven-plugin/src/it/example/environments/src/main/environments
The filename of the environment YAML file is the environment name.
Expand Down
4 changes: 2 additions & 2 deletions tooling/conga-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

Expand All @@ -40,7 +40,7 @@
<dependency>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.generator</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<scope>compile</scope>
</dependency>

Expand Down
96 changes: 92 additions & 4 deletions tooling/conga-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

Expand All @@ -38,6 +38,13 @@
<properties>
<maven.version>3.3.9</maven.version>
<site.url.module.prefix>tooling/conga-maven-plugin</site.url.module.prefix>

<!-- Versions -->
<maven-plugin-plugin.version>3.6.4</maven-plugin-plugin.version>

<!-- Enable recording of coverage during execution of maven-invoker-plugin -->
<jacoco.propertyName>invoker.mavenOpts</jacoco.propertyName>
<jacoco.includes>org.jacoco.maven.*</jacoco.includes>
</properties>

<prerequisites>
Expand All @@ -49,7 +56,7 @@
<dependency>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.generator</artifactId>
<version>1.14.6</version>
<version>1.14.8</version>
<scope>compile</scope>
</dependency>

Expand Down Expand Up @@ -113,7 +120,7 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.4</version>
<version>${maven-plugin-plugin.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand All @@ -132,7 +139,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.4</version>
<version>${maven-plugin-plugin.version}</version>
<configuration>
<goalPrefix>conga</goalPrefix>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
Expand All @@ -153,6 +160,87 @@
</executions>
</plugin>

<!-- Merge Jacoco results from unit tests and integration tests -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>before-unit-test-execution</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/jacoco-output/jacoco-unit-tests.exec</destFile>
<propertyName>surefire.jacoco.args</propertyName>
</configuration>
</execution>
<execution>
<id>before-integration-test-execution</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/jacoco-output/jacoco-integration-tests.exec</destFile>
<propertyName>invoker.jacoco.args</propertyName>
</configuration>
</execution>
<execution>
<id>merge-unit-and-integration</id>
<phase>post-integration-test</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<directory>${project.build.directory}/jacoco-output</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.jacoco.args}</argLine>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<projectsDirectory>src/it</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
<streamLogsOnFailures>true</streamLogsOnFailures>
<extraArtifacts>
<extraArtifact>org.jacoco:org.jacoco.agent:${jacoco-maven-plugin.version}:jar:runtime</extraArtifact>
</extraArtifacts>
<mavenOpts>${invoker.jacoco.args}</mavenOpts>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>install</goal>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
<pluginManagement>
<plugins>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,13 @@
<name>CONGA Packaging Example: Definitions</name>
<description>Example role definitions and templates.</description>

<dependencies>
<dependency>
<groupId>io.wcm.tooling.spotbugs</groupId>
<artifactId>io.wcm.tooling.spotbugs.annotations</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ files:
customOption1: value1
customOption2: 123

# Download file from maven repository, use artifact filename.
# Download files from maven repository, use artifact filename.
# Derive version from maven project.
- url: mvn:io.wcm.tooling.spotbugs/io.wcm.tooling.spotbugs.annotations
dir: download
- url: mvn:io.wcm.devops/io.wcm.devops.parent_toplevel//xml/site
dir: download

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dependency>
<groupId>io.wcm.devops</groupId>
<artifactId>io.wcm.devops.parent_toplevel</artifactId>
<version>1.3.0</version>
<version>1.3.2</version>
<type>xml</type>
<classifier>site</classifier>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invoker.goals = clean verify
18 changes: 4 additions & 14 deletions example/pom.xml → ...conga-maven-plugin/src/it/example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>io.wcm.maven</groupId>
<artifactId>io.wcm.maven.global-parent</artifactId>
<version>36</version>
<version>44</version>
<relativePath/>
</parent>

Expand All @@ -48,22 +48,12 @@

<!-- Configure CONGA maven plugin to support CONGA-specific packaging types -->
<plugin>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>conga-maven-plugin</artifactId>
<version>1.14.5-SNAPSHOT</version>
<groupId>@project.groupId@</groupId>
<artifactId>@project.artifactId@</artifactId>
<version>@project.version@</version>
<extensions>true</extensions>
</plugin>

<!-- do not deploy this example into maven repository -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

</plugins>
</build>

Expand Down
10 changes: 10 additions & 0 deletions tooling/conga-maven-plugin/src/it/example/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

// ensure no aliases are used in exported model YAML file
File sevices1ModelFile = new File( basedir, "environments/target/configuration/prod/services-1/model.yaml" );
assert sevices1ModelFile.exists();
String sevices1Model = sevices1ModelFile.getText("utf-8");
assert !sevices1Model.contains("&id001")
assert !sevices1Model.contains("*id001")


return true;
Loading

0 comments on commit bb5bf60

Please sign in to comment.