Permalink
Browse files

WIP

  • Loading branch information...
snazha-blkio committed Oct 11, 2018
1 parent 3d908eb commit f5dba87067299b35848557684fdffdccfcb35fce
Showing with 14 additions and 23 deletions.
  1. +11 −13 .gitlab-ci.yml
  2. +3 −10 build.gradle
View
@@ -7,7 +7,7 @@ variables:
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- export GRADLE_USER_HOME=`pwd`/.gradle
cache:
paths:
@@ -16,39 +16,37 @@ cache:
stages:
- build
# - test
- test
- deploy
build:
stage: build
script:
- gradle sam
# - gradle clean build -x test
- gradle clean build -x test
#unit tests:
# stage: test
# script:
# - gradle test
unit tests:
stage: test
script:
- gradle test
publish_snapshot:
stage: deploy
script:
- gradle sam
- gradle uploadArchives
environment:
name: publish_snapshot
when: manual
only:
- /release/.*$/
- /release/.*$/
publish_release:
stage: deploy
script:
- gradle sam
- gradle uploadArchives
environment:
name: publish_release
when: manual
only:
- /release/.*$/
# TODO: change this to master
- master
View
@@ -125,6 +125,7 @@ configure(subprojects.findAll { it.name != 'integration-tests' }) {
ext {
ossrhUsername = project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : System.getenv('OSSRH_USERNAME')
ossrhPassword = project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : System.getenv('OSSRH_PASSWORD')
ossrhRepoUrl = project.hasProperty('ossrhRepoUrl') ? project.property('ossrhRepoUrl') : System.getenv('OSSRH_REPO_URL')
bintrayUser = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
bintrayKey = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
isSnapshotVersion = project.version.endsWith("-SNAPSHOT")
@@ -152,11 +153,10 @@ configure(subprojects.findAll { it.name != 'integration-tests' }) {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
onlyIf {
ossrhUsername != '' && ossrhPassword != ''
ossrhUsername != '' && ossrhPassword != '' && ossrhRepoUrl != ''
}
String repoUrl = isSnapshotVersion ? "http://oss.sonatype.org/content/repositories/snapshots/" : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
repository(url: repoUrl) {
repository(url: ossrhRepoUrl) {
authentication(
userName: ossrhUsername,
password: ossrhPassword
@@ -234,13 +234,6 @@ configure(subprojects.findAll { it.name != 'integration-tests' }) {
// failOnCommitNeeded = true
//}
task sam {
doLast {
String url = project.hasProperty('ossrhUrl') ? project.property('ossrhPassword') : System.getenv('OSSRH_URL')
println("The URL is: " + url);
}
}
task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
dependsOn = subprojects.test
additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)

0 comments on commit f5dba87

Please sign in to comment.