Procházet zdrojové kódy

:pencil: more detailed readme and drone setup

tags/0.9.0
j před 5 roky
rodič
revize
9be62ef542
2 změnil soubory, kde provedl 20 přidání a 8 odebrání
  1. 10
    2
      .drone.yml
  2. 10
    6
      README.md

+ 10
- 2
.drone.yml Zobrazit soubor

1
 ---
1
 ---
2
+################
3
+#    SECRETS   #
4
+################
5
+
6
+# push_deploy_key: id_rsa from DRONE host machine
7
+
8
+
2
 ################
9
 ################
3
 # Build & Test #
10
 # Build & Test #
4
 ################
11
 ################
57
     - success
64
     - success
58
 
65
 
59
 steps:
66
 steps:
60
-# Test the vue theme
67
+# post-receive hook
61
 - name: push commit
68
 - name: push commit
62
-  image: appleboy/drone-git-push
69
+  image: appleboy/drone-git-push:0.2.0-linux-amd64
63
   settings:
70
   settings:
64
     branch: master
71
     branch: master
65
     remote: maeda@143.110.234.41:/opt/staging/vue-wp.git
72
     remote: maeda@143.110.234.41:/opt/staging/vue-wp.git
66
     remote_name: staging
73
     remote_name: staging
67
     force: true
74
     force: true
68
     ssh_key:
75
     ssh_key:
76
+      # !: id_rsa from DRONE machine
69
       from_secret: push_deploy_key
77
       from_secret: push_deploy_key
70
 
78
 
71
 volumes:
79
 volumes:

+ 10
- 6
README.md Zobrazit soubor

90
 
90
 
91
 Lastly set your directory owner to `www-data` with `docker exec -it vue-wp chown -R www-data:www-data ./wp-content`
91
 Lastly set your directory owner to `www-data` with `docker exec -it vue-wp chown -R www-data:www-data ./wp-content`
92
 
92
 
93
-:robot: Drone CI/CD
94
--------------------
95
 
93
 
96
-We use Drone for automated testing and deployment.
94
+:robot: CI/CD
95
+-------------
96
+
97
+Included is a drone config, and some recommended steps to build. 
97
 
98
 
98
-To get automated builds working...
99
+* You MUST activate the pipeline
100
+* Add the `id_rsa` of the drone host to appropriate key in the pipeline secrets under the name `push_deploy_key`
99
 
101
 
100
-You MUST add your *private* `id_rsa` to the pipeline secrets under the name `push_deploy_key`
102
+You also need to setup a `post-receive` hook on the host server.
101
 
103
 
102
-You MUST have the `post-receive` hook running correctly
104
+* On your *development* machine, add the target host as a remote `git remote add </opt/staging/js-vue.git> staging master`
105
+* Login to the *remote* machine and setup a bare git repo on `git init --bare </opt/staging/js-vue.git>`
106
+* Copy the `post-receive` hook file into the `</opt/staging/js-vue.git/hooks/>` directory

Načítá se…
Zrušit
Uložit