mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
构建流水线yaml,保存和更新 log
This commit is contained in:
@@ -34,6 +34,8 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController
|
|||||||
tip_exception("流水线yaml内空不能为空") if pipeline_yaml.blank?
|
tip_exception("流水线yaml内空不能为空") if pipeline_yaml.blank?
|
||||||
@pipeline.yaml = pipeline_yaml
|
@pipeline.yaml = pipeline_yaml
|
||||||
sha = get_pipeline_file_sha(@pipeline.file_name, @pipeline.branch)
|
sha = get_pipeline_file_sha(@pipeline.file_name, @pipeline.branch)
|
||||||
|
Rails.logger.info "sha==========#{sha}"
|
||||||
|
Rails.logger.info "sha==========#{sha.present?}"
|
||||||
interactor = sha.present? ? Gitea::UpdateFileInteractor.call(current_user.gitea_token, @owner.login, content_params) : Gitea::CreateFileInteractor.call(current_user.gitea_token, @owner.login, content_params)
|
interactor = sha.present? ? Gitea::UpdateFileInteractor.call(current_user.gitea_token, @owner.login, content_params) : Gitea::CreateFileInteractor.call(current_user.gitea_token, @owner.login, content_params)
|
||||||
tip_exception(interactor.error) unless interactor.success?
|
tip_exception(interactor.error) unless interactor.success?
|
||||||
render_ok
|
render_ok
|
||||||
|
|||||||
Reference in New Issue
Block a user