forked from municipio-se/municipio-deployment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflightplan.js
41 lines (36 loc) · 886 Bytes
/
flightplan.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const plan = require("flightplan");
const { configure } = require("@whitespace/flightplan/municipio2");
const phpVersion = "php8.1";
let config = {
keepReleases: 5,
dumpFolder: "~/dumps",
themes: [],
shared: {
},
filesAndFolders: [
// Additional files to transfer
],
ignoredFilesAndFolders: [
// Files to NOT transfer
],
composerInstallArgs: "--ignore-platform-reqs --no-dev --no-interaction",
};
plan.target(
"jenkins",
{
host: process.env.FLIGHTPLAN_HOST,
username: process.env.FLIGHTPLAN_USER,
agent: process.env.SSH_AUTH_SOCK,
},
{
dir: process.env.FLIGHTPLAN_DIR,
user: "web",
domain: process.env.FLIGHTPLAN_DOMAIN,
root: "/srv/www",
targets: [process.env.FLIGHTPLAN_TARGET_DIR],
}
);
configure(plan, config);
plan.remote(`deploy`, (remote) => {
remote.exec(`sudo service ${phpVersion}-fpm reload`);
});