Przeglądaj źródła

added, improved drone file from fb admin and activated repo

master
Daniel Huebleitner 6 lat temu
rodzic
commit
ca3530da05
1 zmienionych plików z 83 dodań i 0 usunięć
  1. 83
    0
      .drone.yml

+ 83
- 0
.drone.yml Wyświetl plik

@@ -0,0 +1,83 @@
1
+---
2
+kind: pipeline
3
+type: docker
4
+name: default
5
+
6
+
7
+steps:
8
+
9
+- name: build created
10
+  image: alpine
11
+  commands:
12
+    - echo ${DRONE_BUILD_CREATED}
13
+
14
+- name: restore cache
15
+  image: drillster/drone-volume-cache
16
+  settings:
17
+    restore: true
18
+    mount:
19
+      - ./node_modules
20
+  volumes:
21
+  - name: cache
22
+    path: /cache
23
+
24
+- name: npm install
25
+  image: node:12
26
+  commands:
27
+  - npm install
28
+
29
+- name: npm run build
30
+  image: node:12
31
+  commands:
32
+  - npm run build
33
+
34
+- name: rebuild cache
35
+  image: drillster/drone-volume-cache
36
+  settings:
37
+    rebuild: true
38
+    mount:
39
+      - ./node_modules
40
+  volumes:
41
+  - name: cache
42
+    path: /cache
43
+
44
+- name: deliver dist
45
+  image: node:12
46
+  commands:
47
+  - echo ${DRONE_BUILD_CREATED}
48
+  - git clone https://www.versioncontrol.me/frontwork-distribution/${DRONE_REPO_NAME}.git; cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../dist/* .; cp ../LICENSE.md .
49
+  - git add --all; git -c user.email="${DRONE_COMMIT_AUTHOR_EMAIL}" -c user.name="${DRONE_COMMIT_AUTHOR}" commit --all --allow-empty --message "generated from tag ${DRONE_TAG}"
50
+  - (git tag ${DRONE_TAG} && git push --force https://$GIT_USER:$GIT_PASSWORD@versioncontrol.me/frontwork-distribution/${DRONE_REPO_NAME}.git master ${DRONE_TAG}) || true
51
+  environment:
52
+    GIT_USER:
53
+      from_secret: git_user
54
+    GIT_PASSWORD:
55
+      from_secret: git_password
56
+  when:
57
+    event:
58
+    - tag
59
+
60
+- name: deliver container
61
+  image: plugins/docker
62
+  settings:
63
+    registry: registry.conatum.eu
64
+    insecure: true
65
+    repo: registry.conatum.eu/frontwork/admin
66
+    tags: ${DRONE_BUILD_CREATED}
67
+
68
+- name: release container
69
+  image: plugins/docker
70
+  settings:
71
+    repo: frontwork/admin
72
+    tags: ${DRONE_TAG}
73
+    username: frontwork
74
+    password:
75
+      from_secret: docker_password
76
+  when:
77
+    event:
78
+    - tag
79
+    
80
+volumes:
81
+- name: cache 
82
+  host:
83
+    path: /tmp

Ładowanie…
Anuluj
Zapisz