Merge pull request 'Move to Drone CI and Archiva' (#1) from develop into master
continuous-integration/drone/push Build is passing Details

Reviewed-on: #1
This commit is contained in:
William Nolin 2021-09-11 23:39:36 -04:00
commit be6b1941b3
4 changed files with 47 additions and 46 deletions

34
.drone.yml Normal file
View File

@ -0,0 +1,34 @@
---
global-variables:
release: &release ${DRONE_BRANCH##**/}
gradle-image: &gradle-image gradle:7.1-jdk11
kind: pipeline
name: default
type: docker
steps:
- name: gradle-test
image: *gradle-image
commands:
- gradle test
when:
branch: develop
- name: publish
image: *gradle-image
environment:
ARCHIVA_USERNAME:
from_secret: archiva_username
ARCHIVA_PASSWORD:
from_secret: archiva_password
commands:
- gradle publish
when:
branch: release/**
trigger:
branch:
- develop
- release/**
- master

View File

@ -1,22 +0,0 @@
image: gradle:$GRADLE_VERSION-jdk$JDK_VERSION
stages:
- test
- deploy
test:
stage: test
script:
- gradle --no-daemon test
artifacts:
when: always
reports:
junit: build/test-results/test/TEST-*.xml
deploy-maven:
stage: deploy
needs: [ 'test' ]
only:
- master
script:
- gradle --no-daemon publish

View File

@ -1,17 +1,16 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "dev.fyloz.colorrecipesexplorer"
version = "5.2"
version = "5.2.1"
plugins {
kotlin("jvm") version "1.4.30"
id("org.jetbrains.dokka") version "1.4.20"
kotlin("jvm") version "1.5.21"
id("org.jetbrains.dokka") version "1.5.0"
id("maven-publish")
id("com.github.johnrengelman.shadow") version "6.1.0"
}
repositories {
jcenter()
mavenCentral()
}
@ -19,7 +18,7 @@ dependencies {
implementation("org.liquibase:liquibase-core:4.3.1")
// Logging
implementation("io.github.microutils:kotlin-logging:1.12.0")
implementation("io.github.microutils:kotlin-logging:1.12.5")
implementation("org.slf4j:slf4j-api:1.7.30")
implementation("ch.qos.logback:logback-classic:1.0.13")
@ -38,22 +37,12 @@ publishing {
repositories {
maven {
url = uri("https://git.fyloz.dev/api/v4/projects/40/packages/maven")
name = "Gitlab"
url = uri("https://archiva.fyloz.dev/repository/internal/")
name = "Archiva"
credentials(HttpHeaderCredentials::class.java) {
val gitlabPrivateToken: String? by project
if (gitlabPrivateToken != null) {
name = "Private-Token"
value = gitlabPrivateToken
} else {
name = "Job-Token"
value = System.getenv("CI_JOB_TOKEN")
}
}
authentication {
create<HttpHeaderAuthentication>("header")
credentials {
username = System.getenv("ARCHIVA_USERNAME")
password = System.getenv("ARCHIVA_PASSWORD")
}
}
}

View File

@ -89,10 +89,10 @@ class CreDatabase(
fun update() {
val targetVersion = properties.targetVersion
if (version >= targetVersion) {
logger.warn("Database version is superior or equals to the target version. No changes will be made.")
return
}
// if (version >= targetVersion) {
// logger.warn("Database version is superior or equals to the target version. No changes will be made.")
// return
// }
logger.info("Updating database from version $version to $targetVersion...")