ソースを参照

:gear: adjusting post-receive and testing remote push

tags/0.0.1
J 4年前
コミット
7b9d11cd1a
3個のファイルの変更16行の追加3行の削除
  1. 1
    1
      .drone.yml
  2. 14
    1
      README.md
  3. 1
    1
      deployment/post-receive

+ 1
- 1
.drone.yml ファイルの表示

@@ -118,7 +118,7 @@ steps:
118 118
   image: appleboy/drone-git-push:0.2.0-linux-amd64
119 119
   settings:
120 120
     branch: master
121
-    remote: maeda@143.110.234.41:/opt/staging/siimee.git
121
+    remote: maeda@165.232.128.85:/opt/staging/siimee.git
122 122
     remote_name: staging
123 123
     force: true
124 124
     ssh_key:

+ 14
- 1
README.md ファイルの表示

@@ -1,5 +1,7 @@
1 1
 # :fist: SIIMEE
2 2
 
3
+[![Build Status](http://gitea.yvvas.com:8000/api/badges/fyindr/siimee/status.svg)](http://gitea.yvvas.com:8000/fyindr/siimee)
4
+
3 5
 Almost everything you need to develop.
4 6
 
5 7
 ## :wrench: Tooling
@@ -30,7 +32,18 @@ See `./docs`
30 32
 8. User a web browser to check `http://localhost:3000` 
31 33
 
32 34
 ## :ship: CI/CD
33
-TBD
35
+
36
+Included is a drone config, and some recommended steps to build. 
37
+
38
+* You MUST activate the pipeline
39
+* Add the `id_rsa` of the drone host to appropriate key in the pipeline secrets under the name `push_deploy_key`
40
+
41
+You also need to setup a `post-receive` hook on the host server.
42
+
43
+* On your *development* machine, add the target host as a remote `git remote add </opt/staging/siimee.git> staging master`
44
+* Login to the *remote* machine and setup a bare git repo on `git init --bare </opt/staging/siimee.git>`
45
+* Copy the `post-receive` hook file into the `</opt/staging/siimee.git/hooks/>` directory
46
+
34 47
 
35 48
 ## :satellite: Technology
36 49
 

deployment/post-receive.sh → deployment/post-receive ファイルの表示

@@ -49,7 +49,7 @@ run() {
49 49
     for step in ${!steps[@]}; do
50 50
         printf "\n"
51 51
         print_step "${steps[$step]}"
52
-        printf "${commands[$step]}"
52
+        eval "${commands[$step]}"
53 53
     done
54 54
 
55 55
     # Footer line 

読み込み中…
キャンセル
保存