かなり進みましたが、あと一歩のところで詰まっています。
circle.yml
yml
1machine: 2 timezone: 3 Asia/Tokyo 4 php: 5 version: 5.6.29 6dependencies: 7 pre: 8 - git clone git@github.com:example/example.git 9 10deployment: 11 staging: 12 branch: master 13 commands: 14 - rsync --exclude=uploads --exclude=upgrade --exclude=.DS_Store* -v -rltO -e ssh "/Users/iseh/Local Sites/test/app/public/wp-content/" kusanagi@140.00.00.00:/home/kusanagi/index.html/DocumentRoot/wp-content/ 15 production: 16 branch: release 17 commands: 18 - rsync --exclude=uploads --exclude=upgrade --exclude=.DS_Store* -v -rltO -e ssh "/Users/iseh/Local Sites/test/app/public/wp-content/" kusanagi@150.00.00.00:/home/kusanagi/index.html/DocumentRoot/wp-content/ 19
dependenciesのpreで、ローカルにデータをクローンするという記述をすれば動くはずです。
どのようにして書けば良いでしょうか。
デプロイフロー
- Pull Requestをmasterブランチにマージ => プロダクション環境にリリースされる
- リモートリポジトリにプッシュ => ステージング環境にリリースされる
なお、使用するツール及び環境は以下の通り。
- WordPress
- Sakura VPS
- Github
- Circle CI
分からないこと
- GithubとCircle CIの連携及びcircle.ymlをルートディレクトリに追加し、適切に記述すれば、想定しているデプロイフローは完了するのか?
- circle.ymlには、machine:, checkout:, dependencies:, database:, test:, deployment:を書かなければならないが、本件の場合は何をどこまで書けば良いのか分からない。
差し当たって、書いたymlファイル
machine: timezone: Asia/Tokyo hosts: example.domain: 127.0.0.0 php: version: 5.6.9 deployment: branch: master commands: - make build - make deploy
ステージング及びプロダクション環境の振り分けはどのようにして設定すれば良いでしょうか。
他にも足りないことがあれば、どんどん指摘が欲しいです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。