Skip to content

Commit 55e3c1e

Browse files
committed
Revert "Build OSS branch for deploying to Cloud env (#11474)"
This reverts commit 189efe7.
1 parent f7d3a70 commit 55e3c1e

File tree

24 files changed

+39
-171
lines changed

24 files changed

+39
-171
lines changed

.github/actions/build-and-push-branch/action.yml

-63
This file was deleted.

airbyte-bootloader/Dockerfile

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
ARG JDK_VERSION=17.0.1
22
FROM openjdk:${JDK_VERSION}-slim
33

4-
ARG VERSION=0.35.65-alpha
5-
64
ENV APPLICATION airbyte-bootloader
7-
ENV VERSION ${VERSION}
85

96
WORKDIR /app
107

11-
ADD bin/${APPLICATION}-${VERSION}.tar /app
12-
8+
ADD bin/${APPLICATION}-0.35.65-alpha.tar /app
139

14-
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-${VERSION}/bin/${APPLICATION}"]
10+
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.35.65-alpha/bin/${APPLICATION}"]

airbyte-bootloader/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ task copyGeneratedTar(type: Copy) {
8080
into 'build/docker/bin'
8181
}
8282

83-
Task dockerBuildTask = getDockerBuildTask("bootloader", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
83+
Task dockerBuildTask = getDockerBuildTask("bootloader", "$project.projectDir")
8484
dockerBuildTask.dependsOn(copyGeneratedTar)
8585
assemble.dependsOn(dockerBuildTask)
8686

airbyte-cli/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Task dockerBuildTask = getDockerBuildTask("cli", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
1+
Task dockerBuildTask = getDockerBuildTask("cli", "$project.projectDir")
22
dockerBuildTask.dependsOn(copyDocker)
33
assemble.dependsOn(dockerBuildTask)

airbyte-commons/src/main/java/io/airbyte/commons/version/AirbyteVersion.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
public class AirbyteVersion {
1414

15-
public static final String DEV_VERSION_PREFIX = "dev";
15+
public static final String DEV_VERSION = "dev";
1616
public static final String AIRBYTE_VERSION_KEY_NAME = "airbyte_version";
1717

1818
private final String version;
@@ -25,7 +25,7 @@ public AirbyteVersion(final String version) {
2525
this.version = version;
2626
final String[] parsedVersion = version.replace("\n", "").strip().split("-")[0].split("\\.");
2727

28-
if (isDev()) {
28+
if (version.equals(DEV_VERSION)) {
2929
this.major = null;
3030
this.minor = null;
3131
this.patch = null;
@@ -66,7 +66,7 @@ public String getPatchVersion() {
6666
* Only the major and minor part of the Version is taken into account.
6767
*/
6868
public int compatibleVersionCompareTo(final AirbyteVersion another) {
69-
if (isDev() || another.isDev())
69+
if (version.equals(DEV_VERSION) || another.version.equals(DEV_VERSION))
7070
return 0;
7171
final int majorDiff = compareVersion(major, another.major);
7272
if (majorDiff != 0) {
@@ -100,7 +100,7 @@ public boolean lessThan(final AirbyteVersion other) {
100100
* Compares two Airbyte Version to check if they are equivalent (including patch version).
101101
*/
102102
public int patchVersionCompareTo(final AirbyteVersion another) {
103-
if (isDev() || another.isDev()) {
103+
if (version.equals(DEV_VERSION) || another.version.equals(DEV_VERSION)) {
104104
return 0;
105105
}
106106
final int majorDiff = compareVersion(major, another.major);
@@ -118,7 +118,7 @@ public int patchVersionCompareTo(final AirbyteVersion another) {
118118
* Compares two Airbyte Version to check if only the patch version was updated.
119119
*/
120120
public boolean checkOnlyPatchVersionIsUpdatedComparedTo(final AirbyteVersion another) {
121-
if (isDev() || another.isDev()) {
121+
if (version.equals(DEV_VERSION) || another.version.equals(DEV_VERSION)) {
122122
return false;
123123
}
124124
final int majorDiff = compareVersion(major, another.major);
@@ -133,7 +133,7 @@ public boolean checkOnlyPatchVersionIsUpdatedComparedTo(final AirbyteVersion ano
133133
}
134134

135135
public boolean isDev() {
136-
return version.startsWith(DEV_VERSION_PREFIX);
136+
return version.equals(DEV_VERSION);
137137
}
138138

139139
/**

airbyte-config/init/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ task copyScripts(type: Copy) {
1919
into 'build/docker/bin/scripts'
2020
}
2121

22-
Task dockerBuildTask = getDockerBuildTask("init", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
22+
Task dockerBuildTask = getDockerBuildTask("init", "$project.projectDir")
2323
dockerBuildTask.dependsOn(copyScripts)
2424
assemble.dependsOn(dockerBuildTask)

airbyte-container-orchestrator/Dockerfile

+3-6
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,13 @@ RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packa
2525
RUN echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
2626
RUN apt-get update && apt-get install -y kubectl
2727

28-
ARG VERSION=0.35.65-alpha
29-
3028
ENV APPLICATION airbyte-container-orchestrator
31-
ENV VERSION=${VERSION}
32-
ENV AIRBYTE_ENTRYPOINT "/app/${APPLICATION}-${VERSION}/bin/${APPLICATION}"
29+
ENV AIRBYTE_ENTRYPOINT "/app/${APPLICATION}-0.35.65-alpha/bin/${APPLICATION}"
3330

3431
WORKDIR /app
3532

3633
# Move orchestrator app
37-
ADD bin/${APPLICATION}-${VERSION}.tar /app
34+
ADD bin/${APPLICATION}-0.35.65-alpha.tar /app
3835

3936
# wait for upstream dependencies to become available before starting server
40-
ENTRYPOINT ["/bin/bash", "-c", "/app/${APPLICATION}-${VERSION}/bin/${APPLICATION}"]
37+
ENTRYPOINT ["/bin/bash", "-c", "/app/${APPLICATION}-0.35.65-alpha/bin/${APPLICATION}"]

airbyte-container-orchestrator/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ task copyGeneratedTar(type: Copy) {
4545
into 'build/docker/bin'
4646
}
4747

48-
Task dockerBuildTask = getDockerBuildTask("container-orchestrator", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
48+
Task dockerBuildTask = getDockerBuildTask("container-orchestrator", "$project.projectDir")
4949
dockerBuildTask.dependsOn(copyGeneratedTar)
5050
assemble.dependsOn(dockerBuildTask)

airbyte-db/lib/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ task copyInitSql(type: Copy) {
7979
into 'build/docker/bin'
8080
}
8181

82-
Task dockerBuildTask = getDockerBuildTask("db", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
82+
Task dockerBuildTask = getDockerBuildTask("db", "$project.projectDir")
8383
dockerBuildTask.dependsOn(copyInitSql)
8484
assemble.dependsOn(dockerBuildTask)

airbyte-integrations/bases/base-java/src/main/java/io/airbyte/integrations/base/IntegrationRunner.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ private static ITransaction createSentryTransaction(final Class<?> connectorClas
297297
final String version = parseConnectorVersion(env.getOrDefault("WORKER_CONNECTOR_IMAGE", ""));
298298
final String airbyteVersion = env.getOrDefault(EnvConfigs.AIRBYTE_VERSION, "");
299299
final String airbyteRole = env.getOrDefault(EnvConfigs.AIRBYTE_ROLE, "");
300-
final boolean isDev = version.startsWith(AirbyteVersion.DEV_VERSION_PREFIX)
301-
|| airbyteVersion.startsWith(AirbyteVersion.DEV_VERSION_PREFIX)
300+
final boolean isDev = version.equals(AirbyteVersion.DEV_VERSION)
301+
|| airbyteVersion.equals(AirbyteVersion.DEV_VERSION)
302302
|| airbyteRole.equals("airbyter");
303303
if (isDev) {
304304
LOGGER.debug("Skip Sentry transaction for dev environment");

airbyte-metrics/reporter/Dockerfile

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
ARG JDK_VERSION=17.0.1
22
FROM openjdk:${JDK_VERSION}-slim AS metrics-reporter
33

4-
ARG VERSION=0.35.65-alpha
5-
64
ENV APPLICATION airbyte-metrics-reporter
7-
ENV VERSION ${VERSION}
85

96
WORKDIR /app
107

11-
ADD bin/${APPLICATION}-${VERSION}.tar /app
12-
8+
ADD bin/${APPLICATION}-0.35.65-alpha.tar /app
139

1410
# wait for upstream dependencies to become available before starting server
15-
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-${VERSION}/bin/${APPLICATION}"]
11+
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.35.65-alpha/bin/${APPLICATION}"]

airbyte-metrics/reporter/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ task copyGeneratedTar(type: Copy) {
2525
into 'build/docker/bin'
2626
}
2727

28-
Task dockerBuildTask = getDockerBuildTask("metrics-reporter", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
28+
Task dockerBuildTask = getDockerBuildTask("metrics-reporter", "$project.projectDir")
2929
dockerBuildTask.dependsOn(copyGeneratedTar)
3030
assemble.dependsOn(dockerBuildTask)

airbyte-scheduler/app/Dockerfile

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
ARG JDK_VERSION=17.0.1
22
FROM openjdk:${JDK_VERSION}-slim AS scheduler
33

4-
ARG VERSION=0.35.65-alpha
5-
64
ENV APPLICATION airbyte-scheduler
7-
ENV VERSION ${VERSION}
85

96
WORKDIR /app
107

11-
ADD bin/${APPLICATION}-${VERSION}.tar /app
8+
ADD bin/${APPLICATION}-0.35.65-alpha.tar /app
129

1310
# wait for upstream dependencies to become available before starting server
14-
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-${VERSION}/bin/${APPLICATION}"]
11+
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.35.65-alpha/bin/${APPLICATION}"]

airbyte-scheduler/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ task copyGeneratedTar(type: Copy) {
6565
into 'build/docker/bin'
6666
}
6767

68-
Task dockerBuildTask = getDockerBuildTask("scheduler", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
68+
Task dockerBuildTask = getDockerBuildTask("scheduler", "$project.projectDir")
6969
dockerBuildTask.dependsOn(copyGeneratedTar)
7070
assemble.dependsOn(dockerBuildTask)

airbyte-server/Dockerfile

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@ FROM openjdk:${JDK_VERSION}-slim AS server
33

44
EXPOSE 8000
55

6-
ARG VERSION=0.35.65-alpha
7-
86
ENV APPLICATION airbyte-server
9-
ENV VERSION ${VERSION}
107

118
WORKDIR /app
129

13-
ADD bin/${APPLICATION}-${VERSION}.tar /app
10+
ADD bin/${APPLICATION}-0.35.65-alpha.tar /app
1411

1512
# wait for upstream dependencies to become available before starting server
16-
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-${VERSION}/bin/${APPLICATION}"]
13+
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.35.65-alpha/bin/${APPLICATION}"]

airbyte-server/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ task copyGeneratedTar(type: Copy) {
145145
into 'build/docker/bin'
146146
}
147147

148-
Task dockerBuildTask = getDockerBuildTask("server", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
148+
Task dockerBuildTask = getDockerBuildTask("server", "$project.projectDir")
149149
dockerBuildTask.dependsOn(copyGeneratedTar)
150150
assemble.dependsOn(dockerBuildTask)
151151

airbyte-temporal/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ task copyScripts(type: Copy) {
55
into 'build/docker/bin/scripts'
66
}
77

8-
Task dockerBuildTask = getDockerBuildTask("temporal", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
8+
Task dockerBuildTask = getDockerBuildTask("temporal", "$project.projectDir")
99
dockerBuildTask.dependsOn(copyScripts)
1010
assemble.dependsOn(dockerBuildTask)

airbyte-webapp/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ copyAssets.dependsOn npm_run_build
8282
assemble.dependsOn copyDocs
8383
copyDocker.dependsOn(npm_run_build)
8484

85-
Task dockerBuildTask = getDockerBuildTask("webapp", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
85+
Task dockerBuildTask = getDockerBuildTask("webapp", "$project.projectDir")
8686
dockerBuildTask.dependsOn(copyBuild)
8787
dockerBuildTask.dependsOn(copyNginx)
8888
dockerBuildTask.dependsOn(copyDocs)
8989
dockerBuildTask.dependsOn(copyAssets)
90-
assemble.dependsOn(dockerBuildTask)
90+
assemble.dependsOn(dockerBuildTask)

airbyte-workers/Dockerfile

+2-5
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,12 @@ RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packa
2525
RUN echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
2626
RUN apt-get update && apt-get install -y kubectl
2727

28-
ARG VERSION=0.35.65-alpha
29-
3028
ENV APPLICATION airbyte-workers
31-
ENV VERSION ${VERSION}
3229

3330
WORKDIR /app
3431

3532
# Move worker app
36-
ADD bin/${APPLICATION}-${VERSION}.tar /app
33+
ADD bin/${APPLICATION}-0.35.65-alpha.tar /app
3734

3835
# wait for upstream dependencies to become available before starting server
39-
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-${VERSION}/bin/${APPLICATION}"]
36+
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.35.65-alpha/bin/${APPLICATION}"]

airbyte-workers/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ task copyGeneratedTar(type: Copy) {
7676
into 'build/docker/bin'
7777
}
7878

79-
Task dockerBuildTask = getDockerBuildTask("worker", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
79+
Task dockerBuildTask = getDockerBuildTask("worker", "$project.projectDir")
8080
dockerBuildTask.dependsOn(copyGeneratedTar)
8181
assemble.dependsOn(dockerBuildTask)
8282

build.gradle

+3-12
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,6 @@ if (!env.containsKey('VERSION')) {
3030
throw new Exception('Version not specified in .env file...')
3131
}
3232

33-
// `version` is used as the application build version for artifacts like jars
34-
// `image_tag` is used as the docker tag applied to built images.
35-
// These values are the same for building an specific Airbyte release or branch via the 'VERSION' environment variable.
36-
// For local development builds, the 'VERSION' environment variable is unset, and built images are tagged with 'dev'.
37-
ext {
38-
version = System.getenv("VERSION") ?: env.VERSION
39-
image_tag = System.getenv("VERSION") ?: 'dev'
40-
}
41-
4233
def createLicenseWith = { File license, String startComment, String endComment, String lineComment, boolean isPython ->
4334
/*
4435
In java, we don't have a second linter/styling tool other than spotless so it doesn't really
@@ -138,8 +129,9 @@ spotless {
138129
check.dependsOn 'spotlessApply'
139130

140131
@SuppressWarnings('GroovyAssignabilityCheck')
141-
def Task getDockerBuildTask(String artifactName, String projectDir, String buildVersion, String buildTag) {
132+
def Task getDockerBuildTask(String artifactName, String projectDir) {
142133
return task ("buildDockerImage-$artifactName"(type: DockerBuildImage) {
134+
def buildTag = System.getenv('VERSION') ?: 'dev'
143135
def jdkVersion = System.getenv('JDK_VERSION') ?: '17.0.1'
144136

145137
def arch = System.getProperty("os.arch").toLowerCase()
@@ -157,7 +149,6 @@ def Task getDockerBuildTask(String artifactName, String projectDir, String build
157149
buildArgs.put('DOCKER_BUILD_ARCH', buildArch)
158150
buildArgs.put('ALPINE_IMAGE', alpineImage)
159151
buildArgs.put('POSTGRES_IMAGE', postgresImage)
160-
buildArgs.put('VERSION', buildVersion)
161152
})
162153
}
163154

@@ -179,7 +170,7 @@ allprojects {
179170
group = "io.${rootProject.name}${sub.isEmpty() ? '' : ".$sub"}"
180171
project.archivesBaseName = "${project.group}-${project.name}"
181172

182-
version = rootProject.ext.version
173+
version = env.VERSION
183174
}
184175

185176
// Java projects common configurations

0 commit comments

Comments
 (0)