Skip to content

Commit

Permalink
Fix hail-ci incompatibility: /bin/sh is not bash (#4129)
Browse files Browse the repository at this point in the history
* understand ci failure

* Update makeDocs.sh

* fix makeDocs.sh

* add xsltproc and fix workdir

* also install pandoc

* make a zip and maybe fix tests directory

* fix image
  • Loading branch information
danking committed Aug 10, 2018
1 parent 71878c1 commit c91400d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Dockerfile.pr-builder
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ ADD https://archive.apache.org/dist/spark/spark-2.2.0/spark-2.2.0-bin-hadoop2.7.
RUN tar --strip-components=1 -xvzf spark-2.2.0-bin-hadoop2.7.tgz -C /spark && \
rm -rf spark-2.2.2-bin-hadoop2.7.tgz
ENV SPARK_HOME /spark/

RUN apt-get -y install xsltproc pandoc

WORKDIR /hail
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ task generateDistLinks(type: Exec, dependsOn: ['cleanDocs']) {
}

task makeDocs(type: Exec, dependsOn: ['shadowJar', 'generateDistLinks']) {
commandLine 'sh', 'python/hail/docs/makeDocs.sh'
commandLine 'bash', 'python/hail/docs/makeDocs.sh'
environment SPARK_HOME: sparkHome
environment PYSPARK_SUBMIT_ARGS: '--conf spark.driver.extraClassPath=' + projectDir + '/build/libs/hail-all-spark.jar --conf spark.executor.extraClassPath=' + projectDir + '/build/libs/hail-all-spark.jar pyspark-shell'
environment PYTHONPATH: '' + projectDir + '/python:' + sparkHome + '/python:' + sparkHome + '/python/lib/py4j-' + py4jVersion + '-src.zip'
Expand All @@ -406,7 +406,7 @@ task makeDocs(type: Exec, dependsOn: ['shadowJar', 'generateDistLinks']) {
}

task makeDocsNoTest(type: Exec, dependsOn: ['shadowJar', 'generateDistLinks']) {
commandLine 'sh', 'python/hail/docs/makeDocs.sh'
commandLine 'bash', 'python/hail/docs/makeDocs.sh'
environment SPARK_HOME: sparkHome
environment PYSPARK_SUBMIT_ARGS: '--conf spark.driver.extraClassPath=' + projectDir + '/build/libs/hail-all-spark.jar --conf spark.executor.extraClassPath=' + projectDir + '/build/libs/hail-all-spark.jar pyspark-shell'
environment PYTHONPATH: '' + projectDir + '/python:' + sparkHome + '/python:' + sparkHome + '/python/lib/py4j-' + py4jVersion + '-src.zip'
Expand Down
2 changes: 1 addition & 1 deletion hail-ci-build-image
Original file line number Diff line number Diff line change
@@ -1 +1 @@
gcr.io/broad-ctsa/hail-pr-builder:3c7ad9dfced59f4ee54f9137e550051ae3b92c94
gcr.io/broad-ctsa/hail-pr-builder:45c84e01b80ad990ce053b22cb07ed2187954712
4 changes: 2 additions & 2 deletions hail-ci-build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
set -x
source activate hail
GRADLE_OPTS=-Xmx2048m ./gradlew testAll makeDocs --gradle-user-home /gradle-cache
GRADLE_OPTS=-Xmx2048m ./gradlew testAll makeDocs archiveZip --gradle-user-home /gradle-cache
EXIT_CODE=$?
rm -rf artifacts
mkdir -p artifacts
cp build/libs/hail-all-spark.jar artifacts/hail-all-spark.jar
cp build/distributions/hail-python.zip artifacts/hail-python.zip
cp -R build/www artifacts/www
cp -R build/reports/tests/test artifacts/test-report
cp -R build/reports/tests artifacts/test-report
cat <<EOF > artifacts/index.html
<html>
<body>
Expand Down
2 changes: 1 addition & 1 deletion python/hail/docs/makeDocs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

set -e

Expand Down

0 comments on commit c91400d

Please sign in to comment.