-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from simpledotorg/igbanam/package-the-test-tool
[sc-13646] Create Release Strategy
- Loading branch information
Showing
12 changed files
with
137 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Release DHIS2 Verifier | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
jobs: | ||
release-dhis2-verifier: | ||
defaults: | ||
run: | ||
working-directory: CommonUtils/Dhis2CucumberTestTool | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
server-id: github | ||
settings-path: ${{ github.workspace }} | ||
- name: Set the version | ||
run: | | ||
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
mvn versions:set -DnewVersion=${{ env.RELEASE_VERSION }} | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml -DskipTests=true | ||
- name: Create a release with the artefacts # Note: this would create a new release… | ||
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: "target/Dhis2CucumberTestTool-${{ env.RELEASE_VERSION }}-release.zip" | ||
token: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Publish built artefacts | ||
name: Publish Docs | ||
on: | ||
push: | ||
branches: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Contributing to RTSL Utils | ||
|
||
## …for code changes | ||
|
||
We communicate in RTSL through concrete artefacts. What this means in the Github world is issues, and pull requests. If you have ideas on how any of our utils could be better, or you can help with an already open issue, please raise a pull request with the following guidelines | ||
|
||
- commits should follow the [conventional commits](https://www.conventionalcommits.org) guidelines | ||
- ensure the pull request description properly details the problem and the solution | ||
- link the issue being treated, if available | ||
|
||
If you want to contribute an entirely new feature, do raise an issue so we can discuss it beforehand. This helps smoothen the pull request review process. | ||
|
||
## …for bugs | ||
|
||
1. Search for the bug through our Github issues | ||
1. If the bug exists, add your scenario to the thread so we know this bug is affecting more people | ||
1. If the bug is new, please create a new Github issue ensuring you have the following detail in it | ||
1. a clear title and description | ||
1. the specific util you found the bug in | ||
1. steps we can take to see what you see | ||
|
||
We're looking forward to collaborating with you and everyone in the community :rocket: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | ||
<id>release</id> | ||
<includeBaseDirectory>true</includeBaseDirectory> | ||
<formats> | ||
<format>zip</format> | ||
</formats> | ||
<fileSets> | ||
<fileSet> | ||
<directory>${project.basedir}/release-artefacts</directory> | ||
<outputDirectory></outputDirectory> | ||
<filtered>true</filtered> | ||
<includes> | ||
<include>exec.sh</include> | ||
</includes> | ||
<fileMode>0744</fileMode> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${project.basedir}/release-artefacts</directory> | ||
<outputDirectory></outputDirectory> | ||
<filtered>true</filtered> | ||
<includes> | ||
<include>log-config.xml</include> | ||
<include>input.properties</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${project.build.directory}</directory> | ||
<outputDirectory></outputDirectory> | ||
<includes> | ||
<include>Dhis2CucumberTestTool*.jar</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
CommonUtils/Dhis2CucumberTestTool/release-artefacts/exec.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
PROPERTIES_FILE="input.properties" | ||
SCENARIOS="" | ||
|
||
while IFS='=' read -r key value; do | ||
if [[ $key == scenarios ]]; then | ||
SCENARIOS=$value | ||
fi | ||
done < "$PROPERTIES_FILE" | ||
|
||
java -Dorg.rtsl.dhis2.testtool.properties=input.properties -Dlogback.configurationFile=log-config.xml -Dfile.ending=UTF8 -jar Dhis2CucumberTestTool-*.jar --object-factory io.cucumber.spring.SpringFactory --plugin html:./test_reports.html --plugin json:./test_reports.json --plugin pretty --glue "org.rtsl.dhis2.cucumber.definitions" --glue "io.cucumber.spring" --threads 1 $SCENARIOS |
4 changes: 4 additions & 0 deletions
4
CommonUtils/Dhis2CucumberTestTool/release-artefacts/input.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dhis2.api.url=http://localhost:8080/ | ||
dhis2.api.username=admin | ||
dhis2.api.password=district | ||
scenarios=<path-to-features[-folder]> |
5 changes: 5 additions & 0 deletions
5
CommonUtils/Dhis2CucumberTestTool/release-artefacts/log-config.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<configuration> | ||
<root level="off"> | ||
<appender-ref ref="unitTestLogs"/> | ||
</root> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
CommonUtils/Dhis2CucumberTestTool/src/test/resources/local_tests/testtool.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
dhis2.api.url=http://localhost:8080/ | ||
dhis2.api.username=admin | ||
dhis2.api.password=district | ||
|
||
|
||
|
||
__encrypted__.dhis2.api.password=true | ||
__encrypted__.database.jdbc.password=true | ||
__encrypted__.database.jdbc.username=true | ||
__hidden__.jdbc.host=true |