Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#4072] improvement(docker-image): Transfer docker hub from datastrato to apache #4523

Merged
merged 29 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8160b7f
[#4445] feat(docker): Publish Docker image to Apache official DockerH…
xunliu Aug 8, 2024
730d016
tmp
xunliu Aug 8, 2024
4a27da0
Update docs
xunliu Aug 8, 2024
330d059
Change docker image.
yuqi1129 Aug 14, 2024
ef87a09
test
yuqi1129 Aug 14, 2024
f571c6d
test
yuqi1129 Aug 14, 2024
846d9cc
Fix
yuqi1129 Aug 14, 2024
32e9509
Merge branch 'main' of github.com:datastrato/graviton into issue-4445…
yuqi1129 Aug 14, 2024
63af7d4
Fix
yuqi1129 Aug 14, 2024
6adfa3b
Fix
yuqi1129 Aug 14, 2024
f715e60
Fix
yuqi1129 Aug 15, 2024
d63c68d
Fix
yuqi1129 Aug 15, 2024
d7c926f
Fix
yuqi1129 Aug 15, 2024
5375762
Merge branch 'main' of github.com:datastrato/graviton into issue-4445…
yuqi1129 Aug 15, 2024
54a5a02
Resolve docker naming for Gravitio.
yuqi1129 Aug 15, 2024
cc288c8
Resolve docker naming for Gravitio.
yuqi1129 Aug 15, 2024
9b242e2
Merge branch 'main' of github.com:datastrato/graviton into issue-4445…
yuqi1129 Aug 15, 2024
6a31c1f
Fix
yuqi1129 Aug 15, 2024
4aa1a57
Merge branch 'main' of github.com:datastrato/graviton into issue-4445…
yuqi1129 Aug 16, 2024
fd15a61
Fix comments
yuqi1129 Aug 16, 2024
415df73
Refactor test environment
yuqi1129 Aug 16, 2024
41d2a35
Fix test error.
yuqi1129 Aug 16, 2024
719024b
Fix the version problem.
yuqi1129 Aug 16, 2024
5dd87bc
Change `gravitino-iceberg-rest-server` to `gravitino-iceberg-rest`.
yuqi1129 Aug 16, 2024
6395896
Fix docs in publish-docker-image.jpg
yuqi1129 Aug 16, 2024
53d72bb
Completely replace all docker hub username from `datastrato` to `apache`
yuqi1129 Aug 16, 2024
28de08a
fix
yuqi1129 Aug 17, 2024
0cbcba4
Merge branch 'main' of github.com:datastrato/graviton into issue-4445…
yuqi1129 Aug 19, 2024
acd3da5
fix
yuqi1129 Aug 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 49 additions & 30 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@ on:
default: 'gravitino'
options:
- 'gravitino'
- 'gravitino-ci-hive'
- 'gravitino-ci-kerberos-hive'
- 'gravitino-ci-trino'
- 'gravitino-ci-doris'
- 'gravitino-ci-ranger'
- 'gravitino-ci:hive'
- 'gravitino-ci:kerberos-hive'
- 'gravitino-ci:trino'
- 'gravitino-ci:doris'
- 'gravitino-ci:ranger'
- 'gravitino-playground:trino'
- 'gravitino-playground:hive'
- 'gravitino-playground:ranger'
- 'gravitino-iceberg-rest-server'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you update this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the display name in GitHub image actions, I've already updated the final image name. Please refer to line 84.

- 'trino'
- 'hive'
- 'ranger'
tag:
description: 'Docker tag to apply to this image'
version:
description: 'Docker version to apply to this image'
required: true
type: string

username:
description: 'Docker username'
required: true
type: string
token:
Expand All @@ -38,36 +43,45 @@ jobs:
steps:
- name: Set environment variables
run: |
if [ "${{ github.event.inputs.image }}" == "gravitino-ci-hive" ]; then
if [ "${{ github.event.inputs.image }}" == "gravitino-ci:hive" ]; then
echo "image_type=hive" >> $GITHUB_ENV
echo "image_name=datastrato/gravitino-ci-hive" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci-kerberos-hive" ]; then
echo "image_name=apache/gravitino-ci" >> $GITHUB_ENV
echo "tag_name=hive" >> $GITHUB_ENV
mchades marked this conversation as resolved.
Show resolved Hide resolved
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci:kerberos-hive" ]; then
echo "image_type=kerberos-hive" >> $GITHUB_ENV
echo "image_name=datastrato/gravitino-ci-kerberos-hive" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci-trino" ]; then
echo "image_name=apache/gravitino-ci" >> $GITHUB_ENV
echo "tag_name=kerberos-hive" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci:trino" ]; then
echo "image_type=trino" >> $GITHUB_ENV
echo "image_name=datastrato/gravitino-ci-trino" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci-doris" ]; then
echo "image_name=apache/gravitino-ci" >> $GITHUB_ENV
echo "tag_name=trino" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci:doris" ]; then
echo "image_type=doris" >> $GITHUB_ENV
echo "image_name=datastrato/gravitino-ci-doris" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci-ranger" ]; then
echo "image_name=apache/gravitino-ci" >> $GITHUB_ENV
echo "tag_name=doris" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci:ranger" ]; then
echo "image_type=ranger" >> $GITHUB_ENV
echo "image_name=datastrato/gravitino-ci-ranger" >> $GITHUB_ENV
echo "image_name=apache/gravitino-ci" >> $GITHUB_ENV
echo "tag_name=ranger" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino" ]; then
echo "image_type=gravitino" >> $GITHUB_ENV
echo "image_name=datastrato/gravitino" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "trino" ]; then
echo "image_name=apache/gravitino" >> $GITHUB_ENV
# `apache/gravitino` is the default image name, didn't need to tag alias name
elif [ "${{ github.event.inputs.image }}" == "gravitino-playground:trino" ]; then
echo "image_type=trino" >> $GITHUB_ENV
echo "image_name=datastrato/trino" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "hive" ]; then
echo "image_name=apache/gravitino-playground" >> $GITHUB_ENV
echo "tag_name=trino" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-playground:hive" ]; then
echo "image_type=hive" >> $GITHUB_ENV
echo "image_name=datastrato/hive" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "ranger" ]; then
echo "image_name=apache/gravitino-playground" >> $GITHUB_ENV
echo "tag_name=hive" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-playground:ranger" ]; then
echo "image_type=ranger" >> $GITHUB_ENV
echo "image_name=datastrato/ranger" >> $GITHUB_ENV
echo "image_name=apache/gravitino-playground" >> $GITHUB_ENV
echo "tag_name=ranger" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-iceberg-rest-server" ]; then
echo "image_type=iceberg-rest-server" >> $GITHUB_ENV
echo "image_name=datastrato/gravitino-iceberg-rest-server" >> $GITHUB_ENV
echo "image_name=apache/gravitino-iceberg-rest-server" >> $GITHUB_ENV
fi

- name: Check publish Docker token
Expand All @@ -83,7 +97,7 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: datastrato
username: ${{ github.event.inputs.username }}
password: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}

- name: Set up Docker Buildx
Expand All @@ -100,4 +114,9 @@ jobs:
run: |
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${{ github.event.inputs.tag }} --latest

if [[ "${image_type}" == "gravitino" || "{image_type}" == "gravitino-iceberg-rest-server" ]]; then
./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${{ github.event.inputs.version }}
else
./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag "${tag_name}-${{ github.event.inputs.version }}" --latest
fi
8 changes: 8 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ allprojects {
param.environment("HADOOP_HOME", "/tmp")
param.environment("PROJECT_VERSION", project.version)

// Gravitino CI Docker image
param.environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "apache/gravitino-ci:hive-0.1.13")
param.environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "apache/gravitino-ci:kerberos-hive-0.1.5")
param.environment("GRAVITINO_CI_DORIS_DOCKER_IMAGE", "apache/gravitino-ci:doris-0.1.5")
param.environment("GRAVITINO_CI_TRINO_DOCKER_IMAGE", "apache/gravitino-ci:trino-0.1.6")
param.environment("GRAVITINO_CI_RANGER_DOCKER_IMAGE", "apache/gravitino-ci:ranger-0.1.1")
param.environment("GRAVITINO_CI_KAFKA_DOCKER_IMAGE", "apache/kafka:3.7.0")
yuqi1129 marked this conversation as resolved.
Show resolved Hide resolved

val dockerRunning = project.rootProject.extra["dockerRunning"] as? Boolean ?: false
val macDockerConnector = project.rootProject.extra["macDockerConnector"] as? Boolean ?: false
if (OperatingSystem.current().isMacOsX() &&
Expand Down
5 changes: 0 additions & 5 deletions catalogs/catalog-hadoop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,6 @@ tasks.test {
} else {
dependsOn(tasks.jar)

doFirst {
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.13")
environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-kerberos-hive:0.1.5")
}

val init = project.extra.get("initIntegrationTest") as (Test) -> Unit
init(this)
}
Expand Down
5 changes: 0 additions & 5 deletions catalogs/catalog-hive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,6 @@ tasks.test {
} else {
dependsOn(tasks.jar)

doFirst {
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.13")
environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-kerberos-hive:0.1.5")
}

val init = project.extra.get("initIntegrationTest") as (Test) -> Unit
init(this)
}
Expand Down
6 changes: 1 addition & 5 deletions catalogs/catalog-jdbc-doris/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,11 @@ tasks {

tasks.test {
val skipUTs = project.hasProperty("skipTests")
doFirst {
environment("GRAVITINO_CI_DORIS_DOCKER_IMAGE", "datastrato/gravitino-ci-doris:0.1.5")
}

if (skipUTs) {
// Only run integration tests
include("**/integration/**")
}

environment("GRAVITINO_CI_DORIS_DOCKER_IMAGE", "apache/gravitino-ci:doris-0.1.5")
yuqi1129 marked this conversation as resolved.
Show resolved Hide resolved
val skipITs = project.hasProperty("skipITs")
if (skipITs) {
// Exclude integration tests
Expand Down
4 changes: 0 additions & 4 deletions catalogs/catalog-kafka/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ tasks.test {
} else {
dependsOn(tasks.jar)

doFirst {
environment("GRAVITINO_CI_KAFKA_DOCKER_IMAGE", "apache/kafka:3.7.0")
}

val init = project.extra.get("initIntegrationTest") as (Test) -> Unit
init(this)
}
Expand Down
5 changes: 0 additions & 5 deletions catalogs/catalog-lakehouse-iceberg/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@ tasks.test {
} else {
dependsOn(tasks.jar)

doFirst {
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.13")
environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-kerberos-hive:0.1.5")
}

val init = project.extra.get("initIntegrationTest") as (Test) -> Unit
init(this)
}
Expand Down
5 changes: 0 additions & 5 deletions catalogs/catalog-lakehouse-paimon/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ tasks.test {
} else {
dependsOn(tasks.jar)

doFirst {
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.13")
environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-kerberos-hive:0.1.3")
}

val init = project.extra.get("initIntegrationTest") as (Test) -> Unit
init(this)
}
Expand Down
2 changes: 1 addition & 1 deletion clients/client-python/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ tasks {
"GRAVITINO_HOME" to project.rootDir.path + "/distribution/package",
"START_EXTERNAL_GRAVITINO" to "true",
"DOCKER_TEST" to dockerTest.toString(),
"GRAVITINO_CI_HIVE_DOCKER_IMAGE" to "datastrato/gravitino-ci-hive:0.1.13",
"GRAVITINO_CI_HIVE_DOCKER_IMAGE" to "apache/gravitino-ci:hive-0.1.13",
// Set the PYTHONPATH to the client-python directory, make sure the tests can import the
// modules from the client-python directory.
"PYTHONPATH" to "${project.rootDir.path}/clients/client-python"
Expand Down
Loading
Loading