Skip to content
Permalink
Browse files
[FLINK-19408] Update add-version.sh for cross-releasing Java 8 and 11
  • Loading branch information
tzulitai committed Sep 25, 2020
1 parent a04d9a3 commit 6f384d34bc74ae58b9bfb539a3197812f38c7f3c
Showing 2 changed files with 19 additions and 14 deletions.
@@ -58,20 +58,25 @@ if [ -z "$gpg_key" ]; then
error "Missing GPG key ID in gpg_keys.txt file for release $statefun_version"
fi

if [ -d "$statefun_version" ]; then
error "Directory $statefun_version already exists; delete before continuing"
fi
function generate_dockerfile() {
local java_version="$1"
local dir="$statefun_version-java$java_version"

echo -n >&2 "Generating Dockerfiles for StateFun version=$statefun_version, Flink version=$flink_version, Java version=$java_version ..."
rm -rf $dir
mkdir "$dir"

echo -n >&2 "Generating Dockerfiles..."
dir="$statefun_version"
mkdir "$dir"
cp -r template/* "$dir"

cp -r template/* "$dir"
sed \
-e "s/%%STATEFUN_VERSION%%/$statefun_version/" \
-e "s/%%FLINK_VERSION%%/$flink_version/" \
-e "s/%%JAVA_VERSION%%/$java_version/" \
-e "s/%%GPG_KEY%%/$gpg_key/" \
"template/Dockerfile" > "$dir/Dockerfile"

sed \
-e "s/%%STATEFUN_VERSION%%/$statefun_version/" \
-e "s/%%FLINK_VERSION%%/$flink_version/" \
-e "s/%%GPG_KEY%%/$gpg_key/" \
"template/Dockerfile" > "$dir/Dockerfile"
echo >&2 " done."
}

echo >&2 " done."
generate_dockerfile 8
generate_dockerfile 11
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM flink:%%FLINK_VERSION%%
FROM flink:%%FLINK_VERSION%%-scala_2.12-java%%JAVA_VERSION%%

ENV STATEFUN_VERSION=%%STATEFUN_VERSION%% \
GPG_KEY=%%GPG_KEY%%

0 comments on commit 6f384d3

Please sign in to comment.