i love automation

17
I Automation Takayuki Miyauchi

Upload: takayuki-miyauchi

Post on 16-Apr-2017

5.658 views

Category:

Engineering


0 download

TRANSCRIPT

I ❤ Automation

Takayuki Miyauchi

Travis CI

spacewapuu.com

.62C6 C D G D H 3 6

It is hosted on AWS S3 + Cloudfront.

)6D 12A C D 6 42 D 3 6A C D H

? H 2 6C 12A C

! 62D6 2 C ? 6 12A C CD

A52D6 D 5 A2 DH 3 2 6C

(6A H D !

. 6 424 6C ? 1 5 ?D (-

5 D C6 2 D 2D 42 H ? D 2 C G D CD ?6 4 4

#!/usr/bin/env bash

set -e

if [[ "false" != "$TRAVIS_PULL_REQUEST" ]]; then echo "Not deploying pull requests." exit fi

if [[ "master" != "$TRAVIS_BRANCH" ]]; then echo "Not on the 'master' branch." exit fi

bundle install --path vendor/bundle bundle exec s3_website push --site . > /dev/null 2>&1

WP-CLI

2 6 H 6 6 C65 GA 4

6 H C? 2 A

https://github.com/miya0001/wp-instant-setup

bin/wp core download --path=$WP_PATH --locale=en_US bin/wp core config --dbhost=localhost --... bin/wp core install ...

bin/wp rewrite structure "/archives/%post_id%" bin/wp option update blogname "$WP_TITLE" bin/wp option update blogdescription "$WP_DESC"

open http://127.0.0.1:$PORT bin/wp server --host=0.0.0.0 --port=$PORT --docroot=$WP_PATH

Infrastructure

describe command("wp --no-color plugin status jetpack" do let(:disable_sudo) { true } its(:exit_status) { should eq 0 } its(:stdout){ should match /Status: Active/ } end

Jetpack should be installed

describe command("wp option get permalink_structure") do let(:disable_sudo) { true } its(:exit_status) { should eq 0 } its(:stdout){ should eq "/archives/%post_id%\n" } end

permalink_structure should be /archives/%post_id%

Thanks!!