release-0.9.18 - add pipeline artifacts for syspec

This commit is contained in:
ansgarz 2022-03-26 12:07:16 +01:00
parent 52014ef9ab
commit fcc172156a
3 changed files with 37 additions and 14 deletions

View file

@ -88,8 +88,9 @@ uberjar:
when: never when: never
- if: $CI_COMMIT_TAG =~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/ - if: $CI_COMMIT_TAG =~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/
script: script:
- ./gradlew -x assemble -x test -x jar uberjarServer
- ./gradlew -x assemble -x test -x jar uberjarDesktop - ./gradlew -x assemble -x test -x jar uberjarDesktop
- ./gradlew -x assemble -x test -x jar uberjarServer
- ./gradlew -x assemble -x test -x jar uberjarSyspec
- cd build/libs/ - cd build/libs/
- find . -type f -exec sha256sum {} \; | sort > sha256sum.lst - find . -type f -exec sha256sum {} \; | sort > sha256sum.lst
- find . -type f -exec sha512sum {} \; | sort > sha512sum.lst - find . -type f -exec sha512sum {} \; | sort > sha512sum.lst
@ -97,6 +98,7 @@ uberjar:
paths: paths:
- 'build/libs/provs-desktop.jar' - 'build/libs/provs-desktop.jar'
- 'build/libs/provs-server.jar' - 'build/libs/provs-server.jar'
- 'build/libs/provs-syspec.jar'
- 'build/libs/sha256sum.lst' - 'build/libs/sha256sum.lst'
- 'build/libs/sha512sum.lst' - 'build/libs/sha512sum.lst'
expire_in: never expire_in: never
@ -138,6 +140,7 @@ release:
paths: paths:
- 'build/libs/provs-desktop.jar' - 'build/libs/provs-desktop.jar'
- 'build/libs/provs-server.jar' - 'build/libs/provs-server.jar'
- 'build/libs/provs-syspec.jar'
- 'build/libs/sha256sum.lst' - 'build/libs/sha256sum.lst'
- 'build/libs/sha512sum.lst' - 'build/libs/sha512sum.lst'
script: script:
@ -146,6 +149,7 @@ release:
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \ release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
--assets-link "{\"name\":\"provs-desktop.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/provs-desktop.jar\"}" \ --assets-link "{\"name\":\"provs-desktop.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/provs-desktop.jar\"}" \
--assets-link "{\"name\":\"provs-server.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/provs-server.jar\"}" \ --assets-link "{\"name\":\"provs-server.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/provs-server.jar\"}" \
--assets-link "{\"name\":\"provs-syspec.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/provs-syspec.jar\"}" \
--assets-link "{\"name\":\"sha256sum.lst\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/sha256sum.lst\"}" \ --assets-link "{\"name\":\"sha256sum.lst\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/sha256sum.lst\"}" \
--assets-link "{\"name\":\"sha512sum.lst\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/sha512sum.lst\"}" \ --assets-link "{\"name\":\"sha512sum.lst\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/sha512sum.lst\"}" \

View file

@ -18,7 +18,7 @@ apply plugin: "kotlinx-serialization"
group = "org.domaindrivenarchitecture.provs" group = "org.domaindrivenarchitecture.provs"
version = "0.9.18-SNAPSHOT" version = "release-0.9.18"
repositories { repositories {
mavenCentral() mavenCentral()
@ -66,23 +66,22 @@ java {
dependencies { dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version") implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.2")
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.4")
implementation("com.charleskorn.kaml:kaml:0.40.0")
implementation("com.hierynomus:sshj:0.32.0") implementation("com.hierynomus:sshj:0.32.0")
api("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
api("org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.2")
api("org.jetbrains.kotlinx:kotlinx-cli:0.3.4")
api("com.charleskorn.kaml:kaml:0.42.0")
api("org.slf4j:slf4j-api:1.7.36") api("org.slf4j:slf4j-api:1.7.36")
api("ch.qos.logback:logback-classic:1.2.10") api('ch.qos.logback:logback-classic:1.2.11')
api("ch.qos.logback:logback-core:1.2.10") api('ch.qos.logback:logback-core:1.2.11')
testFixturesApi("org.junit.jupiter:junit-jupiter-api:5.8.2") testFixturesApi("org.junit.jupiter:junit-jupiter-api:5.8.2")
testImplementation("io.mockk:mockk:1.12.2") testFixturesApi('io.mockk:mockk:1.12.3')
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
} }

View file

@ -27,6 +27,26 @@ internal class SyspecConfigRepoKtTest {
assertEquals(listOf(CommandSpec("echo just_for_test", "just_for_test")), res.command) assertEquals(listOf(CommandSpec("echo just_for_test", "just_for_test")), res.command)
} }
@Test
fun findSpecConfigFromFile_success() {
// when
@Suppress("RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS") // null would reveal test error
val filePath = javaClass.classLoader.getResource("syspec-config.yaml").file
val res = findSpecConfigFromFile(ConfigFileName(filePath))
// then
assertEquals(listOf(CommandSpec("echo just_for_test", "just_for_test")), res?.command)
}
@Test
fun findSpecConfigFromResource_success() {
// when
val res =findSpecConfigFromResource("syspec-config.yaml")
// then
assertEquals(listOf(CommandSpec("echo just_for_test", "just_for_test")), res?.command)
}
@Test @Test
fun findSpecConfigFromFile_null() { fun findSpecConfigFromFile_null() {
// when // when