Skip to content
Snippets Groups Projects
Verified Commit c43ec928 authored by Jan-Niclas Strüwer's avatar Jan-Niclas Strüwer
Browse files

updated versions

added gitlab-ci.yml
parent 091e99ac
Branches f-transitiveDependencies
No related tags found
No related merge requests found
Pipeline #26119 passed
stages:
- build_kubernetes_dev
- build_kubernetes
.base:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
cache: {}
tags:
- "opencode-high"
before_script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
build_sha_dev:
extends: .base
stage: build_kubernetes_dev
only:
- dev
script:
- /kaniko/executor --build-arg "profile=dev" --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${CI_REGISTRY_IMAGE}:dev_${CI_COMMIT_SHORT_SHA}"
build_sha_prod:
extends: .base
stage: build_kubernetes
only:
- main
script:
- /kaniko/executor --build-arg "profile=prod" --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"
build_latest_prod:
extends: .base
stage: build_kubernetes
only:
- main
script:
- /kaniko/executor --build-arg "profile=prod" --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${CI_REGISTRY_IMAGE}:latest"
......@@ -46,38 +46,42 @@ tasks.withType<KotlinCompile> {
}
}
val exposedVersion = "0.45.0"
val ortVersion = "7.1.0"
val ktorVersion = "2.3.6"
val kotlinCoroutines = "1.7.3"
dependencies {
implementation("com.github.ajalt.clikt:clikt:4.2.1")
implementation("org.apache.logging.log4j:log4j-api-kotlin:1.3.0")
implementation("org.apache.logging.log4j:log4j-to-slf4j:2.21.1")
implementation("ch.qos.logback:logback-classic:1.4.11")
implementation("org.ossreviewtoolkit:analyzer:7.1.0")
implementation("org.ossreviewtoolkit:model:7.1.0")
implementation("org.ossreviewtoolkit:reporter:7.1.0")
implementation("org.ossreviewtoolkit.plugins.packagecurationproviders:package-curation-provider-api:7.1.0")
implementation("org.ossreviewtoolkit.plugins.packagemanagers:maven-package-manager:7.1.0")
implementation("org.ossreviewtoolkit.plugins.packagemanagers:gradle-package-manager:7.1.0")
implementation("org.ossreviewtoolkit.plugins.packagecurationproviders:ort-config-package-curation-provider:7.1.0")
implementation("org.ossreviewtoolkit.plugins.packagecurationproviders:clearly-defined-package-curation-provider:7.1.0")
implementation("org.jetbrains.exposed:exposed-core:0.44.1")
implementation("org.jetbrains.exposed:exposed-crypt:0.44.1")
implementation("org.jetbrains.exposed:exposed-dao:0.44.1")
implementation("org.jetbrains.exposed:exposed-jdbc:0.44.1")
implementation("org.jetbrains.exposed:exposed-kotlin-datetime:0.44.1")
implementation("org.jetbrains.exposed:exposed-json:0.44.1")
implementation("org.jetbrains.exposed:exposed-money:0.44.1")
implementation("org.jetbrains.exposed:exposed-spring-boot-starter:0.44.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:1.7.3")
implementation("io.ktor:ktor-client-core-jvm:2.3.6")
implementation("io.ktor:ktor-client-cio-jvm:2.3.6")
implementation("io.ktor:ktor-client-content-negotiation:2.3.6")
implementation("io.ktor:ktor-serialization-kotlinx-xml:2.3.6")
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.6")
implementation("org.ossreviewtoolkit:analyzer:$ortVersion")
implementation("org.ossreviewtoolkit:model:$ortVersion")
implementation("org.ossreviewtoolkit:reporter:$ortVersion")
implementation("org.ossreviewtoolkit.plugins.packagecurationproviders:package-curation-provider-api:$ortVersion")
implementation("org.ossreviewtoolkit.plugins.packagemanagers:maven-package-manager:$ortVersion")
implementation("org.ossreviewtoolkit.plugins.packagemanagers:gradle-package-manager:$ortVersion")
implementation("org.ossreviewtoolkit.plugins.packagecurationproviders:ort-config-package-curation-provider:$ortVersion")
implementation("org.ossreviewtoolkit.plugins.packagecurationproviders:clearly-defined-package-curation-provider:$ortVersion")
implementation("org.jetbrains.exposed:exposed-core:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-crypt:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-kotlin-datetime:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-json:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-money:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-spring-boot-starter:$exposedVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutines")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive:$kotlinCoroutines")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:$kotlinCoroutines")
implementation("io.ktor:ktor-client-core-jvm:$ktorVersion")
implementation("io.ktor:ktor-client-cio-jvm:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
runtimeOnly("org.postgresql:postgresql:42.6.0")
runtimeOnly("org.ossreviewtoolkit.plugins.packagecurationproviders:file-package-curation-provider:7.1.0")
runtimeOnly("org.ossreviewtoolkit.plugins.packagecurationproviders:file-package-curation-provider:$ortVersion")
testImplementation("org.jetbrains.kotlin:kotlin-test:1.8.10")
}
......
......@@ -44,7 +44,7 @@ class ArtifactService {
)
}
val transitiveDependencies = packageRef.dependencies.map {
val transitiveDependencies = packageRef.dependencies.map {
ioScope.async {
getDependencyVersionInformation(
packageRef = it,
......
......@@ -17,17 +17,17 @@ data class CreateArtifactDto(
val versions = try {
versionDeferred?.await()
} catch (exception: Exception) {
println("API version job failed with error $exception")
null
} ?: emptyList()
} catch (exception: Exception) {
println("API version job failed with error $exception")
null
} ?: emptyList()
return ArtifactDto(
artifactId = artifactId!!,
groupId = groupId!!,
usedVersion = usedVersion!!,
isTopLevelDependency = isTopLevelDependency!!,
versions = versions ,
versions = versions,
transitiveDependencies = transitiveDependencies.awaitAll().mapNotNull { it?.toArtifactDto() },
libyear = LibyearCalculator.calculateDifferenceForPackage(usedVersion!!, versions)
)
......
......@@ -29,6 +29,7 @@ class DepsClient {
"gradle" ->
// Gradle must be accessed with the maven key
"https://api.deps.dev/v3alpha/systems/maven/packages/$namespace:$name"
else -> null
}
return if (requestUrl != null) {
......@@ -46,7 +47,7 @@ class DepsClient {
}
responseDto?.versions?.mapNotNull { version ->
responseDto?.versions?.mapNotNull { version ->
if (version.publishedAt != null) {
try {
VersionDto(
......@@ -64,14 +65,14 @@ class DepsClient {
} ?: emptyList()
} else {
println("Currently unsupported package manager")
emptyList()
emptyList()
}
}
private fun dateToMs(dateString: String): Long {
val formatter: DateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME
val dateTime: OffsetDateTime = OffsetDateTime.parse(dateString, formatter)
return dateTime.toInstant().toEpochMilli()
}
}
\ No newline at end of file
}
......@@ -2,7 +2,10 @@ package util
import dependencies.db.AnalyzerResults
import kotlinx.coroutines.Dispatchers
import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.Database
import org.jetbrains.exposed.sql.SchemaUtils
import org.jetbrains.exposed.sql.StdOutSqlLogger
import org.jetbrains.exposed.sql.addLogger
import org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction
import org.jetbrains.exposed.sql.transactions.transaction
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Use of Cookies

We use Matomo Analytics to analyze and evaluate the use of our platform. The insights help us to improve our offerings and make them more relevant for you.

You can choose whether to allow us to process your data for these purposes and set the corresponding cookies. For more information about data protection — especially regarding "Cookies" and "Matomo"— please refer to our Privacy Policy. You can withdraw your consent at any time.