Skip to content

Commit

Permalink
[PLAT-12564][YBA] Added a way to add support/thirdparty-dependencies.…
Browse files Browse the repository at this point in the history
…txt in YBA tarball

Summary:
- I added a way to copy the `managed/support/thirdparty-dependencies.txt` in `managed/src/main/resources/` to be part of the YBA tarball.

The following diff (https://phorge.dev.yugabyte.com/D32483) needed these changes.

Test Plan:
- I used the `dev-build-job` to create the YBA docker image using both the diffs.
  - https://jenkins.dev.yugabyte.com/job/dev-build-job/26892/
  - https://jenkins.dev.yugabyte.com/job/dev-build-job/27244/
  - https://jenkins.dev.yugabyte.com/view/Dev/job/dev-itest-pipeline/1578/
  - https://jenkins.dev.yugabyte.com/view/Dev/job/dev-itest-pipeline/1582/

Reviewers: sanketh, bgandhi, anijhawan, muthu

Reviewed By: anijhawan, muthu

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D32671
  • Loading branch information
baba230896 committed Mar 8, 2024
1 parent e939019 commit 6a12204
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions managed/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import play.sbt.PlayInteractionMode
import java.io.File
import java.nio.charset.StandardCharsets
import java.nio.file.{FileSystems, Files, Paths}
import java.io.IOException
import sbt.complete.Parsers.spaceDelimited
import sbt.Tests._

Expand Down Expand Up @@ -102,6 +103,8 @@ lazy val buildModules = taskKey[Int]("Build modules")
lazy val buildDependentArtifacts = taskKey[Int]("Build dependent artifacts")
lazy val releaseModulesLocally = taskKey[Int]("Release modules locally")
lazy val downloadThirdPartyDeps = taskKey[Int]("Downloading thirdparty dependencies")
lazy val copyThirdPartyDepsTxt = taskKey[Int](
"Copy thirdparty-dependencies.txt from managed/support to managed/src/main/resources")
lazy val devSpaceReload = taskKey[Int]("Do a build without UI for DevSpace and reload")

lazy val cleanUI = taskKey[Int]("Clean UI")
Expand Down Expand Up @@ -411,6 +414,7 @@ buildDependentArtifacts := {
openApiProcessClients.value
generateCrdObjects.value
generateOssConfig.value
copyThirdPartyDepsTxt.value
val status = Process("mvn install -P buildDependenciesOnly", baseDirectory.value / "parent-module").!
status
}
Expand Down Expand Up @@ -457,6 +461,23 @@ downloadThirdPartyDeps := {
status
}

// Copy the managed/support/thirdparty-dependencies.txt to managed/src/main/resources/thirdparty-dependencies.txt
copyThirdPartyDepsTxt := {
ybLog("Copying thirdparty-dependencies.txt from managed/support to managed/src/main/resources")
try {
Files.copy(
(baseDirectory.value / "support/thirdparty-dependencies.txt").toPath,
(baseDirectory.value / "src/main/resources/thirdparty-dependencies.txt").toPath,
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
0 // success in copying the thirdparty-dependencies.txt
} catch {
case e: IOException =>
ybLog("Error while copying support/thirdparty-dependencies.txt. " + e.getMessage)
1 // Fail to copy the file
}
}

devSpaceReload := {
(Universal / packageBin).value
val status = Process("devspace run extract-archive").!
Expand Down
1 change: 1 addition & 0 deletions managed/support/thirdparty-dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ https://files.pythonhosted.org/packages/b2/40/4e00501c204b457f10fe410da0c9753721
https://downloads.yugabyte.com/docker/thirdparty-deps/x86_64/xxhash.tar.gz
https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.90.0/otelcol-contrib_0.90.0_linux_amd64.tar.gz
https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.90.0/otelcol-contrib_0.90.0_linux_arm64.tar.gz
https://downloads.yugabyte.com/docker/thirdparty-deps/x86_64/tectia-ssh.tar.gz

0 comments on commit 6a12204

Please sign in to comment.