Commit c1fc31f 1 parent e4a9b47 commit c1fc31f Copy full SHA for c1fc31f
File tree 4 files changed +29
-4
lines changed
4 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 18
18
#
19
19
set -e
20
20
PARENTDIR=$( pwd)
21
+ ARCH=` uname -m`
21
22
22
- gradle -q -b ${PARENTDIR} /core/chaincode/shim/java/build.gradle clean
23
- gradle -q -b ${PARENTDIR} /core/chaincode/shim/java/build.gradle build
24
- cp -r ${PARENTDIR} /core/chaincode/shim/java/build/libs /root/
23
+ if [ x$ARCH != xx86_64 ]
24
+ then
25
+ apt-get update && apt-get install openjdk-8-jdk -y
26
+ echo " FIXME: Java Shim code needs work on ppc64le. Commenting it for now."
27
+ else
28
+ add-apt-repository ppa:openjdk-r/ppa -y
29
+ apt-get update && apt-get install openjdk-8-jdk -y
30
+ update-java-alternatives -s java-1.8.0-openjdk-amd64
31
+ gradle -q -b ${PARENTDIR} /core/chaincode/shim/java/build.gradle clean
32
+ gradle -q -b ${PARENTDIR} /core/chaincode/shim/java/build.gradle build
33
+ cp -r ${PARENTDIR} /core/chaincode/shim/java/build/libs /root/
34
+ fi
Original file line number Diff line number Diff line change 1
- FROM openjdk:8
1
+ FROM hyperledger/fabric-baseimage
2
2
RUN wget https://services.gradle.org/distributions/gradle-2.12-bin.zip -P /tmp --quiet
3
3
RUN unzip -qo /tmp/gradle-2.12-bin.zip -d /opt && rm /tmp/gradle-2.12-bin.zip
4
4
RUN ln -s /opt/gradle-2.12/bin/gradle /usr/bin
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ GO_LDFLAGS=$2
7
7
8
8
BASEIMAGE=" hyperledger/fabric-peer"
9
9
IMAGE=$BASEIMAGE
10
+ ARCH=` uname -m`
10
11
11
12
if [ " $TAG " != " " ]
12
13
then
@@ -25,6 +26,13 @@ PKGS=`go list github.com/hyperledger/fabric/... | grep -v /vendor/ | \
25
26
grep -v /examples/chaincode/go/asset_management | \
26
27
grep -v /examples/chaincode/go/utxo | \
27
28
grep -v /examples/chaincode/go/rbac_tcerts_no_attrs`
29
+
30
+ if [ x$ARCH == xppc64le -o x$ARCH == xs390x ]
31
+ then
32
+ PKGS=` echo $PKGS | sed ' s@' github.com/hyperledger/fabric/core/chaincode/platforms/java/test' @@g' `
33
+ PKGS=` echo $PKGS | sed ' s@' github.com/hyperledger/fabric/core/chaincode/platforms/java' @@g' `
34
+ fi
35
+
28
36
echo " DONE!"
29
37
30
38
echo -n " Starting peer.."
Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ apt-get install --yes tcl tclx tcllib
39
39
apt-get install --yes npm
40
40
41
41
# Install JDK 1.8 for Java chaincode development
42
+ ARCH=` uname -m`
43
+ if [ x$ARCH == xx86_64 ]
44
+ then
42
45
add-apt-repository ppa:openjdk-r/ppa -y
46
+ fi
43
47
apt-get update && apt-get install openjdk-8-jdk -y
44
48
45
49
# Download Gradle and create sym link
@@ -54,5 +58,8 @@ curl -fsSL http://apache.osuosl.org/maven/maven-3/$MAVEN_VERSION/binaries/apache
54
58
| tar -xzC /usr/share/maven --strip-components=1 \
55
59
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
56
60
61
+ if [ x$ARCH == xx86_64 ]
62
+ then
57
63
# Set the default JDK to 1.8
58
64
update-java-alternatives -s java-1.8.0-openjdk-amd64
65
+ fi
You can’t perform that action at this time.
0 commit comments