Skip to content

Commit

Permalink
build: fix flaky codecov upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamilton723 committed Jul 31, 2019
1 parent ce1e66d commit 73581cb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
14 changes: 7 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ val generatePythonDoc = TaskKey[Unit]("generatePythonDoc", "Generate sphinx docs
generatePythonDoc := {
val s = streams.value
installPipPackageTask.value
Process( activateCondaEnv ++ Seq("sphinx-apidoc", "-f", "-o", "doc", "."),
Process(activateCondaEnv ++ Seq("sphinx-apidoc", "-f", "-o", "doc", "."),
join(pythonSrcDir.toString, "mmlspark")) ! s.log
Process( activateCondaEnv ++ Seq("sphinx-build", "-b", "html", "doc", "../../../doc/pyspark"),
Process(activateCondaEnv ++ Seq("sphinx-build", "-b", "html", "doc", "../../../doc/pyspark"),
join(pythonSrcDir.toString, "mmlspark")) ! s.log

}

def uploadToBlob(source: String, dest: String,
Expand Down Expand Up @@ -175,7 +175,7 @@ packagePythonTask := {
val destPyDir = join("target", "scala-2.11", "classes", "mmlspark")
if (destPyDir.exists()) FileUtils.forceDelete(destPyDir)
FileUtils.copyDirectory(join(pythonSrcDir.getAbsolutePath, "mmlspark"), destPyDir)

Process(
activateCondaEnv ++
Seq(s"python", "setup.py", "bdist_wheel", "--universal", "-d", s"${pythonPackageDir.absolutePath}"),
Expand Down Expand Up @@ -240,10 +240,10 @@ genBuildInfo := {
|
|### Maven Coordinates
| `${organization.value}:${name.value}_2.11:${version.value}`
|
|
|### Maven Resolver
| `https://mmlspark.azureedge.net/maven`
|
|
|### Documentation Pages:
|[Scala Documentation](https://mmlspark.blob.core.windows.net/docs/${version.value}/scala/index.html)
|[Python Documentation](https://mmlspark.blob.core.windows.net/docs/${version.value}/pyspark/index.html)
Expand All @@ -269,7 +269,7 @@ publishBlob := {
publishM2.value
val scalaVersionSuffix = scalaVersion.value.split(".".toCharArray.head).dropRight(1).mkString(".")
val nameAndScalaVersion = s"${name.value}_$scalaVersionSuffix"

val localPackageFolder = join(
Seq(new File(new URI(Resolver.mavenLocal.root)).getAbsolutePath)
++ organization.value.split(".".toCharArray.head)
Expand Down
12 changes: 9 additions & 3 deletions pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ jobs:
keyVaultName: mmlspark-keys
condition: succeededOrFailed()
- bash: |
bash <(curl -s https://codecov.io/bash) -t $(codecov-token) -f coverage.xml -F python
bash <(curl -s https://codecov.io/bash) -t $(codecov-token) -f target/scala-2.11/coverage-report/cobertura.xml -F scala
curl -s https://codecov.io/bash > .codecov
chmod +x .codecov
echo "Starting Codecov Upload"
./.codecov -t $(codecov-token) -f coverage.xml -F python
./.codecov -t $(codecov-token) -f target/scala-2.11/coverage-report/cobertura.xml -F scala
displayName: Upload Coverage Report To Codecov.io
condition: succeededOrFailed()
Expand Down Expand Up @@ -190,6 +193,9 @@ jobs:
keyVaultName: mmlspark-keys
condition: succeededOrFailed()
- bash: |
bash <(curl -s https://codecov.io/bash) -t $(codecov-token) -F scala
curl -s https://codecov.io/bash > .codecov
chmod +x .codecov
echo "Starting Codecov Upload"
./.codecov -t $(codecov-token) -F scala
displayName: Upload Coverage Report To Codecov.io
condition: succeededOrFailed()

0 comments on commit 73581cb

Please sign in to comment.