Skip to content
Merged
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
12 changes: 10 additions & 2 deletions .github/workflows/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ gpg --symmetric --cipher-algo AES256 entity-client.properties
B - Use Encrypted Properties
1. Create & configure decrypt script (decrypt_config.sh)
1.1 ensure executions rights before committing to github:
# on linux
chmod +x ./.github/workflows/decrypt_config.sh

#on Windows cygwin or WSL or Git Bash can be used
chmod +x decrypt_config.sh
ls -l decrypt_config.sh
git add --chmod=+x ./.github/workflows/decrypt_config.sh
#if the file was allready added to git, use the following
#git update-index --chmod=+x ./.github/workflows/decrypt_config.sh
#verify execution permissions
git ls-files --stage
1.2 commit file to gihub
git commit -m"Executable script!"

2. Ensure that the application is able to load properties from external file and that the decripted properties file matches the location from which the app is loading properties
3. Update Github Workflow to run decrypt script (NOTE: secrets.CLIENT_PROPS_PASS is the name of the secret in Github secrets see Settings-> Secrets and Variables -> Actions -> Secrets)
Expand Down
61 changes: 59 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
<sonar.organization>europeana</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.exclusions>**/*.gpg,**/*.template</sonar.exclusions>

<aggregate.report.xml>target/site/jacoco-aggregate/jacoco.xml</aggregate.report.xml>
<aggregate.report.xml>
target/site/jacoco-aggregate/jacoco.xml</aggregate.report.xml>
<sonar.coverage.jacoco.xmlReportPaths>${aggregate.report.xml}</sonar.coverage.jacoco.xmlReportPaths>
<sonar.java.pmd.reportPaths>${project.build.directory}/pmd.xml</sonar.java.pmd.reportPaths>
<sonar.java.spotbugs.reportPaths>
Expand Down Expand Up @@ -163,8 +163,64 @@
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<!-- include the reports from all modules into the aggegated report (only in this module)-->
<configuration>
<dataFileIncludes>
<dataFileInclude>**/jacoco.exec</dataFileInclude>
</dataFileIncludes>
<outputDirectory>
${project.reporting.outputDirectory}/jacoco-aggregate
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

<!-- run tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>

<!-- try failsafe for coverage data-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${failsafe.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>

<!-- useModulePath = false Fixes Integration test not
finding beans. May
be
removed with 3.0.0-M6 is available
See: https://stackoverflow.com/a/65806777/14530159 -->
<configuration>
<useModulePath>false</useModulePath>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>

</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
Expand Down Expand Up @@ -235,6 +291,7 @@
</plugins>
</configuration>
</plugin>

</plugins>
</build>
</profile>
Expand Down