pepov caa71fce92 NIFI-5247 nifi-toolkit bash entry points should leverage exec to replace 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.
2018-06-01 13:20:33 -04:00

18 lines
536 B
Bash
Executable File

#!/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