build.rb 18.8 KB
Newer Older
D
Douwe Maan 已提交
1
module Ci
K
Kamil Trzcinski 已提交
2
  class Build < CommitStatus
Z
Zeger-Jan van de Weg 已提交
3
    prepend ArtifactMigratable
4
    include TokenAuthenticatable
5
    include AfterCommitQueue
6
    include ObjectStorage::BackgroundMove
R
Rémy Coutable 已提交
7
    include Presentable
S
Shinya Maeda 已提交
8
    include Importable
9

10 11
    MissingDependenciesError = Class.new(StandardError)

12
    belongs_to :project, inverse_of: :builds
13 14
    belongs_to :runner
    belongs_to :trigger_request
15
    belongs_to :erased_by, class_name: 'User'
D
Douwe Maan 已提交
16

17
    has_many :deployments, as: :deployable
18

19
    has_one :last_deployment, -> { order('deployments.id DESC') }, as: :deployable, class_name: 'Deployment'
20
    has_many :trace_sections, class_name: 'Ci::BuildTraceSection'
21

Z
Zeger-Jan van de Weg 已提交
22
    has_many :job_artifacts, class_name: 'Ci::JobArtifact', foreign_key: :job_id, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
23 24
    has_one :job_artifacts_archive, -> { where(file_type: Ci::JobArtifact.file_types[:archive]) }, class_name: 'Ci::JobArtifact', inverse_of: :job, foreign_key: :job_id
    has_one :job_artifacts_metadata, -> { where(file_type: Ci::JobArtifact.file_types[:metadata]) }, class_name: 'Ci::JobArtifact', inverse_of: :job, foreign_key: :job_id
25
    has_one :job_artifacts_trace, -> { where(file_type: Ci::JobArtifact.file_types[:trace]) }, class_name: 'Ci::JobArtifact', inverse_of: :job, foreign_key: :job_id
26

27
    has_one :metadata, class_name: 'Ci::BuildMetadata'
28

29 30 31 32
    # The "environment" field for builds is a String, and is the unexpanded name
    def persisted_environment
      @persisted_environment ||= Environment.find_by(
        name: expanded_environment_name,
K
Kamil Trzciński 已提交
33
        project: project
34 35 36
      )
    end

37 38
    serialize :options # rubocop:disable Cop/ActiveRecordSerialize
    serialize :yaml_variables, Gitlab::Serializer::Ci::Variables # rubocop:disable Cop/ActiveRecordSerialize
D
Douwe Maan 已提交
39

D
Douwe Maan 已提交
40 41
    delegate :name, to: :project, prefix: true

D
Douwe Maan 已提交
42
    validates :coverage, numericality: true, allow_blank: true
D
Douwe Maan 已提交
43
    validates :ref, presence: true
D
Douwe Maan 已提交
44 45

    scope :unstarted, ->() { where(runner_id: nil) }
K
Kamil Trzcinski 已提交
46
    scope :ignore_failures, ->() { where(allow_failure: false) }
47
    scope :with_artifacts_archive, ->() do
K
Kamil Trzcinski 已提交
48
      where('(artifacts_file IS NOT NULL AND artifacts_file <> ?) OR EXISTS (?)',
49
        '', Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id').archive)
50
    end
51
    scope :with_artifacts_stored_locally, -> { with_artifacts_archive.where(artifacts_file_store: [nil, LegacyArtifactUploader::Store::LOCAL]) }
52 53
    scope :with_artifacts_not_expired, ->() { with_artifacts_archive.where('artifacts_expire_at IS NULL OR artifacts_expire_at > ?', Time.now) }
    scope :with_expired_artifacts, ->() { with_artifacts_archive.where('artifacts_expire_at < ?', Time.now) }
54
    scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) }
55
    scope :manual_actions, ->() { where(when: :manual, status: COMPLETED_STATUSES + [:manual]) }
56
    scope :ref_protected, -> { where(protected: true) }
D
Douwe Maan 已提交
57

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
    scope :matches_tag_ids, -> (tag_ids) do
      matcher = ::ActsAsTaggableOn::Tagging
        .where(taggable_type: CommitStatus)
        .where(context: 'tags')
        .where('taggable_id = ci_builds.id')
        .where.not(tag_id: tag_ids).select('1')

      where("NOT EXISTS (?)", matcher)
    end

    scope :with_any_tags, -> do
      matcher = ::ActsAsTaggableOn::Tagging
        .where(taggable_type: CommitStatus)
        .where(context: 'tags')
        .where('taggable_id = ci_builds.id').select('1')

      where("EXISTS (?)", matcher)
    end

77 78
    mount_uploader :legacy_artifacts_file, LegacyArtifactUploader, mount_on: :artifacts_file
    mount_uploader :legacy_artifacts_metadata, LegacyArtifactUploader, mount_on: :artifacts_metadata
K
Kamil Trzcinski 已提交
79

D
Douwe Maan 已提交
80 81
    acts_as_taggable

82 83
    add_authentication_token_field :token

L
Lin Jen-Shin 已提交
84
    before_save :update_artifacts_size, if: :artifacts_file_changed?
85
    before_save :ensure_token
86
    before_destroy { unscoped_project }
G
Grzegorz Bizon 已提交
87

88
    after_create unless: :importing? do |build|
89
      run_after_commit { BuildHooksWorker.perform_async(build.id) }
90 91
    end

92 93
    after_commit :update_project_statistics_after_save, on: [:create, :update]
    after_commit :update_project_statistics, on: :destroy
D
Douwe Maan 已提交
94 95

    class << self
96 97 98 99 100 101
      # This is needed for url_for to work,
      # as the controller is JobsController
      def model_name
        ActiveModel::Name.new(self, nil, 'job')
      end

D
Douwe Maan 已提交
102 103 104 105
      def first_pending
        pending.unstarted.order('created_at ASC').first
      end

106
      def retry(build, current_user)
107 108 109
        Ci::RetryBuildService
          .new(build.project, current_user)
          .execute(build)
D
Douwe Maan 已提交
110 111 112
      end
    end

113
    state_machine :status do
114 115
      event :actionize do
        transition created: :manual
K
Kamil Trzcinski 已提交
116 117
      end

118 119
      after_transition any => [:pending] do |build|
        build.run_after_commit do
K
linting  
Kim "BKC" Carlbäcker 已提交
120
          BuildQueueWorker.perform_async(id)
121 122 123
        end
      end

124
      after_transition pending: :running do |build|
125 126 127
        build.run_after_commit do
          BuildHooksWorker.perform_async(id)
        end
128 129
      end

130
      after_transition any => [:success, :failed, :canceled] do |build|
131
        build.run_after_commit do
132
          BuildFinishedWorker.perform_async(id)
133
        end
D
Douwe Maan 已提交
134
      end
135

136
      after_transition any => [:success] do |build|
137 138
        build.run_after_commit do
          BuildSuccessWorker.perform_async(id)
139 140
        end
      end
141

142
      before_transition any => [:failed] do |build|
143
        next unless build.project
144
        next if build.retries_max.zero?
145

146
        if build.retries_count < build.retries_max
147 148 149 150 151
          begin
            Ci::Build.retry(build, build.user)
          rescue Gitlab::Access::AccessDeniedError => ex
            Rails.logger.error "Unable to auto-retry job #{build.id}: #{ex}"
          end
152 153
        end
      end
154 155

      before_transition any => [:running] do |build|
156
        build.validates_dependencies! unless Feature.enabled?('ci_disable_validates_dependencies')
157
      end
T
Tomasz Maczukin 已提交
158 159

      before_transition pending: :running do |build|
160
        build.ensure_metadata.save_timeout_state!
T
Tomasz Maczukin 已提交
161
      end
D
Douwe Maan 已提交
162 163
    end

164
    def ensure_metadata
T
Tomasz Maczukin 已提交
165
      metadata || build_metadata(project: project)
166 167
    end

168
    def detailed_status(current_user)
169 170 171
      Gitlab::Ci::Status::Build::Factory
        .new(self, current_user)
        .fabricate!
K
Kamil Trzcinski 已提交
172 173
    end

174
    def other_actions
175
      pipeline.manual_actions.where.not(name: name)
176 177
    end

178
    def playable?
179
      action? && (manual? || complete?)
K
Kamil Trzcinski 已提交
180 181
    end

182
    def action?
183 184 185
      self.when == 'manual'
    end

186
    def play(current_user)
187 188 189
      Ci::PlayBuildService
        .new(project, current_user)
        .execute(self)
190 191
    end

K
Kamil Trzcinski 已提交
192 193 194 195
    def cancelable?
      active?
    end

K
Kamil Trzcinski 已提交
196
    def retryable?
197
      success? || failed? || canceled?
K
Kamil Trzcinski 已提交
198 199
    end

200 201 202 203 204 205 206
    def retries_count
      pipeline.builds.retried.where(name: self.name).count
    end

    def retries_max
      self.options.fetch(:retry, 0).to_i
    end
K
Kamil Trzcinski 已提交
207

208 209
    def latest?
      !retried?
K
Kamil Trzcinski 已提交
210 211
    end

212
    def expanded_environment_name
213
      ExpandVariables.expand(environment, simple_variables) if environment
214 215
    end

216
    def has_environment?
217
      environment.present?
218 219
    end

220
    def starts_environment?
221
      has_environment? && self.environment_action == 'start'
222 223 224
    end

    def stops_environment?
225
      has_environment? && self.environment_action == 'stop'
226 227 228
    end

    def environment_action
229
      self.options.fetch(:environment, {}).fetch(:action, 'start') if self.options
230 231 232 233
    end

    def outdated_deployment?
      success? && !last_deployment.try(:last?)
234
    end
235

236 237
    def depends_on_builds
      # Get builds of the same type
238
      latest_builds = self.pipeline.builds.latest
239 240 241 242 243

      # Return builds from previous stages
      latest_builds.where('stage_idx < ?', stage_idx)
    end

D
Douwe Maan 已提交
244
    def timeout
245
      ensure_metadata.timeout
246 247
    end

248
    def triggered_by?(current_user)
S
Shinya Maeda 已提交
249 250 251
      user == current_user
    end

N
Nick Thomas 已提交
252 253 254 255 256 257
    # A slugified version of the build ref, suitable for inclusion in URLs and
    # domain names. Rules:
    #
    #   * Lowercased
    #   * Anything not matching [a-z0-9-] is replaced with a -
    #   * Maximum length is 63 bytes
S
Shinya Maeda 已提交
258
    #   * First/Last Character is not a hyphen
N
Nick Thomas 已提交
259
    def ref_slug
V
vanadium23 已提交
260
      Gitlab::Utils.slugify(ref.to_s)
N
Nick Thomas 已提交
261 262
    end

263
    # Variables whose value does not depend on environment
264
    def simple_variables
L
Lin Jen-Shin 已提交
265 266 267 268 269 270
      variables(environment: nil)
    end

    # All variables, including those dependent on environment, which could
    # contain unexpanded variables.
    def variables(environment: persisted_environment)
271 272 273 274 275
      collection = Gitlab::Ci::Variables::Collection.new.tap do |variables|
        variables.concat(predefined_variables)
        variables.concat(project.predefined_variables)
        variables.concat(pipeline.predefined_variables)
        variables.concat(runner.predefined_variables) if runner
276
        variables.concat(project.deployment_variables(environment: environment)) if has_environment?
277 278
        variables.concat(yaml_variables)
        variables.concat(user_variables)
279
        variables.concat(project.group.secret_variables_for(ref, project)) if project.group
280 281 282 283 284 285 286 287
        variables.concat(secret_variables(environment: environment))
        variables.concat(trigger_request.user_variables) if trigger_request
        variables.concat(pipeline.variables)
        variables.concat(pipeline.pipeline_schedule.job_variables) if pipeline.pipeline_schedule
        variables.concat(persisted_environment_variables) if environment
      end

      collection.to_runner_variables
288 289
    end

290 291 292 293
    def features
      { trace_sections: true }
    end

294
    def merge_request
Z
Z.J. van de Weg 已提交
295
      return @merge_request if defined?(@merge_request)
Z
Z.J. van de Weg 已提交
296

297 298
      @merge_request ||=
        begin
299
          merge_requests = MergeRequest.includes(:latest_merge_request_diff)
300 301
            .where(source_branch: ref,
                   source_project: pipeline.project)
Z
Z.J. van de Weg 已提交
302
            .reorder(iid: :desc)
303 304

          merge_requests.find do |merge_request|
305
            merge_request.commit_shas.include?(pipeline.sha)
306 307
          end
        end
308 309
    end

D
Douwe Maan 已提交
310
    def repo_url
K
Kamil Trzcinski 已提交
311
      auth = "gitlab-ci-token:#{ensure_token!}@"
312
      project.http_url_to_repo.sub(%r{^https?://}) do |prefix|
K
Kamil Trzcinski 已提交
313 314
        prefix + auth
      end
D
Douwe Maan 已提交
315 316 317
    end

    def allow_git_fetch
K
Kamil Trzcinski 已提交
318
      project.build_allow_git_fetch
D
Douwe Maan 已提交
319 320 321
    end

    def update_coverage
322
      coverage = trace.extract_coverage(coverage_regex)
323
      update_attributes(coverage: coverage) if coverage.present?
D
Douwe Maan 已提交
324 325
    end

326
    def parse_trace_sections!
327
      ExtractSectionsFromBuildTraceService.new(project, user).execute(self)
328 329
    end

330 331
    def trace
      Gitlab::Ci::Trace.new(self)
332 333
    end

334
    def has_trace?
335
      trace.exist?
T
Tomasz Maczukin 已提交
336 337
    end

338 339
    def trace=(data)
      raise NotImplementedError
T
Tomasz Maczukin 已提交
340 341
    end

342 343
    def old_trace
      read_attribute(:trace)
344 345
    end

346
    def erase_old_trace!
347
      update_column(:trace, nil)
D
Douwe Maan 已提交
348 349
    end

350 351 352 353
    def needs_touch?
      Time.now - updated_at > 15.minutes.to_i
    end

L
Lin Jen-Shin 已提交
354
    def valid_token?(token)
355
      self.token && ActiveSupport::SecurityUtils.variable_size_secure_compare(token, self.token)
K
Kamil Trzcinski 已提交
356 357
    end

358 359 360 361
    def has_tags?
      tag_list.any?
    end

362
    def any_runners_online?
363
      project.any_runners? { |runner| runner.active? && runner.online? && runner.can_pick?(self) }
364 365
    end

K
Kamil Trzcinski 已提交
366
    def stuck?
367 368 369
      pending? && !any_runners_online?
    end

370
    def execute_hooks
371
      return unless project
372

373
      build_data = Gitlab::DataBuilder::Build.build(self)
374 375
      project.execute_hooks(build_data.dup, :job_hooks)
      project.execute_services(build_data.dup, :job_hooks)
376
      PagesService.new(build_data).execute
J
Josh Frye 已提交
377
      project.running_or_pending_build_count(force: true)
378 379
    end

380 381 382 383
    def browsable_artifacts?
      artifacts_metadata?
    end

384
    def artifacts_metadata_entry(path, **options)
385 386 387 388 389
      artifacts_metadata.use_file do |metadata_path|
        metadata = Gitlab::Ci::Build::Artifacts::Metadata.new(
          metadata_path,
          path,
          **options)
390

391 392
        metadata.to_entry
      end
393 394
    end

395 396 397
    def erase_artifacts!
      remove_artifacts_file!
      remove_artifacts_metadata!
398
      save
399 400
    end

401 402 403
    def erase(opts = {})
      return false unless erasable?

404
      erase_artifacts!
405 406 407 408 409 410 411 412 413 414 415 416
      erase_trace!
      update_erased!(opts[:erased_by])
    end

    def erasable?
      complete? && (artifacts? || has_trace?)
    end

    def erased?
      !self.erased_at.nil?
    end

417
    def artifacts_expired?
418
      artifacts_expire_at && artifacts_expire_at < Time.now
419 420
    end

421 422 423 424 425
    def artifacts_expire_in
      artifacts_expire_at - Time.now if artifacts_expire_at
    end

    def artifacts_expire_in=(value)
K
Kamil Trzcinski 已提交
426 427
      self.artifacts_expire_at =
        if value
428
          ChronicDuration.parse(value)&.seconds&.from_now
K
Kamil Trzcinski 已提交
429
        end
430 431
    end

432
    def has_expiring_artifacts?
Z
Z.J. van de Weg 已提交
433
      artifacts_expire_at.present? && artifacts_expire_at > Time.now
434 435
    end

436
    def keep_artifacts!
437
      self.update(artifacts_expire_at: nil)
438
      self.job_artifacts.update_all(expire_at: nil)
439 440
    end

441
    def coverage_regex
442
      super || project.try(:build_coverage_regex)
443 444
    end

445 446
    def when
      read_attribute(:when) || build_attributes_from_config[:when] || 'on_success'
447 448
    end

449 450
    def yaml_variables
      read_attribute(:yaml_variables) || build_attributes_from_config[:yaml_variables] || []
451 452
    end

453
    def user_variables
454 455
      Gitlab::Ci::Variables::Collection.new.tap do |variables|
        return variables if user.blank?
456

457 458 459 460 461
        variables.append(key: 'GITLAB_USER_ID', value: user.id.to_s)
        variables.append(key: 'GITLAB_USER_EMAIL', value: user.email)
        variables.append(key: 'GITLAB_USER_LOGIN', value: user.username)
        variables.append(key: 'GITLAB_USER_NAME', value: user.name)
      end
462 463
    end

L
Lin Jen-Shin 已提交
464 465 466 467 468
    def secret_variables(environment: persisted_environment)
      project.secret_variables_for(ref: ref, environment: environment)
        .map(&:to_runner_variable)
    end

469
    def steps
T
Tomasz Maczukin 已提交
470 471
      [Gitlab::Ci::Build::Step.from_commands(self),
       Gitlab::Ci::Build::Step.from_after_script(self)].compact
472 473 474
    end

    def image
475
      Gitlab::Ci::Build::Image.from_image(self)
476 477 478
    end

    def services
479
      Gitlab::Ci::Build::Image.from_services(self)
480 481 482
    end

    def artifacts
483
      [options[:artifacts]]
484 485 486
    end

    def cache
M
Matija Čupić 已提交
487 488 489 490
      cache = options[:cache]

      if cache && project.jobs_cache_index
        cache = cache.merge(
491
          key: "#{cache[:key]}-#{project.jobs_cache_index}")
492
      end
M
Matija Čupić 已提交
493 494

      [cache]
495 496
    end

497
    def credentials
498
      Gitlab::Ci::Build::Credentials::Factory.new(self).create!
499 500
    end

T
Tomasz Maczukin 已提交
501
    def dependencies
502 503
      return [] if empty_dependencies?

T
Tomasz Maczukin 已提交
504 505
      depended_jobs = depends_on_builds

506
      return depended_jobs unless options[:dependencies].present?
T
Tomasz Maczukin 已提交
507

508 509
      depended_jobs.select do |job|
        options[:dependencies].include?(job.name)
T
Tomasz Maczukin 已提交
510 511 512
      end
    end

513 514 515 516
    def empty_dependencies?
      options[:dependencies]&.empty?
    end

517
    def validates_dependencies!
518 519
      dependencies.each do |dependency|
        raise MissingDependenciesError unless dependency.valid_dependency?
520
      end
521 522
    end

S
Shinya Maeda 已提交
523 524 525 526 527 528 529
    def valid_dependency?
      return false if artifacts_expired?
      return false if erased?

      true
    end

530 531 532 533
    def hide_secrets(trace)
      return unless trace

      trace = trace.dup
534 535
      Gitlab::Ci::MaskSecret.mask!(trace, project.runners_token) if project
      Gitlab::Ci::MaskSecret.mask!(trace, token)
536 537 538
      trace
    end

539
    def serializable_hash(options = {})
J
James Lopez 已提交
540
      super(options).merge(when: read_attribute(:when))
541 542
    end

543 544
    private

L
Lin Jen-Shin 已提交
545
    def update_artifacts_size
K
Kamil Trzcinski 已提交
546
      self.artifacts_size = legacy_artifacts_file&.size
L
Lin Jen-Shin 已提交
547 548
    end

549
    def erase_trace!
550
      trace.erase!
551 552 553
    end

    def update_erased!(user = nil)
554
      self.update(erased_by: user, erased_at: Time.now, artifacts_expire_at: nil)
555 556
    end

557
    def unscoped_project
K
Kamil Trzciński 已提交
558
      @unscoped_project ||= Project.unscoped.find_by(id: project_id)
559 560
    end

561 562
    CI_REGISTRY_USER = 'gitlab-ci-token'.freeze

563
    def predefined_variables
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585
      Gitlab::Ci::Variables::Collection.new.tap do |variables|
        variables.append(key: 'CI', value: 'true')
        variables.append(key: 'GITLAB_CI', value: 'true')
        variables.append(key: 'GITLAB_FEATURES', value: project.namespace.features.join(','))
        variables.append(key: 'CI_SERVER_NAME', value: 'GitLab')
        variables.append(key: 'CI_SERVER_VERSION', value: Gitlab::VERSION)
        variables.append(key: 'CI_SERVER_REVISION', value: Gitlab::REVISION)
        variables.append(key: 'CI_JOB_ID', value: id.to_s)
        variables.append(key: 'CI_JOB_NAME', value: name)
        variables.append(key: 'CI_JOB_STAGE', value: stage)
        variables.append(key: 'CI_JOB_TOKEN', value: token, public: false)
        variables.append(key: 'CI_COMMIT_SHA', value: sha)
        variables.append(key: 'CI_COMMIT_REF_NAME', value: ref)
        variables.append(key: 'CI_COMMIT_REF_SLUG', value: ref_slug)
        variables.append(key: 'CI_REGISTRY_USER', value: CI_REGISTRY_USER)
        variables.append(key: 'CI_REGISTRY_PASSWORD', value: token, public: false)
        variables.append(key: 'CI_REPOSITORY_URL', value: repo_url, public: false)
        variables.append(key: "CI_COMMIT_TAG", value: ref) if tag?
        variables.append(key: "CI_PIPELINE_TRIGGERED", value: 'true') if trigger_request
        variables.append(key: "CI_JOB_MANUAL", value: 'true') if action?
        variables.concat(legacy_variables)
      end
586 587
    end

588
    def persisted_environment_variables
589 590
      Gitlab::Ci::Variables::Collection.new.tap do |variables|
        return variables unless persisted_environment
L
Lin Jen-Shin 已提交
591

592
        variables.concat(persisted_environment.predefined_variables)
L
Lin Jen-Shin 已提交
593

594 595 596 597 598
        # Here we're passing unexpanded environment_url for runner to expand,
        # and we need to make sure that CI_ENVIRONMENT_NAME and
        # CI_ENVIRONMENT_SLUG so on are available for the URL be expanded.
        variables.append(key: 'CI_ENVIRONMENT_URL', value: environment_url) if environment_url
      end
599 600
    end

601
    def legacy_variables
602 603 604 605 606 607 608 609 610 611 612 613 614
      Gitlab::Ci::Variables::Collection.new.tap do |variables|
        variables.append(key: 'CI_BUILD_ID', value: id.to_s)
        variables.append(key: 'CI_BUILD_TOKEN', value: token, public: false)
        variables.append(key: 'CI_BUILD_REF', value: sha)
        variables.append(key: 'CI_BUILD_BEFORE_SHA', value: before_sha)
        variables.append(key: 'CI_BUILD_REF_NAME', value: ref)
        variables.append(key: 'CI_BUILD_REF_SLUG', value: ref_slug)
        variables.append(key: 'CI_BUILD_NAME', value: name)
        variables.append(key: 'CI_BUILD_STAGE', value: stage)
        variables.append(key: "CI_BUILD_TAG", value: ref) if tag?
        variables.append(key: "CI_BUILD_TRIGGERED", value: 'true') if trigger_request
        variables.append(key: "CI_BUILD_MANUAL", value: 'true') if action?
      end
615
    end
616

617
    def environment_url
618
      options&.dig(:environment, :url) || persisted_environment&.external_url
619 620
    end

621 622
    def build_attributes_from_config
      return {} unless pipeline.config_processor
623

624 625
      pipeline.config_processor.build_attributes(name)
    end
626

M
Markus Koller 已提交
627
    def update_project_statistics
628 629
      return unless project

M
Markus Koller 已提交
630 631
      ProjectCacheWorker.perform_async(project_id, [], [:build_artifacts_size])
    end
632 633 634 635 636 637

    def update_project_statistics_after_save
      if previous_changes.include?('artifacts_size')
        update_project_statistics
      end
    end
D
Douwe Maan 已提交
638 639
  end
end