summaryrefslogtreecommitdiff
path: root/.gitlab-ci/b2c/b2c.yml.jinja2.jinja2
blob: 6a63ad31e456be1e0050c3d2c9a90d55787dd3d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: 1

# Rules to match for a machine to qualify
target:
{% if tags %}
  tags:
{% for tag in tags %}
    - '{{ tag | trim }}'
{% endfor %}
{% endif %}

timeouts:
  first_console_activity:  # This limits the time it can take to receive the first console log
    minutes: {{ timeout_first_minutes }}
    retries: {{ timeout_first_retries }}
  console_activity:        # Reset every time we receive a message from the logs
    minutes: {{ timeout_minutes }}
    retries: {{ timeout_retries }}
  boot_cycle:
    minutes: {{ timeout_boot_minutes }}
    retries: {{ timeout_boot_retries }}
  overall:                 # Maximum time the job can take, not overrideable by the "continue" deployment
    minutes: {{ timeout_overall_minutes }}
    retries: 0
    # no retries possible here

console_patterns:
    session_end:
        regex: >-
          {{ session_end_regex }}
{% if session_reboot_regex %}
    session_reboot:
        regex: >-
          {{ session_reboot_regex }}
{% endif %}
    job_success:
        regex: >-
          {{ job_success_regex }}
    job_warn:
        regex: >-
          {{ job_warn_regex }}

# Environment to deploy
deployment:
  # Initial boot
  start:
    kernel:
      url: '{{ kernel_url }}'
      cmdline: >
        SALAD.machine_id={{ '{{' }} machine_id }}
        console={{ '{{' }} local_tty_device }},115200 earlyprintk=vga,keep
        loglevel={{ log_level }} no_hash_pointers
        b2c.service="--privileged --tls-verify=false --pid=host docker://{{ '{{' }} fdo_proxy_registry }}/mupuf/valve-infra/telegraf-container:latest" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
        b2c.container="-ti --tls-verify=false docker://{{ '{{' }} fdo_proxy_registry }}/mupuf/valve-infra/machine_registration:latest check"
        b2c.ntp_peer=10.42.0.1 b2c.pipefail b2c.cache_device=auto b2c.poweroff_delay={{ poweroff_delay }}
        b2c.minio="gateway,{{ '{{' }} minio_url }},{{ '{{' }} job_bucket_access_key }},{{ '{{' }} job_bucket_secret_key }}"
        b2c.volume="{{ '{{' }} job_bucket }}-results,mirror=gateway/{{ '{{' }} job_bucket }},pull_on=pipeline_start,push_on=changes,overwrite{% for excl in job_volume_exclusions %},exclude={{ excl }}{% endfor %},remove,expiration=pipeline_end,preserve"
{% for volume in volumes %}
        b2c.volume={{ volume }}
{% endfor %}
        b2c.container="-v {{ '{{' }} job_bucket }}-results:{{ working_dir }} -w {{ working_dir }} {% for mount_volume in mount_volumes %} -v {{ mount_volume }}{% endfor %} --tls-verify=false docker://{{ local_container }} {{ container_cmd }}"
        {% if cmdline_extras is defined %}
        {{ cmdline_extras }}
        {% endif %}

    initramfs:
      url: '{{ initramfs_url }}'