This repository was archived by the owner on Mar 3, 2023. It is now read-only.
File tree 7 files changed +59
-26
lines changed
7 files changed +59
-26
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ FROM ubuntu:18.04
21
21
ENV TARGET_PLATFORM ubuntu
22
22
ENV bazelVersion 0.26.0
23
23
24
+
24
25
RUN apt-get update && apt-get -y install \
25
26
g++ \
26
27
cmake \
@@ -51,9 +52,17 @@ RUN apt-get update && apt-get install -y nodejs
51
52
52
53
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
53
54
55
+ ARG UNAME
56
+ ARG UID
57
+ ARG GID
58
+ RUN groupadd -g $GID -o $UNAME
59
+ RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
60
+ USER $UNAME
61
+
54
62
RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
55
63
&& chmod +x /tmp/bazel.sh \
56
- && /tmp/bazel.sh
64
+ && /tmp/bazel.sh --user
57
65
58
- ADD bazelrc /root/.bazelrc
66
+ ADD bazelrc /home/$UNAME/.bazelrc
67
+ ENV PATH="/home/$UNAME/bin:${PATH}"
59
68
Original file line number Diff line number Diff line change @@ -23,17 +23,18 @@ VERSION=0.20
23
23
set -x -e
24
24
25
25
cd ${ROOT_DIR} /website2/website
26
- # npm install yarn
27
- npm build
26
+ npm install yarn
27
+ npm run-script build
28
28
29
29
node ./scripts/replace.js
30
30
31
31
rm -rf ${ROOT_DIR} /generated-site/content
32
- mkdir -p ${ROOT_DIR} /generated-site/content
32
+ mkdir -p ${ROOT_DIR} /generated-site/content/api/java
33
+ mkdir -p ${ROOT_DIR} /generated-site/content/api/python
33
34
# # copy generated site
34
35
cp -R build/incubator-heron/* ${ROOT_DIR} /generated-site/content
35
- # # copy java docs website2/website/static/api
36
- cp -R ${ROOT_DIR} /website2/website/static /api/* ${ROOT_DIR} /generated-site/content/api/java/
36
+ # # copy java docs
37
+ cp -R ${ROOT_DIR} /website2/website/public /api/java /* ${ROOT_DIR} /generated-site/content/api/java/
37
38
# # copy pydocs
38
39
cp -R ${ROOT_DIR} /website2/website/static/api/python/* ${ROOT_DIR} /generated-site/content/api/python/
39
40
# # remove bazelrc for dockerfile
Original file line number Diff line number Diff line change @@ -53,11 +53,17 @@ echo "docker file"
53
53
echo $DOCKER_FILE
54
54
55
55
echo " Building heron-compiler container"
56
- docker build -t heron-compiler:$TARGET_PLATFORM -f $DOCKER_FILE .
56
+ docker build \
57
+ --build-arg UNAME=$USER \
58
+ --build-arg UID=$( id -u ${USER} ) \
59
+ --build-arg GID=$( id -g ${USER} ) \
60
+ -t heron-compiler:$TARGET_PLATFORM -f $DOCKER_FILE .
57
61
58
62
59
63
docker run \
60
64
--rm \
61
- -v $PROJECT_DIR /..:/dist \
62
- -t heron-compiler:$TARGET_PLATFORM make -C /dist/website2/website/ buildsite
65
+ -u ` id -u` :` id -g` \
66
+ -v $PROJECT_DIR /..:/home/$USER /heron \
67
+ -v /etc/passwd:/etc/passwd \
68
+ -t heron-compiler:$TARGET_PLATFORM make -C /home/$USER /heron/website2/website/ buildsite
63
69
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ CLOSURE_CLASSES="$HERON_ROOT_DIR/bazel-bin/storm-compatibility/src/java/_javac/s
59
59
export CLASSPATH=$BIN_JARS :$GEN_JARS :$SCRIBE_JARS :$PROTO_JARS :$CLOSURE_CLASSES
60
60
61
61
$JAVADOC $FLAGS \
62
+ -encoding " UTF-8" \
62
63
-windowtitle " Heron Java API" \
63
64
-doctitle " The Heron Java API" \
64
65
-overview $OVERVIEW_HTML_FILE \
Original file line number Diff line number Diff line change 16
16
# specific language governing permissions and limitations
17
17
# under the License.
18
18
19
+ set -e
20
+
19
21
ROOT_DIR=$( git rev-parse --show-toplevel)
20
22
WORK_DIR=${ROOT_DIR} /generated-site/content
21
23
ME=` basename $0 `
22
24
23
- # push all of the results to asf-site branch
24
- git checkout asf-site
25
- git clean -f -d
26
- git pull origin asf-site
25
+ ORIGIN_REPO=$( git remote show origin | grep ' Push URL' | awk -F// ' {print $NF}' )
26
+ echo " ORIGIN_REPO: $ORIGIN_REPO "
27
+
28
+ HERON_SITE_TMP=/tmp/heron-site
29
+ (
30
+
31
+ cd $ROOT_DIR
32
+ rm -rf $HERON_SITE_TMP
33
+ mkdir $HERON_SITE_TMP
34
+ cd $HERON_SITE_TMP
27
35
28
- rm -rf ${ROOT_DIR} /content
29
- mkdir ${ROOT_DIR} /content
36
+ git clone " https://$GH_TOKEN @$ORIGIN_REPO " .
37
+ git config user.name " Heron Site Updater"
38
+ git config user.email
" [email protected] "
39
+ git checkout asf-site
30
40
31
- cp -a $WORK_DIR /* ${ROOT_DIR} /content
32
- cp -a ${ROOT_DIR} /.htaccess ${ROOT_DIR} /content
41
+ # copy the generated dir
42
+ cp -r $WORK_DIR /* $HERON_SITE_TMP /content
43
+ cp -a ${ROOT_DIR} /.htaccess ${ROOT_DIR} /content
44
+ # push all of the results to asf-site branch
45
+ git add -A .
46
+ git diff-index --quiet HEAD || (git commit -m " git-site-role commit from $ME " && git push -q origin HEAD:asf-site)
47
+ rm -rf $HERON_SITE_TMP
33
48
34
- git add ${ROOT_DIR} /content
35
- git commit -m " git-site-role commit from $ME "
36
- git push origin asf-site
49
+ )
Original file line number Diff line number Diff line change 18
18
19
19
set -e
20
20
21
- HERONPY_VERSION =$1
21
+ TEMP_HERONPY_VERSION =$1
22
22
HERON_ROOT_DIR=$( git rev-parse --show-toplevel)
23
23
cd ${HERON_ROOT_DIR}
24
24
@@ -41,7 +41,10 @@ source "$VENV/bin/activate"
41
41
pip install pdoc==0.3.2
42
42
pip install --ignore-installed six
43
43
# Install the heronpy
44
- pip install $PIP_LOCATION /heronpy-${HERONPY_VERSION} -py2.py3-none-any.whl
44
+ echo " list heronpy location"
45
+ ls $PIP_LOCATION
46
+ pip install $PIP_LOCATION /heronpy-* -py2.py3-none-any.whl
47
+
45
48
46
49
mkdir -p static/api && rm -rf static/api/python
47
50
Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ const versions = getVersions();
35
35
const latestVersion = versions [ 0 ] ;
36
36
37
37
const bazelVersions = {
38
- '0.20.0' : '0.14.1' ,
39
- '0.20.1' : '0.26' ,
40
- 'latest' : '0.26' ,
38
+ '0.20.0-incubating ' : '0.14.1' ,
39
+ '0.20.1-incubating ' : '0.26.0 ' ,
40
+ 'latest' : '0.26.0 ' ,
41
41
}
42
42
43
43
function replaceBazel ( version ) {
You can’t perform that action at this time.
0 commit comments