This section describes tools that help you with coding. We provide scripts that allows to clone all repositories and install artifacts to Maven local / Maven Central Snapshot repositories.
Install and configure Windows Subsystem for Linux (WSL) and configure:
- Java 8 on WSL
- Gradle 5+
- Maven
Check a development/pull-all.sh script to clone all Knot.x repositories. Please check -h option
for help. Execute this script from knotx-aggregator/development directory, executing it from another
directory will fail. The -r option specifies directory where all Knot.x repositories
are cloned such as sh pull-all.sh -r ../../knotx make sure, that provided directory exists.
Check a development/build-stack.sh script to build all cloned repositories. Please check -h option
for help. Execute this command from knotx-aggregator/development directory.
Specify the -r parameter to point the directory with cloned repositories, for example
sh buils-stack.sh -r ../../knotx make sure that in the provided directory repositories are properly
cloned.
Please note that the knotx-stack repository contains
Gradle composite build definition.
The repository allows to re-build all Knot.x modules and use them during integration tests, bypassing the
need to publish artifacts to the maven repository first.
The build-all.sh command deploys the Knot.x BOM file
(Bill Of Materials) to the local Maven repository first. The BOM file specifies external dependencies, such as used Vert.x
version etc. Then all modules are rebuilt. After the execution, please refresh your IDE.
From here you can download example Knot.x projects.
Let's use getting-started project which is contained in this repository as an example.
Navigate to the project directory and build it
gradlew clean build
After successful build you'll find zip archive knotx-stack-2.0.0-SNAPSHOT.zip under ./build/distributions. Take into
account that, knotx-stack version may be different in the future. Unzip it and navigate to knotx directory.
From there execute command
chmod +x bin/knotx
bin/knotx run-knotx
To check if this example projects was built properly, just open link listed in the repository. If you will see properly rendered page without errors it means that everything with Knot.x is up and running
// TODO
After cloning the repository on Unix please change permissions:
$>git clone git@github.com:Knotx/knotx-aggregator.git
$>chmod -R 755 knotx-aggregator/**/*.sh
From development directory run:
$>./pull-all.sh -r projects/knotx -b feature/my-changes -m origin/master
$>./build-stack.sh -r projects/knotx
From development directory run:
$>./pull-all.sh -r projects/knotx -b master -f
$>./build-stack.sh -r projects/knotx -d
This section describes release process.
-
Sonatype.org JIRA account
-
Your Sonatype.org account needs to be added to the Knot.x project (if it isn't, please contact the Knot.x team via User Group or Gitter Chat.
-
A GPG key generated for the email you have registered on the Sonatype.org JIRA (Follow the Working with PGP Signatures guide to get one). Don't forget to deploy your public key to the key server!
-
Add a
<server>entry to yoursettings.xmlfile<servers> ... <server> <id>ossrh</id> <username>your_sonatype_org_jira_username</username> <password>your_sonatype_org_jira_password</password> </server> ... </servers>
-
Assuming you have created account on Docker Hub and you're assigned to the Knot.x organization, add server entry to your
settings.xmlto enable pushing to the docker registry.
<server>
<id>registry.hub.docker.com</id>
<username>[Username]</username>
<password>[password]</password>
</server>-
Bintray account created (to release Knot.x binary distributions) and token generated.
-
Update your
gradle.propertieswith
signing.keyId=24875D73
signing.password=secret
signing.secretKeyRingFile=/Users/me/.gnupg/secring.gpg
and
ossrhUsername=your_sonatype_org_jira_username
ossrhPassword=your_sonatype_org_jira_password
For releasing gradle repos. Also add
org.gradle.internal.http.connectionTimeout=60000
org.gradle.internal.http.socketTimeout=300000
To fix the read timeouts gradle issue.
Prerequisites Install Mac OSX/Gsed
From the repository release directory execute following commands:
- Clone repos. (It will do a shallow clone of all repos being a subject of the release procedure)
./clone.sh- Start release & provide the release version number
./start-release.sh 2.0.0-
Validate release on staging repos
-
Release docker image:
./release-docker.sh- Close the release
Create manually new versions for
examplesanddistropackages at bintray. Run:
./close-release.sh 1.5.0 1.5.1-SNAPSHOT <bintrayUser> <bintrayToken>- Manual actions:
- close and promote repos released by gradle manually at oss.sonatype.org
- publish bintray files
- update website - binary distro links
- update wiki
- publish release blog
- automatically close and promote repos released by gradle manually at oss.sonatype.org
- update
knotx-website- binary distro links
indexversion- produce
blog/release-VERSION/page that consists of allCHANGELOG.mdchanges for every module - deploy
SNAPSHOTversions after release to make development of new versions possible and satisfy failing travis