This is an automated email from the ASF dual-hosted git repository. mbalassi pushed a commit to branch release-1.16.0.1-acs in repository https://gitbox.apache.org/repos/asf/flink.git
commit d69e03bc4568325b9cd5608dbe19e0db84eddbd8 Author: Gyula Fora <g_f...@apple.com> AuthorDate: Mon Jun 20 13:44:43 2022 +0200 [apple][release] Added release branching scripts --- apple/README.md | 23 ++++++++++++ apple/create_release_branch.sh | 50 +++++++++++++++++++++++++ apple/release_rio_bump.patch.template | 70 +++++++++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+) diff --git a/apple/README.md b/apple/README.md new file mode 100644 index 00000000000..b3992e29351 --- /dev/null +++ b/apple/README.md @@ -0,0 +1,23 @@ +# ACS Flink Release Process + +## Bumping major / minor version on dev branch + +For this you can simply use the utility provided under `projectRoot/tools/change-version.sh` +Simply change to the tools directory, edit the `change-version.sh` script to match the current and target versions and run the script. + +After this make sure to also update the `rio.yml` dockerfile versions by hand. + +## Creating a new ACS Flink release + +The `projectRoot/create_release_branch.sh` script contains the logic necessary to create a new ACS release, including new branch, version and rio updates. +To use it, change to the `apple` directory, edit the `create_release_branch.sh` file so that the variables match the current and target verions, then execute the script. + +What you need to edit: +``` +MAJOR_VERSION=1 +MINOR_VERSION=14 +PATCH_VERSION=5 +ACS_VERSION=0 +``` + +The script assumes you are currently on the branch `release-$MAJOR_VERSION.$MINOR_VERSION-acs` and the current snapshot version is `$MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION-acs-SNAPSHOT`. diff --git a/apple/create_release_branch.sh b/apple/create_release_branch.sh new file mode 100755 index 00000000000..70b77653176 --- /dev/null +++ b/apple/create_release_branch.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +################################################################################ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +################################################################################ +set -e + +MAJOR_VERSION=1 +MINOR_VERSION=14 +PATCH_VERSION=5 +ACS_VERSION=0 + +OLD="$MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION-acs-SNAPSHOT" +RELEASE_VERSION="$MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION.$ACS_VERSION-acs" +BRANCH_NAME="release-$MAJOR_VERSION.$MINOR_VERSION-acs" + +HERE=` basename "$PWD"` +if [[ "$HERE" != "apple" ]]; then + echo "Please only execute in the apple/ directory"; + exit 1; +fi + +git checkout -b release-$RELEASE_VERSION + +# change version in all pom files +find .. -name 'pom.xml' -type f -exec perl -pi -e 's#<version>'"$OLD"'</version>#<version>'"$RELEASE_VERSION"'</version>#' {} \; + +# change version of the quickstart property +find .. -name 'pom.xml' -type f -exec perl -pi -e 's#<flink.version>'"$OLD"'</flink.version>#<flink.version>'"$RELEASE_VERSION"'</flink.version>#' {} \; + +git commit -am"[apple][release] Set release version to $RELEASE_VERSION" + +cd .. +sed -e "s/\${MINOR_VERSION}/${MINOR_VERSION}/" -e "s/\${PATCH_VERSION}/${PATCH_VERSION}/" -e "s/\${ACS_VERSION}/${ACS_VERSION}/" -e "s/\${RELEASE_VERSION}/${RELEASE_VERSION}/" -e "s/\${BRANCH_NAME}/${BRANCH_NAME}/" apple/release_rio_bump.patch.template | git apply + +git commit -am"[apple][release] Update rio.yaml for $RELEASE_VERSION" +cd apple diff --git a/apple/release_rio_bump.patch.template b/apple/release_rio_bump.patch.template new file mode 100644 index 00000000000..3c888d6b643 --- /dev/null +++ b/apple/release_rio_bump.patch.template @@ -0,0 +1,70 @@ +diff --git a/rio.yml b/rio.yml +index c5d8c8e6adf..e647cf3949f 100644 +--- a/rio.yml ++++ b/rio.yml +@@ -3,8 +3,8 @@ timeout: 120 + + pipelines: + # Pipeline to build Flink from Apple branch. +- - name: publish-${BRANCH_NAME} +- branchName: ${BRANCH_NAME} ++ - name: publish-release-${RELEASE_VERSION} ++ branchName: release-${RELEASE_VERSION} + machine: + baseImage: docker.apple.com/thomas-weise/flink-ci:latest + build: +@@ -21,7 +21,7 @@ pipelines: + - pushd /workspace/apple/docker; wget https://archive.apache.org/dist/hadoop/common/hadoop-3.3.1/hadoop-3.3.1.tar.gz; popd + package: + # enable for release (non -SNAPSHOT) builds +- # release: true ++ release: true + freeform: + - publish: + - repo: m2:oss-patched +@@ -29,20 +29,18 @@ pipelines: + - dockerfilePath: apple/docker/Dockerfile.base + context: apple/docker/ + perApplication: false +- version: "${PATCH_VERSION}-r${RIO_BUILD_NUMBER}" +- extraTags: [ "latest", "${PATCH_VERSION}-latest" ] ++ version: "${PATCH_VERSION}.${ACS_VERSION}" + publish: + - repo: docker.apple.com/acs-flink/flink-1.${MINOR_VERSION}-acs + - dockerfilePath: apple/docker/Dockerfile.hadoop + context: apple/docker/ + perApplication: false +- version: "${PATCH_VERSION}-r${RIO_BUILD_NUMBER}" +- extraTags: [ "latest", "${PATCH_VERSION}-latest" ] ++ version: "${PATCH_VERSION}.${ACS_VERSION}" + publish: + - repo: docker.apple.com/acs-flink/flink-1.${MINOR_VERSION}-acs-hadoop + +- - name: binary-${BRANCH_NAME} +- branchName: ${BRANCH_NAME} ++ - name: binary-release-${RELEASE_VERSION} ++ branchName: release-${RELEASE_VERSION} + machine: + baseImage: docker.apple.com/thomas-weise/flink-ci:latest + build: +@@ -60,19 +58,7 @@ pipelines: + - ci stage-lib "flink-$TIMED_VERSION.tgz,snapshot/org/apache/flink/flink-dist/$VERSION/" + package: + # enable for release (non -SNAPSHOT) builds +- # release: true ++ release: true + freeform: + - publish: + - repo: oss-patched-binaries-local +- +- - name: pull-request-${BRANCH_NAME} +- branchName: ${BRANCH_NAME} +- timeout: 600 +- machine: +- baseImage: docker.apple.com/thomas-weise/flink-ci:latest +- build: +- template: freestyle:v4:prb +- steps: +- - cd /workspace +- - rm -rf .staged-artifacts +- - mvn clean package -Phive-3.1.3.0-apple,s3-plugin -Dscala-2.12 -Dmaven.test.failure.ignore=true