3
3
import shlex
4
4
from collections import OrderedDict
5
5
6
- DOCKER_REGISTRY = "confluent-docker-internal-stabilization.jfrog.io/"
7
6
DOCKER_INTERNAL_REGISTRY = "confluent-docker-internal.jfrog.io/"
8
- DOCKER_UPSTREAM_REGISTRY = "confluent-docker.jfrog.io/"
7
+ DOCKER_REGISTRY = "confluent-docker.jfrog.io/"
9
8
CC_SPEC_KSQL_BRANCH = "master"
10
9
CCLOUD_DOCKER_REPO = 'confluentinc/cc-ksql'
11
10
CCLOUD_DOCKER_HOTFIX_REPO = 'confluentinc/cc-ksql-hotfix'
@@ -19,19 +18,18 @@ class Callbacks:
19
18
def __init__ (self , working_dir , leaf , dry_run ):
20
19
self .leaf = leaf
21
20
self .working_dir = working_dir
22
- self .settings_path = os .path .join (self .working_dir , 'stabilization_settings.xml' )
23
21
24
22
"""This is a callback to Confluent's cloud release tooling,
25
23
and allows us to have consistent versioning"""
26
24
def version_as_leaf (self ):
27
25
return self .leaf == 'cc-docker-ksql'
28
26
29
27
def maven_build_args (self ):
30
- build_args = ["-gs" , f" { self . settings_path } " , "- DskipTests" , "-DskipIntegrationTests" , "-DversionFilter=true" , "-U" , "-Dspotbugs.skip" , "-Dcheckstyle.skip" ]
28
+ build_args = ["-DskipTests" , "-DskipIntegrationTests" , "-DversionFilter=true" , "-U" , "-Dspotbugs.skip" , "-Dcheckstyle.skip" ]
31
29
return build_args
32
30
33
31
def maven_deploy_args (self ):
34
- deploy_args = ["-gs " , f" { self . settings_path } " , " -DskipIntegrationTests" , "-DversionFilter=true" , "-U" , "-DskipTests " ]
32
+ deploy_args = ["-DskipTests " , " -DskipIntegrationTests" , "-DversionFilter=true" , "-U" ]
35
33
return deploy_args
36
34
37
35
def maven_docker_build (self ):
@@ -40,8 +38,8 @@ def maven_docker_build(self):
40
38
# defaults docker.tag to be version created by stabilization
41
39
# mvn_docker_args["docker.tag"] =
42
40
43
- mvn_docker_args ["docker.registry" ] = DOCKER_UPSTREAM_REGISTRY
44
- mvn_docker_args ["docker.test-registry" ] = DOCKER_UPSTREAM_REGISTRY
41
+ mvn_docker_args ["docker.registry" ] = DOCKER_REGISTRY
42
+ mvn_docker_args ["docker.test-registry" ] = DOCKER_REGISTRY
45
43
mvn_docker_args ["docker.upstream-registry" ] = ""
46
44
mvn_docker_args ["docker.upstream-tag" ] = "7.0.1"
47
45
mvn_docker_args ["skip.docker.build" ] = "false"
@@ -56,31 +54,31 @@ def after_publish(self, version: str) -> bool:
56
54
if "rc" not in version :
57
55
# promote production images to dockerhub
58
56
for docker_repo in DOCKER_REPOS :
59
- print (f"docker pull { DOCKER_UPSTREAM_REGISTRY } { docker_repo } :{ version } " )
60
- subprocess .run (shlex .split (f"docker pull { DOCKER_UPSTREAM_REGISTRY } { docker_repo } :{ version } " ))
57
+ print (f"docker pull { DOCKER_REGISTRY } { docker_repo } :{ version } " )
58
+ subprocess .run (shlex .split (f"docker pull { DOCKER_REGISTRY } { docker_repo } :{ version } " ))
61
59
62
- print (f"docker tag { DOCKER_UPSTREAM_REGISTRY } { docker_repo } :{ version } { docker_repo } :{ version } " )
63
- subprocess .run (shlex .split (f"docker tag { DOCKER_UPSTREAM_REGISTRY } { docker_repo } :{ version } { docker_repo } :{ version } " ))
60
+ print (f"docker tag { DOCKER_REGISTRY } { docker_repo } :{ version } { docker_repo } :{ version } " )
61
+ subprocess .run (shlex .split (f"docker tag { DOCKER_REGISTRY } { docker_repo } :{ version } { docker_repo } :{ version } " ))
64
62
print (f"docker push { docker_repo } :{ version } " )
65
63
subprocess .run (shlex .split (f"docker push { docker_repo } :{ version } " ))
66
64
67
65
# update latest tag images on dockerhub
68
- print (f"docker tag { DOCKER_UPSTREAM_REGISTRY } { docker_repo } :{ version } { docker_repo } :latest" )
69
- subprocess .run (shlex .split (f"docker tag { DOCKER_UPSTREAM_REGISTRY } { docker_repo } :{ version } { docker_repo } :latest" ))
66
+ print (f"docker tag { DOCKER_REGISTRY } { docker_repo } :{ version } { docker_repo } :latest" )
67
+ subprocess .run (shlex .split (f"docker tag { DOCKER_REGISTRY } { docker_repo } :{ version } { docker_repo } :latest" ))
70
68
print (f"docker push { docker_repo } :latest" )
71
69
subprocess .run (shlex .split (f"docker push { docker_repo } :latest" ))
72
70
73
71
# pull, tag, and push latest docker on-prem images
74
72
for docker_repo in DOCKER_REPOS :
75
- print (f"docker tag { DOCKER_UPSTREAM_REGISTRY } { DOCKER_ARTIFACT } :{ version } { DOCKER_INTERNAL_REGISTRY } { docker_repo } :{ version } " )
76
- subprocess .run (shlex .split (f"docker tag { DOCKER_UPSTREAM_REGISTRY } { DOCKER_ARTIFACT } :{ version } { DOCKER_INTERNAL_REGISTRY } { docker_repo } :{ version } " ))
73
+ print (f"docker tag { DOCKER_REGISTRY } { DOCKER_ARTIFACT } :{ version } { DOCKER_INTERNAL_REGISTRY } { docker_repo } :{ version } " )
74
+ subprocess .run (shlex .split (f"docker tag { DOCKER_REGISTRY } { DOCKER_ARTIFACT } :{ version } { DOCKER_INTERNAL_REGISTRY } { docker_repo } :{ version } " ))
77
75
print (f"docker push { DOCKER_INTERNAL_REGISTRY } { docker_repo } :{ version } " )
78
76
subprocess .run (shlex .split (f"docker push { DOCKER_INTERNAL_REGISTRY } { docker_repo } :{ version } " ))
79
77
78
+ # clone kafka tutorials and checkout 'ksqldb-latest'
80
79
git_cmd_kafka_tutorial = f"git --git-dir={ self .working_dir } /kafka-tutorials/.git --work-tree={ self .working_dir } /kafka-tutorials"
81
80
print (f"{ git_cmd_kafka_tutorial } " )
82
81
83
- # clone kafka tutorials and checkout 'ksqldb-latest'
84
82
kafka_tutorials_cwd = os .path .join (self .working_dir , 'kafka-tutorials' )
85
83
print (f"{ kafka_tutorials_cwd } " )
86
84
@@ -94,8 +92,8 @@ def after_publish(self, version: str) -> bool:
94
92
print (f"{ kafka_tutorials_cwd } " )
95
93
print (f"{ self .working_dir } " )
96
94
update_ksqldb_version_path = os .path .join (self .working_dir , 'kafka-tutorials/tools/update-ksqldb-version.sh' )
97
- print (f"{ update_ksqldb_version_path } { version } { DOCKER_UPSTREAM_REGISTRY } " )
98
- subprocess .run (shlex .split (f"{ update_ksqldb_version_path } { version } { DOCKER_UPSTREAM_REGISTRY } " ))
95
+ print (f"{ update_ksqldb_version_path } { version } { DOCKER_REGISTRY } " )
96
+ subprocess .run (shlex .split (f"{ update_ksqldb_version_path } { version } { DOCKER_REGISTRY } " ))
99
97
100
98
print (f"{ git_cmd_kafka_tutorial } diff" )
101
99
subprocess .run (shlex .split (f"{ git_cmd_kafka_tutorial } diff" ), cwd = kafka_tutorials_cwd )
0 commit comments