commit

in lib/release_tools/auto_deploy/builder/omnibus.rb [77:110]


        def commit
          return if SharedStatus.dry_run?

          actions = version_map.map do |filename, contents|
            {
              action: 'update',
              file_path: "/#{filename}",
              content: "#{contents.strip}\n"
            }
          end

          commit = Retriable.with_context(:api) do
            GitlabClient.create_commit(
              PROJECT.auto_deploy_path,
              @target_name,
              'Update component versions',
              actions
            )
          end

          logger.info('Updated Omnibus versions', url: commit.web_url)

          commit
        rescue ::Gitlab::Error::ResponseError => ex
          logger.warn(
            'Failed to commit Omnibus version changes',
            target: @target_name,
            error_code: ex.response_status,
            error_message: ex.message
          )

          raise ex
        end