-
Notifications
You must be signed in to change notification settings - Fork 8
/
buddy.yml
68 lines (68 loc) · 2.48 KB
/
buddy.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
- pipeline: "Tests"
trigger_mode: "ON_EVERY_PUSH"
ref_name: "master"
ref_type: "BRANCH"
trigger_condition: "ALWAYS"
actions:
- action: "Build Docker image"
type: "DOCKERFILE"
dockerfile_path: "front/Dockerfile"
context_path: "front/"
trigger_condition: "ALWAYS"
- action: "Run Selenium tests"
type: "BUILD"
working_directory: "/buddy/java-selenium"
docker_image_name: "library/maven"
docker_image_tag: "3.6.0"
execute_commands:
- "mvn clean install"
setup_commands:
- "apt-get update && apt-get install -y wget"
- "wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -O /wait-for-it.sh"
- "chmod +x /wait-for-it.sh"
services:
- type: "SELENIUM_CHROME"
version: "3.141.59"
connection:
host: "selenium-ch"
port: 4444
- type: "CUSTOM"
connection:
host: "myapp.com"
use_image_from_action: true
docker_build_action_name: "Build Docker image"
wait_for_port: 80
cached_dirs:
- "/root/.m2/repository"
mount_filesystem_path: "/buddy/java-selenium"
shell: "BASH"
trigger_condition: "ALWAYS"
- action: "Push Docker image"
type: "DOCKER_PUSH"
login: "$DH_LOGIN"
password: "secure!g/lPf5PGEoXbve7jTd0nzA=="
docker_image_tag: "latest"
repository: "$DH_REPO"
trigger_condition: "ALWAYS"
- action: "Restart application"
type: "SSH_COMMAND"
login: "$USER"
password: "secure!HIM42WLiYG+bx1PFlPRjZw=="
host: "$HOST"
port: "$PORT"
authentication_mode: "PASS"
commands:
- "./restart_app.sh"
run_as_script: true
shell: "BASH"
trigger_condition: "ALWAYS"
- action: "Notify Team about errors"
type: "SLACK"
trigger_time: "ON_FAILURE"
content: "[#$BUDDY_EXECUTION_ID] $BUDDY_PIPELINE_NAME execution by <$BUDDY_INVOKER_URL|$BUDDY_INVOKER_NAME>"
channel: "CAEAJPFNF"
channel_name: "approve"
attachments:
- "{\"fallback\":\"$BUDDY_PIPELINE_NAME execution #$BUDDY_EXECUTION_ID\",\"color\":\"danger\",\"fields\":[{\"title\":\"Failed execution\",\"value\":\"<$BUDDY_EXECUTION_URL|Execution #$BUDDY_EXECUTION_ID $BUDDY_EXECUTION_COMMENT>\",\"short\":true},{\"title\":\"Pipeline\",\"value\":\"<$BUDDY_PIPELINE_URL|$BUDDY_PIPELINE_NAME>\",\"short\":true},{\"title\":\"Branch\",\"value\":\"$BUDDY_EXECUTION_BRANCH\",\"short\":true},{\"title\":\"Project\",\"value\":\"<$BUDDY_PROJECT_URL|$BUDDY_PROJECT_NAME>\",\"short\":true}]}"
trigger_condition: "ALWAYS"
integration_id: 4