You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,12 @@ Add resolver to `project/plugins.sbt`:
40
40
resolvers +="JAnalyse Repository" at "http://www.janalyse.fr/repository/"
41
41
```
42
42
43
+
Add import to your project build file
44
+
45
+
```sbt
46
+
importdeployssh.DeploySSH._
47
+
```
48
+
43
49
Enable plugin in your project.
44
50
For example in your `build.sbt`
45
51
@@ -57,14 +63,19 @@ You can use `.conf` files or set configs directly in project settings.
57
63
58
64
Allowed config fields:
59
65
60
-
*`name` - your server name. **Should be unique** in all loaded configs. (Duplication will be overriden)
66
+
*`name` - your server name. **Should be unique** in all loaded configs. (Duplication will be overridden)
61
67
*`host` - ip adress or hostname of the server
62
68
*`user` - ssh username. If missing or empty will be used your current user (`user.name`)
63
69
*`password`- ssh password. If missing or empty will be used ssh key
64
70
*`passphrase`- passphrase for ssh key. Remove or leave empty for ssh key without passphrase
65
71
*`port` - ssh port. If missing or empty will be used `22`
66
-
*`sshDir` - directory with you ssh keys. This directory should contain `id_rsa` or `id_dsa`. By default `user.name/.ssh` directory. This field is not allowed to be empty in `.conf` file. You should remove this field from config in `.conf` file to use default value.
67
-
*`sshKeyFile` - private key that will be used for ssh connection. By default will be used `id_rsa` or `id_dsa`. This field is not allowed to be empty in `.conf` file. You should remove this field from config in `.conf` file to use default value.
72
+
*`sshDir` - directory with you ssh keys.
73
+
This directory should contain `identity`, `id_dsa`, `id_ecdsa`, `id_ed25519` or `id_rsa` (the first matched file in the folder will be used for auth).
74
+
By default `user.name/.ssh` directory. This field is not allowed to be empty in `.conf` file.
75
+
You should remove this field from config in `.conf` file to use default value.
76
+
*`sshKeyFile` - add additional private key file name that will be used for ssh connection.
77
+
This file name will be added to head of the default list [`identity`, `id_dsa`, `id_ecdsa`, `id_ed25519`, `id_rsa`].
78
+
This field is not allowed to be empty in `.conf` file. You should remove this field from config in `.conf` file to use default value.
68
79
69
80
**`name` and `host` fields are mandatory**
70
81
@@ -95,7 +106,7 @@ servers = [
95
106
host ="169.254.0.2"
96
107
user ="ssh_test"
97
108
sshDir ="/tmp/.sshKeys"
98
-
sshKeyFile ="id_a12
109
+
sshKeyFile ="id_a12"#custom private key file name
99
110
}
100
111
]
101
112
```
@@ -124,7 +135,7 @@ lazy val myProject = project.enablePlugins(DeploySSH).settings(
124
135
)
125
136
)
126
137
127
-
val mySettings = Seq(
138
+
lazyvalmySettings=Seq(
128
139
ServerConfig("server_5", "169.254.0.2")
129
140
)
130
141
```
@@ -159,9 +170,11 @@ or
159
170
160
171
Use `deploySshExecBefore` and `deploySshExecAfter` to execute any bash commands before and after deploy.
161
172
162
-
Any exeption in `deploySshExecBefore` and `deploySshExecAfter` will abort deploy for all servers.
173
+
Any exception in `deploySshExecBefore` and `deploySshExecAfter` will abort deploy for all servers.
174
+
175
+
To skip deploy only for current server you should wrap exception to `SkipDeployException`.
163
176
164
-
To skip deploy only for curent server you should wrap exeption to `SkipDeployException`.
177
+
For example stop and update and run your app, copy with scp needed application.conf depends on server name:
0 commit comments