mirror of
https://github.com/firstBitMarksistskaya/jenkins-lib.git
synced 2025-02-12 14:57:15 +02:00
commit df9515fc67904701e1b763a1500ed70692e315f3 Merge: d79e367 0899819 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Feb 13 16:55:11 2024 +0000 Merge pull request #109 from firstBitMarksistskaya/dependabot/github_actions/actions/checkout-4 commit 08998197bdc17c8cf7e015060b9e69b011fa2e3a Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Feb 13 16:53:45 2024 +0000 Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> commit d79e367d323a037c214a830ec38a85b2939aa84d Merge: 1cfefc2 5bdca69 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Feb 13 16:53:11 2024 +0000 Merge pull request #108 from firstBitMarksistskaya/dependabot/github_actions/actions/setup-java-4 commit 5bdca690ce210c610024034f161ae7f9739c9460 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Feb 13 16:51:29 2024 +0000 Bump actions/setup-java from 3 to 4 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> commit 1cfefc24dea9332fafe5af02ee8157c593bb5e7b Author: Nikita Fedkin <nixel2007@gmail.com> Date: Tue Feb 13 17:51:01 2024 +0100 Create dependabot.yml commit 3a1c9fb80c3d45f20bc0086b1e57ffb77f57b72c Merge: be33515 494f9b9 Author: Nikita Fedkin <nixel2007@gmail.com> Date: Tue Feb 13 17:43:26 2024 +0100 Merge pull request #107 from ivanmolodec/file-exist-bug commit 494f9b9b138e81661544b006db49f0eab5984dc2 Merge: 8c9a702 be33515 Author: Ivan Smirnov <52702497+ivanmolodec@users.noreply.github.com> Date: Tue Feb 13 19:38:25 2024 +0300 Merge branch 'firstBitMarksistskaya:develop' into file-exist-bug commit be335151c42cfafbc9f1efe45f10fdb5cd5459c2 Author: Nikita Fedkin <nixel2007@gmail.com> Date: Tue Feb 13 17:29:25 2024 +0100 Fix dependencies download commit 8c9a7028c9f8e677c975eedd462f6ea3166ddcd8 Author: Ivan Smirnov <ivssmirnov@1bit.com> Date: Tue Feb 13 19:05:26 2024 +0300 Внесены правки в yaml файл для ci commit 7fb7fa1742d876395a7b8ed0b877972d928ce232 Author: Ivan Smirnov <ivssmirnov@1bit.com> Date: Tue Feb 13 18:29:56 2024 +0300 Возвращено создание папки build/out commit bd943e9bcc1190305935fefadae5ee165d05926f Author: Ivan Smirnov <ivssmirnov@1bit.com> Date: Tue Feb 13 15:07:44 2024 +0300 Добавлена проверка на существование файла 1Cv8.1CD.zip, удален дубль создания папки build/out
116 lines
4.1 KiB
Plaintext
116 lines
4.1 KiB
Plaintext
import com.mkobit.jenkins.pipelines.http.AnonymousAuthentication
|
|
|
|
plugins {
|
|
java
|
|
groovy
|
|
jacoco
|
|
id("com.mkobit.jenkins.pipelines.shared-library") version "0.10.1"
|
|
id("com.github.ben-manes.versions") version "0.28.0"
|
|
id("org.jenkins-ci.jpi") version "0.38.0" apply false
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
tasks {
|
|
|
|
register<org.jenkinsci.gradle.plugins.jpi.TestDependenciesTask>("resolveIntegrationTestDependencies") {
|
|
into {
|
|
val javaConvention = project.convention.getPlugin<JavaPluginConvention>()
|
|
File("${javaConvention.sourceSets.integrationTest.get().output.resourcesDir}/test-dependencies")
|
|
}
|
|
configuration = configurations.integrationTestRuntimeClasspath.get()
|
|
}
|
|
processIntegrationTestResources {
|
|
dependsOn("resolveIntegrationTestDependencies")
|
|
}
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
val junitVersion = "5.6.1"
|
|
val spockVersion = "1.3-groovy-2.4"
|
|
val groovyVersion = "2.4.19"
|
|
val slf4jVersion = "1.8.0-beta4"
|
|
var jacksonVersion = "2.9.8"
|
|
|
|
dependencies {
|
|
implementation("org.codehaus.groovy", "groovy-all", groovyVersion)
|
|
|
|
// jackson
|
|
implementation("com.fasterxml.jackson.module", "jackson-module-jsonSchema", jacksonVersion)
|
|
|
|
// unit-tests
|
|
testImplementation("org.junit.jupiter", "junit-jupiter-api", junitVersion)
|
|
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", junitVersion)
|
|
|
|
testImplementation("org.assertj", "assertj-core", "3.15.0")
|
|
testImplementation("org.mockito", "mockito-core", "3.3.3")
|
|
|
|
testImplementation("org.slf4j", "slf4j-api", slf4jVersion)
|
|
testImplementation("org.slf4j", "slf4j-simple", slf4jVersion)
|
|
|
|
// integration-tests
|
|
integrationTestImplementation("org.spockframework", "spock-core", spockVersion)
|
|
integrationTestImplementation("org.codehaus.groovy", "groovy-all", groovyVersion)
|
|
|
|
integrationTestImplementation("org.springframework.security", "spring-security-core", "5.1.13.RELEASE")
|
|
|
|
integrationTestImplementation("org.slf4j", "slf4j-api", slf4jVersion)
|
|
integrationTestImplementation("org.slf4j", "slf4j-simple", slf4jVersion)
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
|
|
testLogging {
|
|
events("passed", "skipped", "failed")
|
|
}
|
|
|
|
reports {
|
|
html.isEnabled = true
|
|
}
|
|
}
|
|
|
|
tasks.check {
|
|
dependsOn(tasks.jacocoTestReport)
|
|
dependsOn(tasks.integrationTest)
|
|
}
|
|
|
|
tasks.jacocoTestReport {
|
|
reports {
|
|
xml.isEnabled = true
|
|
xml.destination = File("$buildDir/reports/jacoco/test/jacoco.xml")
|
|
}
|
|
}
|
|
|
|
jenkinsIntegration {
|
|
baseUrl.set(uri("http://localhost:5050").toURL())
|
|
authentication.set(providers.provider { AnonymousAuthentication })
|
|
downloadDirectory.set(layout.projectDirectory.dir("jenkinsResources"))
|
|
}
|
|
|
|
sharedLibrary {
|
|
// TODO: this will need to be altered when auto-mapping functionality is complete
|
|
coreVersion.set(jenkinsIntegration.downloadDirectory.file("core-version.txt").map { it.asFile.readText().trim() })
|
|
// TODO: retrieve downloaded plugin resource
|
|
pluginDependencies {
|
|
dependency("org.jenkins-ci.plugins", "pipeline-build-step", "2.12")
|
|
dependency("org.jenkins-ci.plugins", "pipeline-utility-steps", "2.8.0")
|
|
dependency("org.jenkins-ci.plugins", "git", "4.4.4")
|
|
dependency("org.jenkins-ci.plugins", "http_request", "1.15")
|
|
dependency("org.6wind.jenkins", "lockable-resources", "2.7")
|
|
dependency("ru.yandex.qatools.allure", "allure-jenkins-plugin", "2.28.1")
|
|
val declarativePluginsVersion = "1.6.0"
|
|
dependency("org.jenkinsci.plugins", "pipeline-model-api", declarativePluginsVersion)
|
|
dependency("org.jenkinsci.plugins", "pipeline-model-declarative-agent", "1.1.1")
|
|
dependency("org.jenkinsci.plugins", "pipeline-model-definition", declarativePluginsVersion)
|
|
dependency("org.jenkinsci.plugins", "pipeline-model-extensions", declarativePluginsVersion)
|
|
dependency("io.jenkins.blueocean", "blueocean-pipeline-api-impl", "1.25.3")
|
|
dependency("sp.sd", "file-operations", "214.v2e7dc7f25757")
|
|
}
|
|
}
|