Last active
March 28, 2018 14:25
-
-
Save nicooprat/b274970908fd2e5b676e2c1e8a12da61 to your computer and use it in GitHub Desktop.
Configuration Buddy.works (https://medium.com/@nicooprat/d%C3%A9ploiement-continu-facile-avec-buddy-works-90af7d85ef75)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- pipeline: "Push staging" | |
trigger_mode: "ON_EVERY_PUSH" | |
ref_name: "dev" | |
ref_type: "BRANCH" | |
target_site_url: "" | |
actions: | |
- action: "Composer" | |
type: "BUILD" | |
working_directory: "" | |
docker_image_name: "library/php" | |
docker_image_tag: "7.1.3" | |
execute_commands: | |
- "cd wp-content/themes/sage" | |
- "composer install" | |
setup_commands: | |
- "apt-get update && apt-get install -y git zip" | |
- "curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer" | |
mount_filesystem_path: "" | |
trigger_condition_paths: | |
- "/wp-content/themes/sage/composer.lock" | |
shell: "BASH" | |
trigger_condition: "ON_CHANGE_AT_PATH" | |
- action: "Webpack" | |
type: "BUILD" | |
working_directory: "" | |
docker_image_name: "library/node" | |
docker_image_tag: "6.9.5" | |
execute_commands: | |
- "cd wp-content/themes/sage" | |
- "yarn install" | |
- "yarn run build:production" | |
setup_commands: | |
- "npm install -g yarn" | |
mount_filesystem_path: "" | |
trigger_condition_paths: | |
- "/wp-content/themes/sage/resources/assets/" | |
shell: "BASH" | |
trigger_condition: "ON_CHANGE_AT_PATH" | |
- action: "Push" | |
type: "RSYNC" | |
local_path: "/" | |
remote_path: "/" | |
login: "login" | |
password: "password" | |
host: "host" | |
port: "22" | |
authentication_mode: "PASS" | |
archive: true | |
delete_extra_files: true | |
compress: true | |
deployment_excludes: | |
- "/.git/" | |
- ".htaccess" | |
- ".ftpquota" | |
- "wp-content/w3tc-config" | |
- ".npmrc" | |
- "bower_components" | |
- "node_modules" | |
- "npm-debug.log" | |
- "yarn-error.log" | |
- ".cache-loader" | |
- ".github" | |
- "error_log" | |
- "*.map" | |
- "*.hot-update.js*" | |
- "*~" | |
- ".DS_Store" | |
- ".svn" | |
- ".cvs" | |
- "*.bak" | |
- "*.swp" | |
- "Thumbs.db" | |
- "wp-config.php" | |
- "wp-content/uploads/" | |
- "wp-content/blogs.dir/" | |
- "wp-content/upgrade/" | |
- "wp-content/backup-db/" | |
- "wp-content/advanced-cache.php" | |
- "wp-content/wp-cache-config.php" | |
- "wp-content/db.php" | |
- "wp-content/object-cache.php" | |
- "wp-content/cache/*" | |
- "wp-content/cache/supercache/*" | |
- "*.log" | |
- "wp-content/cache/" | |
- "wp-content/backups/" | |
- "sitemap.xml" | |
- "sitemap.xml.gz" | |
- ".vscode" | |
- ".idea" | |
trigger_condition: "ON_CHANGE" | |
- action: "Notif success" | |
type: "SLACK" | |
content: "✅ *<${execution.html_url}|${execution.pipeline.name} (${execution.branch.name}) #${execution.id}>*\r\n\r\n#foreach( $commit in $execution.changelog.commits)\r\n`${commit.revision.substring(0,8)}` ${commit.message}\r\n#end" | |
channel: "channel" | |
channel_name: "buddyworks" | |
trigger_condition: "ON_CHANGE" | |
integration_id: 27835 | |
- action: "Notif fail" | |
type: "SLACK" | |
trigger_time: "ON_FAILURE" | |
content: "⚠️ *<${execution.html_url}|${execution.pipeline.name} (${execution.branch.name}) #${execution.id}>*\r\n\r\n#foreach( $action in $execution.action_executions)\r\n #if( $action.status == \"FAILED\" )\r\n #foreach( $line in $action.log)\r\n ${line}\r\n #end\r\n #end\r\n#end" | |
channel: "channel" | |
channel_name: "buddyworks" | |
attachments: | |
- "{\"fallback\":\"${execution.pipeline.name} execution #${execution.id}\",\"color\":\"good\",\"fields\":[{\"title\":\"Successful execution\",\"value\":\"<${execution.html_url}|Execution #${execution.id} ${execution.comment}>\",\"short\":true},{\"title\":\"Last commit\",\"value\":\"<${execution.to_revision.html_url}|${execution.to_revision.message}>\",\"short\":true},{\"title\":\"Branch\",\"value\":\"${execution.branch.name}\",\"short\":true},{\"title\":\"Project\",\"value\":\"<${project.html_url}|${project.name}>\",\"short\":true}]}" | |
trigger_condition: "ALWAYS" | |
integration_id: 27835 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment