|
1 | 1 | ##########################################################
|
2 |
| -# Copyright 2016 cybermaggedon |
| 2 | +# Copyright 2016 Crown Copyright, cybermaggedon |
3 | 3 | #
|
4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | # you may not use this file except in compliance with the License.
|
|
14 | 14 | # limitations under the License.
|
15 | 15 | ##########################################################
|
16 | 16 |
|
17 |
| -GAFFER_VERSION=0.3.9 |
18 |
| - |
19 |
| -JACKSON=com/fasterxml/jackson |
| 17 | +GAFFER_VERSION=0.4.4 |
20 | 18 |
|
21 | 19 | REPOSITORY=docker.io/gchq/gaffer
|
22 | 20 |
|
23 | 21 | WAR_FILES=\
|
24 |
| - gaffer/example-rest/${GAFFER_VERSION}/example-rest-${GAFFER_VERSION}.war |
| 22 | + gaffer/example-rest/${GAFFER_VERSION}/example-rest-${GAFFER_VERSION}.war \ |
| 23 | + gaffer/ui/${GAFFER_VERSION}/ui-${GAFFER_VERSION}.war |
25 | 24 |
|
26 | 25 | JAR_FILES=\
|
27 | 26 | gaffer/accumulo-store/${GAFFER_VERSION}/accumulo-store-${GAFFER_VERSION}-iterators.jar \
|
28 |
| - gaffer/simple-function-library/${GAFFER_VERSION}/simple-function-library-${GAFFER_VERSION}.jar \ |
29 |
| - gaffer/simple-serialisation-library/${GAFFER_VERSION}/simple-serialisation-library-${GAFFER_VERSION}.jar \ |
30 |
| - ${JACKSON}/core/jackson-annotations/2.6.2/jackson-annotations-2.6.2.jar \ |
31 |
| - ${JACKSON}/core/jackson-core/2.6.2/jackson-core-2.6.2.jar \ |
32 |
| - ${JACKSON}/core/jackson-databind/2.6.2/jackson-databind-2.6.2.jar \ |
33 |
| - ${JACKSON}/datatype/jackson-datatype-json-org/2.3.3/jackson-datatype-json-org-2.3.3.jar \ |
34 |
| - ${JACKSON}/jaxrs/jackson-jaxrs-base/2.6.2/jackson-jaxrs-base-2.6.2.jar \ |
35 |
| - ${JACKSON}/jaxrs/jackson-jaxrs-json-provider/2.6.2/jackson-jaxrs-json-provider-2.6.2.jar \ |
36 |
| - ${JACKSON}/module/jackson-module-jaxb-annotations/2.6.2/jackson-module-jaxb-annotations-2.6.2.jar \ |
37 |
| - ${JACKSON}/module/jackson-module-jsonSchema/2.1.0/jackson-module-jsonSchema-2.1.0.jar \ |
38 |
| - ${JACKSON}/module/jackson-module-scala_2.10/2.1.5/jackson-module-scala_2.10-2.1.5.jar |
| 27 | + gaffer/common-util/${GAFFER_VERSION}/common-util-${GAFFER_VERSION}.jar \ |
| 28 | + gaffer/simple-function-library/${GAFFER_VERSION}/simple-function-library-${GAFFER_VERSION}-shaded.jar \ |
| 29 | + gaffer/simple-serialisation-library/${GAFFER_VERSION}/simple-serialisation-library-${GAFFER_VERSION}-shaded.jar \ |
| 30 | + |
| 31 | +VERSION=${GAFFER_VERSION} |
39 | 32 |
|
40 | 33 | SUDO=
|
41 | 34 |
|
42 |
| -SCHEMA_FILES=\ |
43 |
| - example-rest/target/classes/schema/dataSchema.json \ |
44 |
| - example-rest/target/classes/schema/dataTypes.json \ |
45 |
| - example-rest/target/classes/schema/storeSchema.json \ |
46 |
| - example-rest/target/classes/schema/storeTypes.json |
| 35 | +PROXY_ARGS=--build-arg HTTP_PROXY=${http_proxy} --build-arg http_proxy=${http_proxy} --build-arg HTTPS_PROXY=${https_proxy} --build-arg https_proxy=${https_proxy} |
47 | 36 |
|
48 |
| -PROP_FILES= \ |
49 |
| - example-rest/target/classes/mockaccumulostore.properties |
| 37 | +PROXY_HOST_PORT_ARGS=--build-arg proxy_host=${proxy_host} --build-arg proxy_port=${proxy_port} |
50 | 38 |
|
51 | 39 | all: build container
|
52 | 40 |
|
53 | 41 | product:
|
54 | 42 | mkdir product
|
55 | 43 |
|
| 44 | +# In the future this could be removed when the Gaffer binaries are published to Maven Central. |
56 | 45 | build: product
|
57 |
| - ${SUDO} docker build ${BUILD_ARGS} -t gaffer-dev -f Dockerfile.dev . |
58 |
| - ${SUDO} docker build ${BUILD_ARGS} -t gaffer-build -f Dockerfile.build . |
| 46 | + ${SUDO} docker build ${PROXY_ARGS} ${PROXY_HOST_PORT_ARGS} ${BUILD_ARGS} --build-arg GAFFER_VERSION=${GAFFER_VERSION} -t gaffer-build -f Dockerfile.build . |
59 | 47 | id=$$(${SUDO} docker run -d gaffer-build sleep 3600); \
|
60 | 48 | dir=/root/.m2/repository; \
|
61 | 49 | for file in ${WAR_FILES} ${JAR_FILES}; do \
|
62 | 50 | bn=$$(basename $$file); \
|
63 | 51 | ${SUDO} docker cp $${id}:$${dir}/$${file} product/$${bn}; \
|
64 | 52 | done; \
|
65 |
| - dir=/usr/local/src/gaffer; \ |
66 |
| - for file in ${SCHEMA_FILES} ${PROP_FILES}; do \ |
67 |
| - bn=$$(basename $$file); \ |
68 |
| - ${SUDO} docker cp $${id}:$${dir}/$${file} product/$${bn}; \ |
69 |
| - done; \ |
70 | 53 | ${SUDO} docker rm -f $${id}
|
71 | 54 |
|
72 |
| -VERSION=${GAFFER_VERSION} |
73 |
| - |
74 | 55 | container: wildfly-10.1.0.CR1.zip
|
75 |
| - ${SUDO} docker build ${BUILD_ARGS} -t gaffer -f Dockerfile.deploy . |
| 56 | + ${SUDO} docker build ${PROXY_ARGS} ${BUILD_ARGS} -t gaffer -f Dockerfile.deploy . |
76 | 57 | ${SUDO} docker tag gaffer ${REPOSITORY}:${VERSION}
|
77 | 58 |
|
78 | 59 | wildfly-10.1.0.CR1.zip:
|
|
0 commit comments