更新jenkinsfile
This commit is contained in:
@@ -1,23 +1,20 @@
|
|||||||
FROM 192.168.0.19:9010/eclipse-temurin:8-jre
|
FROM 192.168.0.19:9010/eclipse-temurin:8-jre
|
||||||
|
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
|
RUN sed -i 's|http://archive.ubuntu.com|http://mirrors.aliyun.com|g; \
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends wget tzdata && \
|
s|http://security.ubuntu.com|http://mirrors.aliyun.com|g' \
|
||||||
|
/etc/apt/sources.list && \
|
||||||
|
apt-get update && apt-get install -y --no-install-recommends wget tzdata && \
|
||||||
wget -q "https://github.com/aptible/supercronic/releases/download/v0.2.29/supercronic-linux-amd64" \
|
wget -q "https://github.com/aptible/supercronic/releases/download/v0.2.29/supercronic-linux-amd64" \
|
||||||
-O /usr/local/bin/supercronic && \
|
-O /usr/local/bin/supercronic && \
|
||||||
chmod +x /usr/local/bin/supercronic && \
|
chmod +x /usr/local/bin/supercronic && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# 对齐线上部署路径,/home/goojia/bin/*.sh 中的 cd 路径无需改动
|
# 对齐线上部署路径,/home/goojia/bin/*.sh 中的 cd 路径无需改动
|
||||||
WORKDIR /home/goojia/webapps/fangjia-script
|
WORKDIR /home/goojia/webapps/fangjia-script
|
||||||
|
|
||||||
# 构建产物:.groovy 脚本 + lib/*.jar(含 groovy-all.jar,无需单独安装 Groovy)
|
# 构建产物:.groovy 脚本 + lib/*.jar(含 groovy-all.jar,无需单独安装 Groovy)
|
||||||
COPY target/classes/ .
|
COPY target/classes/ .
|
||||||
COPY run.sh .
|
COPY run.sh .
|
||||||
RUN chmod +x run.sh
|
RUN chmod +x run.sh
|
||||||
|
|
||||||
RUN mkdir -p /home/goojia/logs
|
RUN mkdir -p /home/goojia/logs
|
||||||
|
|
||||||
COPY crontab.txt /app/crontab
|
COPY crontab.txt /app/crontab
|
||||||
|
|
||||||
CMD ["supercronic", "/app/crontab"]
|
CMD ["supercronic", "/app/crontab"]
|
||||||
|
|||||||
Reference in New Issue
Block a user