Skip to content

Commit 5c2d304

Browse files
committed
Merge branch 'develop'
2 parents 0232a65 + b25bba1 commit 5c2d304

File tree

19 files changed

+188
-94
lines changed

19 files changed

+188
-94
lines changed

.github/workflows/maven-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
java: [11, 17, 21]
18+
java: [17, 21]
1919
os: [ubuntu-latest]
2020
distribution: [temurin]
2121
include:
22-
- java: 11
22+
- java: 17
2323
os: windows-latest
2424
distribution: temurin
25-
- java: 11
25+
- java: 17
2626
os: macos-latest
2727
distribution: temurin
2828

.github/workflows/maven-deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ jobs:
1717

1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121

2222
- name: Configure GIT
2323
run: |
2424
git config --global user.email "${{ secrets.GH_SITE_DEPLOY_EMAIL }}"
2525
git config --global user.name "${{ secrets.GH_SITE_DEPLOY_NAME }}"
2626
2727
- name: Setup JDK
28-
uses: actions/setup-java@v4
28+
uses: actions/setup-java@v5
2929
with:
3030
distribution: temurin
31-
java-version: 11
31+
java-version: 17
3232
cache: maven
3333

3434
- name: Build, verify, deploy, generate site

.github/workflows/release-from-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
permissions:
1313
contents: write
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616
- uses: ncipollo/release-action@v1
1717
with:
1818
body: 'Changes: https://devops.wcm.io/conga/plugins/ansible/changes.html'
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
# Licensed to the Apache Software Foundation (ASF) under one
2-
# or more contributor license agreements. See the NOTICE file
3-
# distributed with this work for additional information
4-
# regarding copyright ownership. The ASF licenses this file
5-
# to you under the Apache License, Version 2.0 (the
6-
# "License"); you may not use this file except in compliance
7-
# with the License. You may obtain a copy of the License at
8-
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing,
12-
# software distributed under the License is distributed on an
13-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
# KIND, either express or implied. See the License for the
15-
# specific language governing permissions and limitations
16-
# under the License.
17-
wrapperVersion=3.3.2
1+
wrapperVersion=3.3.4
182
distributionType=only-script
19-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<img src="https://wcm.io/images/[email protected]"/> CONGA Plugin for Ansible
22
======
3-
[![Build](https://github.com/wcm-io-devops/conga-ansible-plugin/workflows/Build/badge.svg?branch=develop)](https://github.com/wcm-io-devops/conga-ansible-plugin/actions?query=workflow%3ABuild+branch%3Adevelop)
3+
[![Build](https://github.com/wcm-io-devops/conga-ansible-plugin/actions/workflows/maven-build.yml/badge.svg?branch=develop)](https://github.com/wcm-io-devops/conga-ansible-plugin/actions?query=workflow%3ABuild+branch%3Adevelop)
44
[![Maven Central](https://img.shields.io/maven-central/v/io.wcm.devops.conga.plugins/io.wcm.devops.conga.plugins.ansible)](https://repo1.maven.org/maven2/io/wcm/devops/conga/plugins/io.wcm.devops.conga.plugins.ansible)
55
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=wcm-io-devops_conga-ansible-plugin&metric=coverage)](https://sonarcloud.io/summary/new_code?id=wcm-io-devops_conga-ansible-plugin)
66

changes.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
xsi:schemaLocation="http://maven.apache.org/changes/2.0.0 https://maven.apache.org/xsd/changes-2.0.0.xsd">
2525
<body>
2626

27+
<release version="1.5.0" date="2025-09-25">
28+
<action type="update" dev="sseifert">
29+
Switch to Java 17.
30+
</action>
31+
</release>
32+
2733
<release version="1.4.10" date="2025-09-19">
2834
<action type="update" dev="sseifert">
2935
Update dependencies.

conga-ansible-plugin/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
<parent>
2626
<groupId>io.wcm.devops.conga.plugins</groupId>
2727
<artifactId>io.wcm.devops.conga.plugins.ansible.parent</artifactId>
28-
<version>1.4.10</version>
28+
<version>1.5.0</version>
2929
<relativePath>../parent/pom.xml</relativePath>
3030
</parent>
3131

3232
<groupId>io.wcm.devops.conga.plugins</groupId>
3333
<artifactId>io.wcm.devops.conga.plugins.ansible</artifactId>
34-
<version>1.4.10</version>
34+
<version>1.5.0</version>
3535
<packaging>jar</packaging>
3636

3737
<name>CONGA Ansible Plugin</name>
@@ -57,7 +57,7 @@
5757
<dependency>
5858
<groupId>io.wcm.devops.conga</groupId>
5959
<artifactId>io.wcm.devops.conga.generator</artifactId>
60-
<version>1.17.6</version>
60+
<version>1.18.0</version>
6161
<scope>compile</scope>
6262
</dependency>
6363

conga-ansible-plugin/src/it/example/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<parent>
2727
<groupId>io.wcm.maven</groupId>
2828
<artifactId>io.wcm.maven.global-parent</artifactId>
29-
<version>66</version>
29+
<version>70</version>
3030
<relativePath/>
3131
</parent>
3232

@@ -65,7 +65,7 @@
6565
<plugin>
6666
<groupId>io.wcm.devops.conga</groupId>
6767
<artifactId>conga-maven-plugin</artifactId>
68-
<version>1.17.6</version>
68+
<version>1.18.0</version>
6969
<extensions>true</extensions>
7070
<configuration>
7171
<valueProvider>

conga-ansible-plugin/src/main/java/io/wcm/devops/conga/plugins/ansible/valueprovider/AnsibleInventoryValueProviderPlugin.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import java.util.HashMap;
2626
import java.util.List;
2727
import java.util.Map;
28-
import java.util.stream.Collectors;
2928

3029
import org.apache.commons.lang3.StringUtils;
3130
import org.apache.commons.lang3.Strings;
@@ -129,9 +128,9 @@ private InventoryContent getInventoryContent(ValueProviderContext context) {
129128
private InventoryContent tryReadJsonStyle(String inventoryContent, File file, ValueProviderContext context) {
130129
try {
131130
JsonElement root = JsonParser.parseString(inventoryContent);
132-
if (root instanceof JsonObject) {
131+
if (root instanceof JsonObject jsonObject) {
133132
ReadContext jsonpathReadContext = JsonPath.parse(inventoryContent);
134-
return new InventoryContent(jsonToConfig((JsonObject)root), jsonpathReadContext);
133+
return new InventoryContent(jsonToConfig(jsonObject), jsonpathReadContext);
135134
}
136135
}
137136
catch (JsonSyntaxException ex) {
@@ -147,14 +146,13 @@ private Map<String, List<String>> jsonToConfig(JsonObject root) {
147146
for (Map.Entry<String, JsonElement> entry : root.entrySet()) {
148147
if (!Strings.CS.equals(entry.getKey(), "_meta")) {
149148
JsonArray hostNamesArray = null;
150-
if (entry.getValue() instanceof JsonArray) {
151-
hostNamesArray = (JsonArray)entry.getValue();
149+
if (entry.getValue() instanceof JsonArray entryArray) {
150+
hostNamesArray = entryArray;
152151
}
153-
else if (entry.getValue() instanceof JsonObject) {
154-
JsonObject entryObject = (JsonObject)entry.getValue();
152+
else if (entry.getValue() instanceof JsonObject entryObject) {
155153
JsonElement hostsElement = entryObject.get("hosts");
156-
if (hostsElement instanceof JsonArray) {
157-
hostNamesArray = (JsonArray)hostsElement;
154+
if (hostsElement instanceof JsonArray hostsArray) {
155+
hostNamesArray = hostsArray;
158156
}
159157
}
160158

@@ -185,7 +183,7 @@ private Map<String, List<String>> inventoryToConfig(AnsibleInventory inventory)
185183
for (AnsibleGroup group : inventory.getGroups()) {
186184
config.put(group.getName(), group.getHosts().stream()
187185
.map(AnsibleHost::getName)
188-
.collect(Collectors.toList()));
186+
.toList());
189187
}
190188
return config;
191189
}

conga-ansible-plugin/src/test/java/io/wcm/devops/conga/plugins/ansible/urlfile/AnsibleVaultUrlFilePluginTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void testGetFile() throws Exception {
6666
}
6767

6868
@Test
69-
void testInvalidFile() throws Exception {
69+
void testInvalidFile() {
7070
assertThrows(IOException.class, () -> {
7171
urlFileManager.getFile("ansible-vault:classpath:/vault-sample/nonexisting-file");
7272
});

0 commit comments

Comments
 (0)