瀏覽代碼

add new build scripts & drone ci script

master
soekarmana 5 年之前
父節點
當前提交
ee483a1033
共有 2 個檔案被更改,包括 24 行新增0 行删除
  1. +10
    -0
      .drone.yml
  2. +14
    -0
      build-image.sh

+ 10
- 0
.drone.yml 查看文件

@ -0,0 +1,10 @@
pipeline:
build-docker:
image: docker:18.06.1-ce
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- chmod +x ./build-image.sh
- ./build-image.sh
when:
event: [push]

+ 14
- 0
build-image.sh 查看文件

@ -0,0 +1,14 @@
#!/bin/sh
set -e
set -o xtrace
IMAGE_NAME=warmup_welcome
# clean old images
OLD_IMAGES=$(docker images $IMAGE_NAME -q --no-trunc)
if [ -n "${OLD_IMAGES}" ]; then
docker rmi -f ${OLD_IMAGES};
fi
#Build Images
docker build . -t $IMAGE_NAME

Loading…
取消
儲存