-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NIFI-5247 nifi-toolkit bash entry points should leverage exec to repl…
…ace bash with the current java process in order to handle signals properly in docker. - Also add bash, openssl, jq to make certificate request operations easier - Move project.version to the build config from the Dockerfile, use target/ folder for the build dependency - Docker integration tests for checking exit codes and tls-toolkit basic server-client interaction This closes #2746.
- Loading branch information
Showing
15 changed files
with
102 additions
and
22 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
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
35 changes: 35 additions & 0 deletions
35
nifi-toolkit/nifi-toolkit-assembly/docker/tests/exit-codes.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,35 @@ | ||
#!/bin/bash | ||
|
||
set -xuo pipefail | ||
|
||
VERSION=${1:-} | ||
IMAGE=apache/nifi-toolkit:${VERSION} | ||
|
||
echo "Testing return values on missing input:" | ||
docker run --rm $IMAGE | ||
test 0 -eq $? || exit 1 | ||
|
||
echo "Testing return values on invalid input for all commands:" | ||
docker run --rm $IMAGE encrypt-config invalid 1>/dev/null 2>&1 | ||
test 2 -eq $? || exit 1 | ||
|
||
docker run --rm $IMAGE s2s invalid 1>/dev/null 2>&1 | ||
test 0 -eq $? || exit 1 | ||
|
||
docker run --rm $IMAGE zk-migrator invalid 1>/dev/null 2>&1 | ||
test 0 -eq $? || exit 1 | ||
|
||
docker run --rm $IMAGE node-manager invalid 1>/dev/null 2>&1 | ||
test 1 -eq $? || exit 1 | ||
|
||
docker run --rm $IMAGE cli invalid 1>/dev/null 2>&1 | ||
test 255 -eq $? || exit 1 | ||
|
||
docker run --rm $IMAGE tls-toolkit invalid 1>/dev/null 2>&1 | ||
test 2 -eq $? || exit 1 | ||
|
||
docker run --rm $IMAGE file-manager invalid 1>/dev/null 2>&1 | ||
test 1 -eq $? || exit 1 | ||
|
||
docker run --rm $IMAGE flow-analyzer invalid 1>/dev/null 2>&1 | ||
test 1 -eq $? || exit 1 |
17 changes: 17 additions & 0 deletions
17
nifi-toolkit/nifi-toolkit-assembly/docker/tests/tls-toolkit.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,17 @@ | ||
#!/bin/bash | ||
|
||
set -exuo pipefail | ||
|
||
VERSION=$1 | ||
IMAGE=apache/nifi-toolkit:${VERSION} | ||
CONTAINER=nifi-toolkit-$VERSION-tls-toolkit-integration-test | ||
|
||
TOKEN=D40F6B95-801F-4800-A1E1-A9FCC712E0BD | ||
|
||
trap " { docker rm -f $CONTAINER ; } " EXIT | ||
|
||
echo "Starting CA server using the tls-toolkit server command" | ||
docker run -d --name $CONTAINER $IMAGE tls-toolkit server -t $TOKEN -c $CONTAINER | ||
|
||
echo "Requesting client certificate using the tls-toolkit client command" | ||
docker run --rm --link $CONTAINER $IMAGE tls-toolkit client -t $TOKEN -c $CONTAINER |
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
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
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
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
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