Skip to content

Commit 1653f92

Browse files
author
yang.guo
authored
Merge pull request #242 from FlowCI/develop
add AgentDockerfile
2 parents 704e693 + 530e747 commit 1653f92

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

Dockerfile-agent

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Flow Agent Dockerfile
3+
# Image Name: flowci/flow-agent
4+
#
5+
# https://github.com/FlowCI/flow-platform
6+
#
7+
FROM flowci/flow-platform-base:latest
8+
9+
# setup flow.ci default environments
10+
ENV FLOW_PLATFORM_SOURCE_CODE=/flow-platform
11+
ENV MVN_CACHE=/root/.m2
12+
ENV FLOW_AGENT_DIR=$HOME/agent
13+
14+
15+
# copy code
16+
COPY . $FLOW_PLATFORM_SOURCE_CODE
17+
18+
# Build Agent and delete no use thing
19+
RUN cd $FLOW_PLATFORM_SOURCE_CODE \
20+
&& rm -rf $FLOW_PLATFORM_SOURCE_CODE/dist \
21+
&& mvn clean install -DskipTests=true \
22+
&& cd $FLOW_PLATFORM_SOURCE_CODE \
23+
&& mkdir -p $FLOW_AGENT_DIR \
24+
&& mv ./dist/flow-agent-*.jar $FLOW_AGENT_DIR/flow-agent.jar \
25+
&& rm -rf $FLOW_PLATFORM_SOURCE_CODE \
26+
&& rm -rf $MVN_CACHE
27+
28+
29+
WORKDIR $FLOW_AGENT_DIR
30+
31+
CMD java -jar ./flow-agent.jar $FLOW_BASE_URL $FLOW_TOKEN

platform-control-center/src/main/java/com/flow/platform/cc/service/CmdService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232
public interface CmdService extends WebhookService {
3333

34-
Integer DEFAULT_CMD_TIMEOUT = 600; // in seconds 10 mins
34+
Integer DEFAULT_CMD_TIMEOUT = 3600; // in seconds, default 1 hour
3535

3636
/**
3737
* Create command from CmdInfo

0 commit comments

Comments
 (0)