From bcaf580fa629b5fdaeb0e3d7124466d348edca90 Mon Sep 17 00:00:00 2001 From: zhang <431960018@qq.com> Date: Tue, 28 Nov 2023 11:31:00 +0800 Subject: [PATCH] test drone --- .drone.yml | 7 +++++-- Dockerfile | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index b405659..86bcca0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,7 +19,10 @@ steps: - name: build image: maven:3.8-openjdk-8 commands: - - mvn clean package + - mkdir /root/.m2 + - cp /usr/share/maven/ref/settings-docker.xml /root/.m2/settings.xml + - sed -i 's/\\/usr\\/share\\/maven\\/ref\\/repository/\\/drone\\/src\\/maven/g' /root/.m2/settings.xml + - mvn package - name: rebuild-cache image: meltwater/drone-cache @@ -42,7 +45,7 @@ steps: path: /var/run/docker.sock settings: dockerfile: Dockerfile - repo: 192.168.230.38:8888/zabbix/back:latest + repo: 192.168.230.38:8888/zabbix/back registry: 192.168.230.38:8888 insecure: true # 如果需要使用不安全的连接,可以设置为 true username: diff --git a/Dockerfile b/Dockerfile index 6caf0fa..f7964df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM maven:3.8-openjdk-11 # COPY test_zabbix-0.0.1-SNAPSHOT.jar app.jar # # RUN bash -c "touch /app.jar" -WORKDIR /app +#WORKDIR /app ADD target/test_zabbix-0.0.1-SNAPSHOT.jar app.jar EXPOSE 8080 ENTRYPOINT ["java","-jar","app.jar","--spring.profiles.active=prod"]