Browse Source

构建流水线yaml,保存和更新 log

pull/347/head
xxq250 2 years ago
parent
commit
15513718f9
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      app/controllers/api/v1/projects/pipelines_controller.rb

+ 2
- 0
app/controllers/api/v1/projects/pipelines_controller.rb View File

@@ -34,6 +34,8 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController
tip_exception("流水线yaml内空不能为空") if pipeline_yaml.blank?
@pipeline.yaml = pipeline_yaml
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)
tip_exception(interactor.error) unless interactor.success?
render_ok


Loading…
Cancel
Save