Commit 880f1e9f authored by Pratim Chaudhuri's avatar Pratim Chaudhuri

b| removed sticky test coverage flag from compiled scala files

parent 87c3084b
Pipeline #37454502 passed with stages
in 20 minutes and 7 seconds
......@@ -6,9 +6,7 @@ stages:
- integration_functional_test
- test_coverage
- code_quality_analysis
- publish_artifact_to_gitlab
- publish_artifact_to_maven
- publish_artifact_to_gitlab_repository
- publish_artifact
- publish_gitlab_pages
- review
- db_review
......@@ -76,18 +74,22 @@ test_coverage:
dependencies:
- compile
code_quality_analysis:
Checkstyle Scala:
stage: code_quality_analysis
script:
- sbt scalastyle
dependencies:
- compile
Checkstyle Java:
stage: code_quality_analysis
script:
- sbt checkstyle
dependencies:
- compile
pages:
stage: publish_gitlab_pages
dependencies:
- test_coverage
script:
- sbt doc
- rm -rf public/*
......@@ -97,11 +99,13 @@ pages:
paths:
- public/
expire_in: 1 days
dependencies:
- test_coverage
only:
- development
publish_artifact_to_gitlab:
stage: publish_artifact_to_gitlab
stage: publish_artifact
script:
- sbt publishLocal
artifacts:
......@@ -117,7 +121,7 @@ publish_artifact_to_gitlab:
- development
publish_artifact_to_maven:
stage: publish_artifact_to_maven
stage: publish_artifact
variables:
NEXUS_REPOSITORY_USERNAME: ${NEXUS_REPOSITORY_USERNAME}
NEXUS_REPOSITORY_PASSWD: ${NEXUS_REPOSITORY_PASSWD}
......
......@@ -81,7 +81,8 @@ scalastyleFailOnWarning := true
* Ref: https://github.com/scoverage/sbt-scoverage
* ****************************************************************************
*/
coverageEnabled := true
coverageEnabled in(Test, compile) := true
coverageEnabled in(Compile, compile) := false
coverageExcludedPackages := "example.*"
coverageMinimum := 70
coverageFailOnMinimum := true
......
......@@ -5,13 +5,17 @@ resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/maven-
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.6" withSources())
// Java checkstyle
addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.1.1")
addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.1.1" withSources())
dependencyOverrides += "com.puppycrawl.tools" % "checkstyle" % "8.12"
dependencyOverrides += "com.puppycrawl.tools" % "checkstyle" % "8.12" withSources()
// Scala checkstyle
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0" withSources())
// Test coverage
// Ref: https://www.lunatech.com/blog/V5tpoCQAANsPL4jw/continuous-integration-on-gitlab-with-scala-and-sbt
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1" withSources())
// Sonatype plugin
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3" withSources())
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0" withSources())
......@@ -10,17 +10,17 @@
* ****************************************************************************
*/
ThisBuild / organization := sys.env.getOrElse("NEXUS_REPOSITORY_ORGANIZATION","cloud.yantra.oss")
ThisBuild / organizationName := sys.env.getOrElse("NEXUS_REPOSITORY_ORGANIZATION_NAME","Yantra Cloud Ltd - OSS")
ThisBuild / organizationHomepage := Some(url("https://yantra.cloud"))
organization := sys.env.getOrElse("NEXUS_REPOSITORY_ORGANIZATION", "cloud.yantra.oss")
organizationName := sys.env.getOrElse("NEXUS_REPOSITORY_ORGANIZATION_NAME", "Yantra Cloud Ltd - OSS")
organizationHomepage := Some(url("https://yantra.cloud"))
ThisBuild / scmInfo := Some(
scmInfo := Some(
ScmInfo(
url("https://gitlab.com/cloud.yantra.oss/microservice-patterns-cqrs.git"),
"git@gitlab.com:cloud.yantra.oss/microservice-patterns-cqrs.git"
)
)
ThisBuild / developers := List(
developers := List(
Developer(
id = "pratimsc",
name = "Pratim Chaudhuri",
......@@ -29,20 +29,26 @@ ThisBuild / developers := List(
)
)
ThisBuild / description := "Some descripiton about your project."
ThisBuild / licenses := List("MIT" -> new URL("https://opensource.org/licenses/MIT"))
ThisBuild / homepage := Some(url("https://gitlab.com/cloud.yantra.oss/microservice-patterns-cqrs"))
description := "Some descripiton about your project."
licenses := List("MIT" -> new URL("https://opensource.org/licenses/MIT"))
homepage := Some(url("https://gitlab.com/cloud.yantra.oss/microservice-patterns-cqrs"))
// Remove all additional repository other than Maven Central from POM
ThisBuild / pomIncludeRepository := { _ => false }
ThisBuild / publishTo := {
pomIncludeRepository := { _ => false }
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
ThisBuild / publishMavenStyle := true
publishMavenStyle := true
credentials += Credentials(realm = "Sonatype Nexus Repository Manager",
host = "oss.sonatype.org",
userName = sys.env.getOrElse("NEXUS_REPOSITORY_USERNAME","admin"),
passwd = sys.env.getOrElse("NEXUS_REPOSITORY_PASSWD","admin")
userName = sys.env.getOrElse("NEXUS_REPOSITORY_USERNAME", "admin"),
passwd = sys.env.getOrElse("NEXUS_REPOSITORY_PASSWD", "admin")
)
// Ref: https://github.com/xerial/sbt-sonatype
sonatypeProfileName := organization.value
publishArtifact in(Test, packageBin) := false
publishArtifact in(Test, packageDoc) := false
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