Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build pull request

on:
pull_request:
branches: [ "master" , "3.*", "4.*" ]
branches: [ "master", "3.*", "4.*" ]

jobs:
build:
Expand All @@ -17,5 +17,6 @@ jobs:
openhab: true
server_id: co7io-public-snapshots
deploy: true
master_branch: 3
additional_profiles: 'openhab'
skip_test_publish: false
additional_profiles: 'thing4,openhab'
master_branch: '3'
8 changes: 5 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build pushed commit

on:
push:
branches: [ "master" , "3.*", "4.*" ]
branches: [ "master", "3.*", "4.*" ]

jobs:
build:
Expand All @@ -17,5 +17,7 @@ jobs:
openhab: true
server_id: co7io-public-snapshots
deploy: true
master_branch: 3
additional_profiles: 'openhab'
skip_test_publish: false
additional_profiles: 'thing4,openhab'
master_branch: '3'

6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
CI_RELEASE_PASSWORD: ${{ secrets.CI_RELEASE_PASSWORD }}
with:
openhab: true
server_id: co7io-public-releases
additional_profiles: 'openhab'
server_id: 'co7io-public-releases'
release_version: ${{ inputs.release_version }}
development_version: ${{ inputs.development_version }}
perform_version: ${{ inputs.perform_version }}
dry_run: ${{ inputs.dry_run }}
dry_run: ${{ inputs.dry_run }}
additional_profiles: 'thing4,openhab'
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ private void sleep() {
logger.trace("Sleep a bit");
Thread.sleep(TimeUnit.SECONDS.toMillis(interval));
} catch (InterruptedException e) {
throw new RuntimeException("Could not complete operation", e);
logger.warn("Could not complete operation", e);
Thread.currentThread().interrupt();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ protected void createConfiguration(Map<String, String> properties) throws IOExce
File file = new File(new File(System.getProperty("karaf.etc")), factoryPid + ".cfg");

props.putAll(properties);
props.store(new FileOutputStream(file), "Generated at " + new Date());
try (FileOutputStream fos = new FileOutputStream(file)) {
props.store(fos, "Generated at " + new Date());
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class AwsStatusServlet extends HttpServlet {

public static final String AWS_SVC_FILTER = "(" + Constants.SERVICE_PID + "=" + AwsMqttService.SERVICE_PID + ")";

private CloudService service;
private CloudService service; // NOSONAR
private final HttpService httpService;

@Activate
Expand Down
27 changes: 27 additions & 0 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,33 @@
</pluginRepository>
</pluginRepositories>
</profile>

<profile>
<id>sonar</id>

<activation>
<property>
<name>cicd</name>
</property>
</activation>

<build>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
<release.repository-id>co7io-public-releases</release.repository-id>
<release.repository-name>ConnectorIO Public Releases</release.repository-name>
<release.repository-url>https://repository.connectorio.cloud/repository/co7io-public-releases/</release.repository-url>

<sonar.projectKey>ConnectorIO_connectorio-cloud</sonar.projectKey>
<sonar.moduleKey>${project.artifactId}</sonar.moduleKey>
<sonar.organization>connectorio</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<!-- keeps sonar happy with java 11 -->
<sonar.scanner.force-deprecated-java-version>true</sonar.scanner.force-deprecated-java-version>
<sonar.scanner.force-deprecated-java-version-grace-period>true</sonar.scanner.force-deprecated-java-version-grace-period>
</properties>

<modules>
Expand Down