This repository was archived by the owner on Jan 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
52 lines (43 loc) · 1.67 KB
/
build.xml
File metadata and controls
52 lines (43 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="UTF-8"?>
<project name="DataWorkbench">
<property file="docker.properties"/>
<property name="repo" value="localbuild"/>
<property name="tag" value="0.0.0"/>
<property name="node_env" value="prod"/>
<target name="build" description="Docker build image for next version">
<echo message="version ${tag}"></echo>
<echo message="docker build -t ${repo}:next . --build-arg NODE_ENV=${node_env}"></echo>
<exec executable="docker">
<arg value="build"/>
<arg value="-t"/>
<arg value="${repo}:next"/>
<arg value="."/>
<arg value="--build-arg"/>
<arg value="NODE_ENV=${node_env}"/>
</exec>
</target>
<target name="release" description="Tag Docker and git as release and push (make sure to do a version bump first)">
<echo message="docker tag ${repo}:next ${repo}:${tag}"/>
<exec executable="docker">
<arg value="tag"/>
<arg value="${repo}:next"/>
<arg value="${repo}:${tag}"/>
</exec>
<echo message="git tag ${tag}"/>
<exec executable="git">
<arg value="tag"/>
<arg value="${tag}"/>
</exec>
<echo message="docker push ${repo}:${tag} ."></echo>
<exec executable="docker">
<arg value="push"/>
<arg value="${repo}:${tag}"/>
</exec>
</target>
<target name="shell"
description="How to start a shell in the Docker image to inspect files etc.">
<echo message="To start the image and access it with a bash shell, run one of these:"/>
<echo message="docker run --rm -it --entrypoint=/bin/bash ${repo}:${tag}"/>
<echo message="docker run --rm -it --entrypoint=/bin/bash ${repo}:next"/>
</target>
</project>