Commit 97648fd8 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Update publish to GitLab registry

parent 0548bac9
......@@ -8,24 +8,8 @@ stages:
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
test:
stage: test
except:
- tags
image: gradle:6.3-jdk8
tags:
- mbr
script:
- gradle clean test
publish:
stage: publish
only:
- tags
image: gradle:6.3-jdk8
tags:
- mbr
cache:
policy: push
script:
- gradle clean test bintrayUpload
include:
- project: 'memoriav/memobase-2020/utilities/ci-templates'
file: 'gradle-test/gradle-test.yml'
- project: 'memoriav/memobase-2020/utilities/ci-templates'
file: 'gitlab-publish/gitlab-publish.yml'
\ No newline at end of file
## Mapper Service Configuration
Releases: [Bintray](https://bintray.com/memoriav/memobase/mapper-service-configration)
Releases: [Package Registry](https://gitlab.switch.ch/memoriav/memobase-2020/libraries/package-registry/-/packages)
The code to parse and use the mapper configuration. The parsed configuration can
be serialized into a simplified format to speed up deserialization.
\ No newline at end of file
......@@ -22,7 +22,6 @@ plugins {
id 'org.jetbrains.dokka' version '0.10.1'
id 'com.gitlab.morality.grit' version '2.0.2'
id 'org.jlleitschuh.gradle.ktlint' version '9.2.1'
id 'com.jfrog.bintray' version '1.8.5'
}
group = 'ch.memobase'
......@@ -33,11 +32,10 @@ targetCompatibility = 1.8
repositories {
jcenter()
maven {
url "https://dl.bintray.com/memoriav/memobase"
url "https://gitlab.switch.ch/api/v4/projects/1324/packages/maven"
}
}
ext {
kafkaV = '2.3.1'
log4jV = '2.11.2'
......@@ -69,25 +67,17 @@ dependencies {
}
sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
test.kotlin.srcDirs += 'src/test/kotlin'
test.resources.srcDirs += 'src/test/resources'
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier "sources"
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
publications = ['memobasePub']
pkg {
name = 'mapper-service-configuration'
repo = 'memobase'
userOrg = 'memoriav'
desc = 'Parser & validation for the mapper service configuration.'
licenses = ['Apache-2.0']
vcsUrl = 'https://gitlab.switch.ch/memoriav/memobase-2020/libraries/mapper-service-configuration'
}
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
......@@ -95,14 +85,15 @@ compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
publishing {
publications {
memobasePub(MavenPublication) {
groupId = group
artifact sourceJar
library(MavenPublication) {
from components.java
pom {
url = "https://gitlab.switch.ch/memoriav/memobase-2020/libraries/mapper-service-configuration"
name = 'Normalization Service Configuration'
description = "This library contains the parsers and validators for the normalization service configurations."
url = "https://gitlab.switch.ch/memoriav/memobase-2020/libraries/package-registry"
licenses {
license {
name = 'The Apache License, Version 2.0'
......@@ -125,4 +116,18 @@ publishing {
}
}
repositories {
maven {
url "https://gitlab.switch.ch/api/v4/projects/1324/packages/maven"
name "GitLab"
credentials(HttpHeaderCredentials) {
name "Job-Token"
value System.getenv("CI_JOB_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
\ No newline at end of file
......@@ -34,9 +34,9 @@ import org.junit.jupiter.api.TestInstance
class LocalTestRun {
private val log = LogManager.getLogger(this::class.java)
private val headerMetadata = HeaderMetadata(
"ati-002",
"soz-007",
"1",
"ati",
"soz",
false,
"record",
"identifierMain",
......@@ -46,9 +46,9 @@ class LocalTestRun {
@Test
@Disabled
fun `test local folder`() {
val folder = "/home/jonas/memobase/data/ati-002"
val inputFolder = "/home/jonas/memobase/data/test-ati/step-2"
val outputFolder = "/home/jonas/memobase/data/test-ati/step-3"
val folder = "/home/jonas/memobase/data/soz-007"
val inputFolder = "/home/jonas/memobase/data/test-soz/step-2"
val outputFolder = "/home/jonas/memobase/data/test-soz/step-3"
val mappingFile = "/config/mapping.yml"
val klaxon = Klaxon()
val configurationParser = MappingConfigurationParser(File(folder + mappingFile).readBytes())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment