Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI周りの強化、改善 #109

Closed
F88 opened this issue Jul 16, 2018 · 7 comments
Closed

CI周りの強化、改善 #109

F88 opened this issue Jul 16, 2018 · 7 comments

Comments

@F88
Copy link
Contributor

F88 commented Jul 16, 2018

開発プロセス、デプロイの改善、安定化を目的とし、CIによるテスト(、ワークフロー(準備だけ))、等の改善を行いたいと思います。現時点での要点は以下の通りです。
この辺りがひとまず片付いたら本件はcloseして、以後の対応は別件として扱いたいと思います。

  • bundle exec middleman deploy のデプロイ先が 'git@github.com:codeforjapan/mapprint.git に向いているのでまずは自分のところに向ける
  • CircleCI
    • spec run lint の実行
    • ワークフローの実装
      • 但し現状では止まらずにデプロイされた方が運用上良さそうなのでそうしておく
    • フォーク先などでもCircle CIを使いやすいようにする
    • (安定して動くようであれば)ローカルでのCircle CI実行

対応の都合上段階的にPR用意することになると思いますので宜しくお願い致します。

@kkanazaw
Copy link
Contributor

フォーク先などでもCircle CIを使いやすいようにする

こちらは設定を変更したほうがよいでしょうか?

Image from Gyazo

szf5 added a commit to szf5/mapprint that referenced this issue Jul 17, 2018
- middleman deploy 時の deploy.remote を 'origin' に変更
- READMEにテスト用コマンド追記
@szf5
Copy link
Contributor

szf5 commented Jul 17, 2018

@kkanazaw あ、いえ、そこはそのままで良いかと思います。フォーク先でやりたい人はCIすれば良いという方が良いと思いますので。

@szf5
Copy link
Contributor

szf5 commented Jul 17, 2018

対応中ですが上手く行かない点が1点ありまして、どなたかスマートな解決法をご存知の方がいらっしゃれば御教示頂きたいと思うことがあります。

#110 で ひとまずdeploy.remoteorigin に変更してまずはOKだとおもうのですが、個人的には アカウントを使い分けていることもあり、

deploy.remote = 'origin'

のところを

deploy.remote = `https://s6f@github.com/s6f/mapprint.git`

のように設定したいのですが、 Bundler等を通して渡した環境変数を使おうとしてもどうも上手く動作せず、Middlemanのドキュメントを読んでみたり色々とググってみたりもしたのですが思ったように動作しません。
上手いこと環境変数で指定出来ればと思うのですが :|

@kkanazaw
Copy link
Contributor

あ、いえ、そこはそのままで良いかと思います。フォーク先でやりたい人はCIすれば良いという方が良いと思いますので。

@s6f 承知しましたー。

halsk added a commit that referenced this issue Jul 17, 2018
@kkanazaw
Copy link
Contributor

kkanazaw commented Jul 17, 2018

@s6f 手元で試したところ、環境変数での指定とFork先でのpushはできるようでした。
参考になれば幸いです。
(前提としてssh方式でgit cloneしてます)

 activate :deploy do |deploy|
+  p ENV['REPO']
(中略)
-  deploy.remote = 'git@github.com:codeforjapan/mapprint.git'
+  deploy.remote = ENV['REPO']
$ REPO=git@github.com:kkanazaw/mapprint.git bundle exec middleman deploy

参考 https://github.com/johnnyshields/middleman-deploy#multiple-environments

@szf5
Copy link
Contributor

szf5 commented Jul 17, 2018

@kkanazaw 検証ありがとうございます。散々試して見たのですが何故か deploy.remotedeploy.branchの値が入ってしまったりと謎挙動でどはまりしていました。ちゃんと機能するはずという報告ありがたいです 🙇

szf5 added a commit to szf5/mapprint that referenced this issue Jul 17, 2018
- README、デプロイの記載を改訂しました
- middleman deploy deploy.remote, deploy.branch を環境変数で指定出来るようにしました
halsk added a commit that referenced this issue Jul 17, 2018
@halsk
Copy link
Member

halsk commented Jun 8, 2019

@F88 このIssueはクローズして大丈夫でしょうか?

@halsk halsk closed this as completed Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants