Skip to content

Commit

Permalink
Merge pull request apache#10921 from ibzib/spark-container-publish
Browse files Browse the repository at this point in the history
[BEAM-9022] publish Spark job server Docker image
  • Loading branch information
ibzib authored Feb 21, 2020
2 parents 6ab6b12 + 3b4befd commit a24bc3b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
4 changes: 4 additions & 0 deletions release/src/main/scripts/build_release_candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ if [[ $confirmation = "y" ]]; then
./gradlew ":runners:flink:${ver}:job-server-container:dockerPush" -Pdocker-tag="${RELEASE}_rc${RC_NUM}"
done

echo '-------------Generating and Pushing Spark job server image-------------'
./gradlew ":runners:spark:job-server:container:dockerPush" -Pdocker-tag="${RELEASE}_rc${RC_NUM}"

rm -rf ~/${PYTHON_ARTIFACTS_DIR}

echo '-------------------Clean up images at local-----------------'
Expand All @@ -247,6 +250,7 @@ if [[ $confirmation = "y" ]]; then
for ver in "${FLINK_VER[@]}"; do
docker rmi -f "apachebeam/flink${ver}_job_server:${RELEASE}_rc${RC_NUM}"
done
docker rmi -f "apachebeam/spark_job_server:${RELEASE}_rc${RC_NUM}"
fi

echo "[Current Step]: Update beam-site"
Expand Down
19 changes: 19 additions & 0 deletions release/src/main/scripts/publish_docker_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,23 @@ if [[ $confirmation = "y" ]]; then
docker rmi -f "${FLINK_IMAGE_NAME}:${RELEASE}"
docker rmi -f "${FLINK_IMAGE_NAME}:latest"
done

echo '-------------Generating and Pushing Spark job server image-------------'
SPARK_IMAGE_NAME="apachebeam/spark_job_server"

# Pull verified RC from dockerhub.
docker pull "${SPARK_IMAGE_NAME}:${RELEASE}_${RC_VERSION}"

# Tag with ${RELEASE} and push to dockerhub.
docker tag "${SPARK_IMAGE_NAME}:${RELEASE}_${RC_VERSION}" "${SPARK_IMAGE_NAME}:${RELEASE}"
docker push "${SPARK_IMAGE_NAME}:${RELEASE}"

# Tag with latest and push to dockerhub.
docker tag "${SPARK_IMAGE_NAME}:${RELEASE}_${RC_VERSION}" "${SPARK_IMAGE_NAME}:latest"
docker push "${SPARK_IMAGE_NAME}:latest"

# Cleanup images from local
docker rmi -f "${SPARK_IMAGE_NAME}:${RELEASE}_${RC_VERSION}"
docker rmi -f "${SPARK_IMAGE_NAME}:${RELEASE}"
docker rmi -f "${SPARK_IMAGE_NAME}:latest"
fi
2 changes: 1 addition & 1 deletion runners/spark/job-server/container/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ task copyDockerfileDependencies(type: Copy) {
}

docker {
name containerImageName(name: 'spark-job-server',
name containerImageName(name: 'spark_job_server',
root: project.rootProject.hasProperty(["docker-repository-root"]) ?
project.rootProject["docker-repository-root"] : "apachebeam")
files "./build/"
Expand Down
7 changes: 7 additions & 0 deletions website/src/contribute/release-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,12 @@ for ver in "${FLINK_VER[@]}"; do
done
```
* Build Spark job server image and push to DockerHub.
```
./gradlew ":runners:spark:job-server:container:dockerPush" -Pdocker-tag="${RELEASE}_rc${RC_NUM}"
```
Clean up images from local
```
Expand All @@ -728,6 +734,7 @@ docker rmi -f apachebeam/go_sdk:${RELEASE}_rc{RC_NUM}
for ver in "${FLINK_VER[@]}"; do
docker rmi -f "apachebeam/flink${ver}_job_server:${RELEASE}_rc${RC_NUM}"
done
docker rmi -f "apachebeam/spark_job_server:${RELEASE}_rc${RC_NUM}"

```
Expand Down

0 comments on commit a24bc3b

Please sign in to comment.