构建流水线yaml,保存和更新 log
This commit is contained in:
parent
2b7414c2fc
commit
15513718f9
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue