release-0.9.9 add c4kbinaries download
This commit is contained in:
parent
3c6ce2ea31
commit
a005e51729
5 changed files with 58 additions and 40 deletions
|
@ -18,7 +18,7 @@ apply plugin: 'kotlinx-serialization'
|
|||
|
||||
|
||||
group = 'org.domaindrivenarchitecture.provs'
|
||||
version = '0.9.9-SNAPSHOT'
|
||||
version = 'release-0.9.9'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.desktop.domain
|
||||
|
||||
import org.domaindrivenarchitecture.provs.desktop.infrastructure.*
|
||||
import org.domaindrivenarchitecture.provs.desktop.infrastructure.getConfig
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.git.provisionGit
|
||||
|
@ -129,7 +128,11 @@ fun Prov.provisionWorkplaceSubmodules(
|
|||
) = task {
|
||||
if (submodules.contains(DesktopSubmodule.PROVSBINARIES.name.lowercase())) {
|
||||
aptInstall("jarwrapper")
|
||||
installBinariesProvs()
|
||||
installBinariesProvs(true)
|
||||
}
|
||||
if (submodules.contains(DesktopSubmodule.C4KBINARIES.name.lowercase())) {
|
||||
aptInstall("jarwrapper")
|
||||
installBinariesC4k(true)
|
||||
}
|
||||
ProvResult(true)
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
package org.domaindrivenarchitecture.provs.desktop.domain
|
||||
|
||||
enum class DesktopSubmodule {
|
||||
PROVSBINARIES
|
||||
PROVSBINARIES, C4KBINARIES
|
||||
}
|
||||
|
|
|
@ -5,37 +5,51 @@ import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
|||
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.createDirs
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.web.base.downloadFromURL
|
||||
|
||||
fun Prov.installBinariesC4k() = task {
|
||||
fun Prov.installBinariesC4k(reprovision: Boolean = false) = task {
|
||||
|
||||
val installationPath = " /usr/local/bin/"
|
||||
|
||||
createDirs(installationPath, sudo = true)
|
||||
|
||||
class Binary(val jobId: String, val fileName: String, val sha256sum: String)
|
||||
|
||||
fun downloadC4k(bin : Binary) {
|
||||
with(bin) {
|
||||
fun Prov.downloadC4k(jobId: String, c4kName: String, sha256sum: String) = task {
|
||||
val fileName = "$c4kName-standalone.jar"
|
||||
downloadFromURL(
|
||||
"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${jobId}/artifacts/raw/target/uberjar/${fileName}",
|
||||
"https://gitlab.com/domaindrivenarchitecture/$c4kName/-/jobs/${jobId}/artifacts/raw/target/uberjar/${fileName}",
|
||||
path = installationPath,
|
||||
filename = fileName,
|
||||
sha256sum = sha256sum,
|
||||
sudo = true
|
||||
sudo = true,
|
||||
overwrite = reprovision
|
||||
)
|
||||
// remark: chmod fails if file could not be downloaded (e.g. due to wrong link or checksum)
|
||||
cmd("chmod 755 $installationPath$fileName", sudo = true)
|
||||
}
|
||||
|
||||
}
|
||||
downloadC4k(Binary("2138015489", "c4k-nextcloud-standalone.jar",
|
||||
"47b6f71664903816eab0e4950d4ab0d564ea365ddb2b9c2a7bcb2736a2d941cb"))
|
||||
downloadC4k(Binary("2136806347", "c4k-jira-standalone.jar",
|
||||
"585f26e3b70bec32f052f488688718d8c9a6d15222b8a2141a69fa1bea136179"))
|
||||
downloadC4k(Binary("2136561868", "c4k-keycloak-standalone.jar",
|
||||
"81bd605b160c3d339cba745433271412eaa716cb7856d0227a1eb063badc9"))
|
||||
downloadC4k(Binary("2136778473", "c4k-mastodon-bot-standalone.jar",
|
||||
"9dbf981ce8b4aea92e0f45b182a39d2caffceb6e8f78ddfeeb49e74ca4a8d37d"))
|
||||
downloadC4k(Binary("2136801572", "c4k-shynet-standalone.jar",
|
||||
"4fa0d41896f2a9ea89ca70c475f9d1f89edf3fadf82d6b39789b90732f795429"))
|
||||
downloadC4k(
|
||||
"2138015489",
|
||||
"c4k-nextcloud",
|
||||
"47b6f71664903816eab0e4950d4ab0d564ea365ddb2b9c2a7bcb2736a2d941cb"
|
||||
)
|
||||
downloadC4k(
|
||||
"2136806347",
|
||||
"c4k-jira",
|
||||
"585f26e3b70bec32f052f488688718d8c9a6d15222b8a2141a69fa1bea136179"
|
||||
)
|
||||
downloadC4k(
|
||||
"2136561868",
|
||||
"c4k-keycloak",
|
||||
"81bd605b160c3d339cba745433271412eaa716cb7856d0227a1eb063badc9d9c"
|
||||
)
|
||||
downloadC4k(
|
||||
"2136778473",
|
||||
"c4k-mastodon-bot",
|
||||
"9dbf981ce8b4aea92e0f45b182a39d2caffceb6e8f78ddfeeb49e74ca4a8d37d"
|
||||
)
|
||||
downloadC4k(
|
||||
"2136801572",
|
||||
"c4k-shynet",
|
||||
"4fa0d41896f2a9ea89ca70c475f9d1f89edf3fadf82d6b39789b90732f795429"
|
||||
)
|
||||
|
||||
ProvResult(true)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.creat
|
|||
import org.domaindrivenarchitecture.provs.framework.ubuntu.web.base.downloadFromURL
|
||||
|
||||
|
||||
fun Prov.installBinariesProvs() = task {
|
||||
fun Prov.installBinariesProvs(reprovision: Boolean = false) = task {
|
||||
// check for latest stable release on: https://gitlab.com/domaindrivenarchitecture/provs/-/releases
|
||||
// release 0.9.8
|
||||
val jobId = "2137287031"
|
||||
|
@ -15,22 +15,23 @@ fun Prov.installBinariesProvs() = task {
|
|||
|
||||
createDirs(installationPath, sudo = true)
|
||||
|
||||
downloadFromURL(
|
||||
"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/$jobId/artifacts/raw/build/libs/provs-server.jar",
|
||||
path = installationPath,
|
||||
filename = "provs-server.jar",
|
||||
sha256sum = provsServerSha256sum,
|
||||
sudo = true
|
||||
)
|
||||
|
||||
downloadFromURL(
|
||||
"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/$jobId/artifacts/raw/build/libs/provs-desktop.jar",
|
||||
path = installationPath,
|
||||
filename = "provs-desktop.jar",
|
||||
sha256sum = provsDesktopSha256sum,
|
||||
sudo = true
|
||||
sudo = true,
|
||||
overwrite = reprovision
|
||||
)
|
||||
|
||||
cmd("chmod 755 /usr/local/bin/provs-server.jar" , sudo = true)
|
||||
cmd("chmod 755 /usr/local/bin/provs-desktop.jar", sudo = true)
|
||||
|
||||
downloadFromURL(
|
||||
"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/$jobId/artifacts/raw/build/libs/provs-server.jar",
|
||||
path = installationPath,
|
||||
filename = "provs-server.jar",
|
||||
sha256sum = provsServerSha256sum,
|
||||
sudo = true,
|
||||
overwrite = reprovision
|
||||
)
|
||||
cmd("chmod 755 /usr/local/bin/provs-server.jar" , sudo = true)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue