Procházet zdrojové kódy

:gear: adjusting post-receive and testing remote push

tags/0.0.1
J před 4 roky
rodič
revize
7b9d11cd1a
3 změnil soubory, kde provedl 16 přidání a 3 odebrání
  1. 1
    1
      .drone.yml
  2. 14
    1
      README.md
  3. 1
    1
      deployment/post-receive

+ 1
- 1
.drone.yml Zobrazit soubor

118
   image: appleboy/drone-git-push:0.2.0-linux-amd64
118
   image: appleboy/drone-git-push:0.2.0-linux-amd64
119
   settings:
119
   settings:
120
     branch: master
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
     remote_name: staging
122
     remote_name: staging
123
     force: true
123
     force: true
124
     ssh_key:
124
     ssh_key:

+ 14
- 1
README.md Zobrazit soubor

1
 # :fist: SIIMEE
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
 Almost everything you need to develop.
5
 Almost everything you need to develop.
4
 
6
 
5
 ## :wrench: Tooling
7
 ## :wrench: Tooling
30
 8. User a web browser to check `http://localhost:3000` 
32
 8. User a web browser to check `http://localhost:3000` 
31
 
33
 
32
 ## :ship: CI/CD
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
 ## :satellite: Technology
48
 ## :satellite: Technology
36
 
49
 

deployment/post-receive.sh → deployment/post-receive Zobrazit soubor

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

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