浏览代码

feat: add build pipe

double.huang 4 年之前
父节点
当前提交
80a1b30f5a
共有 2 个文件被更改,包括 25 次插入0 次删除
  1. 17 0
      .drone.yml
  2. 8 0
      Dockerfile

+ 17 - 0
.drone.yml

@@ -0,0 +1,17 @@
+clone:
+  depth: 50
+  recursive: true
+  path: i2-bill-erp
+build:
+  image: docker.i2edu.net/golang:1.13
+  commands:
+    - go mod tidy
+    - CGO_ENABLED=0 go build -a -ldflags '-s'
+    - tar zcf i2-bill-erp.tar.gz etc i2-bill-erp
+publish:
+  docker:
+    registry: docker.qianqiusoft.com
+    email: develop@qianqiusoft.com
+    repo: docker.qianqiusoft.com/i2-bill-erp
+    tag:
+      - latest

+ 8 - 0
Dockerfile

@@ -0,0 +1,8 @@
+FROM alpine
+
+ADD i2-bill-erp.tar.gz /app/
+
+VOLUME [ "/app/etc" ]
+EXPOSE 6166
+WORKDIR /app
+CMD ["/app/i2-bill-erp -f etc/transform.yaml"]