diff --git a/build.sbt b/build.sbt index d287f55..4824318 100644 --- a/build.sbt +++ b/build.sbt @@ -9,7 +9,7 @@ githubPath := "gatling/gatling-sbt-plugin" libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.2.18" % Test, - "io.gatling" % "gatling-enterprise-plugin-commons" % "1.9.0-M13" + "io.gatling" % "gatling-enterprise-plugin-commons" % "1.9.0-M14" ) scriptedLaunchOpts := { diff --git a/src/main/scala/io/gatling/sbt/settings/gatling/TaskEnterpriseUpload.scala b/src/main/scala/io/gatling/sbt/settings/gatling/TaskEnterpriseUpload.scala index 5fc143b..3f3c15d 100644 --- a/src/main/scala/io/gatling/sbt/settings/gatling/TaskEnterpriseUpload.scala +++ b/src/main/scala/io/gatling/sbt/settings/gatling/TaskEnterpriseUpload.scala @@ -20,12 +20,11 @@ import java.util.UUID import scala.util.Try -import io.gatling.plugin.configuration.PackageConfiguration import io.gatling.sbt.GatlingKeys._ import io.gatling.sbt.settings.gatling.EnterpriseUtils._ import sbt._ -import sbt.Keys.{ baseDirectory, streams } +import sbt.Keys.streams class TaskEnterpriseUpload(config: Configuration, enterprisePackage: TaskEnterprisePackage) extends RecoverEnterprisePluginException(config) { val uploadEnterprisePackage: InitializeTask[Unit] = Def.task { @@ -36,15 +35,7 @@ class TaskEnterpriseUpload(config: Configuration, enterprisePackage: TaskEnterpr val enterprisePlugin = EnterprisePluginTask.batchEnterprisePluginTask(config).value Try { - val packageId = Option(PackageConfiguration.loadToJson(baseDirectory.value)) - .map { jsonConfig => - logger.info("Package configuration file detected, applying it.") - val id = enterprisePlugin.uploadPackageConfiguration(jsonConfig).toString - logger.info(s"Package id: $id") - id - } - .getOrElse(settingPackageId) - if (packageId.isEmpty && settingSimulationId.isEmpty) { + if (settingPackageId.isEmpty && settingSimulationId.isEmpty) { logger.error( s"""A package ID is required to upload a package on Gatling Enterprise; see https://gatling.io/docs/enterprise/cloud/reference/user/package_conf/ , create a package and copy its ID. |You can then set your package ID value by passing it with -Dgatling.enterprise.packageId=, or add the configuration to your SBT settings, e.g.: @@ -56,8 +47,8 @@ class TaskEnterpriseUpload(config: Configuration, enterprisePackage: TaskEnterpr throw ErrorAlreadyLoggedException } - if (packageId.nonEmpty) { - val packageUUID = UUID.fromString(packageId) + if (settingPackageId.nonEmpty) { + val packageUUID = UUID.fromString(settingPackageId) enterprisePlugin.uploadPackage(packageUUID, file) } else { val simulationId = UUID.fromString(settingSimulationId)