08/09 drone ci without public domain first build job
drone ci 如果沒有 public domain, 是沒辦法進入 repo build 畫面
(ps: 沒有 public domain, 但 git repo 還是能正常拉到最新資料)
因此也沒辦法,在沒有 domain 的情況下直接使用 restart
鈕重新 build job
目前,也沒找到任何方法觸發 create job, build job 等; drone cli 也需要指定 job id
(drone version 1.2.2)
因此用 tricks 的方式建立第一個 job
之後都可以用 drone UI, drone cli 手動觸發
在 dron repo sync 完成後
打開 drone 的 database.sqlite
插入以下 sql,替換其中 build_repo_id
為正確對應的 id
INSERT INTO "builds" ("build_id", "build_repo_id", "build_trigger", "build_number", "build_parent", "build_status", "build_error", "build_event", "build_action", "build_link", "build_timestamp", "build_title", "build_message", "build_before", "build_after", "build_ref", "build_source_repo", "build_source", "build_target", "build_author", "build_author_name", "build_author_email", "build_author_avatar", "build_sender", "build_deploy", "build_params", "build_started", "build_finished", "build_created", "build_updated", "build_version", "build_cron", "build_deploy_id") VALUES
('58', '35', '@hook', '58', '0', 'success', '', 'push', '', 'https://github.com/cscolabear/resume/compare/2e584fc0b236...64a785fbacea', '0', '', 'Chore: remove mobile', '2e584fc0b236a6c91254d1732a78a847ebd7b176', '64a785fbacea34d3d5bef6c130900717f8007472', 'refs/heads/master', '', 'master', 'master', 'cscolabear', 'Cola', '[email protected]', 'https://avatars0.githubusercontent.com/u/4863629?v=4', 'cscolabear', '', 'null', '1596956750', '1596956798', '1596956741', '1596956750', '3', '', '0');
插入後,就可以在 drone UI 中看對應的 build job
你也可以做後續動作了…
… drone 作者好像有些堅持不加入直接手動觸發