Browse Source

add new build scripts & drone ci script

master
soekarmana 1 year ago
parent
commit
ee483a1033
2 changed files with 24 additions and 0 deletions
  1. 10
    0
      .drone.yml
  2. 14
    0
      build-image.sh

+ 10
- 0
.drone.yml View File

@@ -0,0 +1,10 @@
1
+pipeline:
2
+  build-docker:
3
+    image: docker:18.06.1-ce
4
+    volumes:
5
+      - /var/run/docker.sock:/var/run/docker.sock
6
+    commands:
7
+      - chmod +x ./build-image.sh
8
+      - ./build-image.sh
9
+    when:
10
+event: [push]

+ 14
- 0
build-image.sh View File

@@ -0,0 +1,14 @@
1
+#!/bin/sh
2
+set -e
3
+set -o xtrace
4
+
5
+IMAGE_NAME=warmup_welcome
6
+
7
+# clean old images
8
+OLD_IMAGES=$(docker images $IMAGE_NAME -q --no-trunc)
9
+if [ -n "${OLD_IMAGES}" ]; then
10
+  docker rmi -f ${OLD_IMAGES};
11
+fi
12
+
13
+#Build Images
14
+docker build . -t $IMAGE_NAME

Loading…
Cancel
Save