Skip to content

Commit a2c6a98

Browse files
chore: update airbyte-gradle to 0.65 (#16598)
1 parent ff3ba4c commit a2c6a98

File tree

3 files changed

+29
-24
lines changed

3 files changed

+29
-24
lines changed

airbyte-connector-builder-server/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
1+
import io.airbyte.gradle.tasks.DockerBuildxTask
22
import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
33

44
plugins {
@@ -185,7 +185,7 @@ val copyPythonDeps =
185185
into("${project.layout.buildDirectory.get()}/airbyte/docker/")
186186
}
187187
//
188-
tasks.named<DockerBuildImage>("dockerBuildImage") {
188+
tasks.named<DockerBuildxTask>("dockerBuildImage") {
189189
// Set build args
190190
// Current CDK version(used by the Connector Builder and workers running Connector Builder connectors
191191
val cdkVersion: String = File((ext["ossRootProject"] as Project).projectDir, "airbyte-connector-builder-resources/CDK_VERSION").readText().trim()

airbyte-webapp/build.gradle.kts

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ fun parseIgnoreFile(f: File): List<String> {
3030
return ignores
3131
}
3232

33-
3433
// Use the node version that's defined in the .nvmrc file
35-
val nodeVersion = file("${projectDir}/.nvmrc").readText().trim()
34+
val nodeVersion = file("$projectDir/.nvmrc").readText().trim()
3635

3736
// Read pnpm version to use from package.json engines.pnpm entry
38-
val parsedJson = JsonSlurper().parse(FileReader("${projectDir}/package.json")) as Map<*, *> // Cast to Map
39-
val engines = parsedJson["engines"] as? Map<*, *> // Safely cast to Map if 'engines' exists
40-
val pnpmVer = engines?.get("pnpm")?.toString()?.trim() // Extract 'pnpm' as String and trim
37+
val parsedJson = JsonSlurper().parse(FileReader("$projectDir/package.json")) as Map<*, *> // Cast to Map
38+
val engines = parsedJson["engines"] as? Map<*, *> // Safely cast to Map if 'engines' exists
39+
val pnpmVer = engines?.get("pnpm")?.toString()?.trim() // Extract 'pnpm' as String and trim
4140

4241
/**
4342
* A list of all files outside the webapp folder, that the webapp build depends on, i.e.
4443
* if those change we can't reuse a cached build.
4544
*/
46-
val outsideWebappDependencies = listOf(
45+
val outsideWebappDependencies =
46+
listOf(
4747
project(":oss:airbyte-api:server-api").file("src/main/openapi/config.yaml").path,
4848
project(":oss:airbyte-api:problems-api").file("src/main/openapi/api-problems.yaml").path,
4949
project(":oss:airbyte-connector-builder-server").file("src/main/openapi/openapi.yaml").path,
@@ -68,19 +68,21 @@ tasks.named("pnpmInstall") {
6868
/*
6969
Add patches folder to inputs of pnpmInstall task, since it has pnpm-lock.yml as an output
7070
thus wouldn't rerun in case a patch get changed
71-
*/
71+
*/
7272
inputs.dir("patches")
7373
}
7474

7575
// fileTree to watch node_modules, but exclude the .cache dir since that might have changes on every build
76-
val nodeModules = fileTree("node_modules") {
76+
val nodeModules =
77+
fileTree("node_modules") {
7778
exclude(".cache")
7879
}
7980

8081
/**
8182
* All files inside the webapp folder that aren't gitignored
8283
*/
83-
val allFiles = fileTree(".") {
84+
val allFiles =
85+
fileTree(".") {
8486
exclude(parseIgnoreFile(file("../.gitignore")))
8587
exclude(parseIgnoreFile(file(".gitignore")))
8688
exclude(parseIgnoreFile(file("./src/core/api/generated/.gitignore")))
@@ -115,14 +117,14 @@ tasks.register<PnpmTask>("pnpmBuild") {
115117

116118
tasks.register<PnpmTask>("test") {
117119
dependsOn("pnpmInstall")
118-
120+
119121
args = listOf("run", "test:ci")
120122
inputs.files(allFiles, outsideWebappDependencies)
121123

122124
/*
123125
The test has no outputs, thus we always treat the outputs up to date
124126
as long as the inputs have not changed
125-
*/
127+
*/
126128
outputs.upToDateWhen { true }
127129
}
128130

@@ -132,9 +134,10 @@ tasks.register<PnpmTask>("cypress") {
132134
/*
133135
If the cypressWebappKey property has been set from the outside via the workflow file
134136
we'll record the cypress session, otherwise we're not recording
135-
*/
137+
*/
136138
val hasRecordingKey = !System.getenv("CYPRESS_RECORD_KEY").isNullOrEmpty()
137-
args = if (hasRecordingKey && System.getProperty("cypressRecord", "false") == "true") {
139+
args =
140+
if (hasRecordingKey && System.getProperty("cypressRecord", "false") == "true") {
138141
val group = System.getenv("CYPRESS_GROUP") ?: "default-group"
139142
listOf("run", "cypress:run", "--record", "--group", group)
140143
} else {
@@ -144,7 +147,7 @@ tasks.register<PnpmTask>("cypress") {
144147
/*
145148
Mark the outputs as never up to date, to ensure we always run the tests.
146149
We want this because they are e2e tests and can depend on other factors e.g., external dependencies.
147-
*/
150+
*/
148151
outputs.upToDateWhen { false }
149152
}
150153

@@ -211,8 +214,9 @@ tasks.register<PnpmTask>("buildStorybook") {
211214

212215
outputs.dir("build/storybook")
213216

214-
environment = mapOf(
215-
"NODE_OPTIONS" to "--max_old_space_size=8192"
217+
environment =
218+
mapOf(
219+
"NODE_OPTIONS" to "--max_old_space_size=8192",
216220
)
217221
}
218222

@@ -240,6 +244,7 @@ tasks.named("build") {
240244
tasks.register<DockerBuildxTask>(TASK_DOCKER_BUILD) {
241245
dependsOn("copyNginx", "copyBuildOutput")
242246
imageName = "webapp"
247+
dockerfile = project.layout.projectDirectory.file("Dockerfile")
243248

244249
if (cloudEnv.isNotEmpty()) {
245250
buildArgs.put("NGINX_CONFIG", "bin/nginx/cloud.conf.template")

build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ plugins {
2626
id "base"
2727
id "com.dorongold.task-tree" version "2.1.1"
2828

29-
id "io.airbyte.gradle.jvm" version "0.64.0" apply false
30-
id "io.airbyte.gradle.jvm.app" version "0.64.0" apply false
31-
id "io.airbyte.gradle.jvm.lib" version "0.64.0" apply false
32-
id "io.airbyte.gradle.docker" version "0.64.0" apply false
33-
id "io.airbyte.gradle.publish" version "0.64.0" apply false
34-
id "io.airbyte.gradle.kube-reload" version "0.64.0" apply false
29+
id "io.airbyte.gradle.jvm" version "0.65.0" apply false
30+
id "io.airbyte.gradle.jvm.app" version "0.65.0" apply false
31+
id "io.airbyte.gradle.jvm.lib" version "0.65.0" apply false
32+
id "io.airbyte.gradle.docker" version "0.65.0" apply false
33+
id "io.airbyte.gradle.publish" version "0.65.0" apply false
34+
id "io.airbyte.gradle.kube-reload" version "0.65.0" apply false
3535
// uncomment for testing plugin locally
3636
// id "io.airbyte.gradle.jvm" version "local-test" apply false
3737
// id "io.airbyte.gradle.jvm.app" version "local-test" apply false

0 commit comments

Comments
 (0)