Skip to content

Commit

Permalink
Stop cleaning and then downloading images when offline
Browse files Browse the repository at this point in the history
Signed-off-by: Cédric Ollivier <[email protected]>
  • Loading branch information
collivier committed Jul 3, 2023
1 parent b8520d4 commit 2633ecf
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions templates/run.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
{% endif %}
{% endfor %}
{% endfor %}
{% if not offline %}

- builder:
name: {{ project }}-pull-containers
Expand All @@ -145,6 +146,7 @@
image={repo}:{port}/{container}:{tag}
fi
{{ sudo1 }}{% if use_podman %}podman {% else %}docker {% endif %}pull {% if use_podman %}--cgroup-manager cgroupfs --events-backend file {% endif %}$image
{% endif %}

- builder:
name: {{ project }}-run-containers
Expand Down Expand Up @@ -215,8 +217,9 @@
{% endif %}
{% endfor %}
{% endfor %}
$image run_tests -t {test}{% if publish_to_s3 == true %} -p{% endif %}{% if push_to_db == true %} -r{% endif %}

$image run_tests -t {test}{% if publish_to_s3 == true %} -p{% endif %}{% if push_to_db == true %} -r
{% endif %}
{% if not offline %}

- builder:
name: {{ project }}-remove-images
Expand Down Expand Up @@ -281,9 +284,10 @@
- '{{ project }}-{repo}-{container}-{tag}-rmi'
{% endfor %}
{% endif %}
{% endif %}
{% for suite in suites %}
{% if suite.docker_args is defined %}
{% for key, value in (suite.docker_args.env |default({})).items() | list %}
{% for key, value in (suite.docker_args.env |default({})).items() | list %}

- parameter:
name: {{ project }}-{{ suite.repo | default(repo) }}-{{ suite.container }}-{{ key }}
Expand Down Expand Up @@ -447,7 +451,7 @@
{% for volume in docker_args.volumes %}
- copyartifact:
project: {{ use_artifacts_from }}
filter: {{ volume.split(':').0 |basename }}
filter: {{ volume.split(':').0 |basename }}
target: .
which-build: upstream-build
{% endfor %}
Expand Down Expand Up @@ -523,7 +527,7 @@
# yamllint enable rule:indentation
{% endif %}
builders:
{% if not (use_kubernetes and not use_node) %}
{% if not ((use_kubernetes and not use_node) or offline) %}
- multijob:
name: remove former images
projects:
Expand Down Expand Up @@ -589,7 +593,7 @@
- last-duration
regex: {{ jenkins_view_daily_regex }}
{% endif %}
{% if use_gerrit or git_url %}
{% if (use_gerrit or git_url) and not offline %}

- {{ project }}-build-containers: &{{ project }}-build-containers
name: '{{ project }}-build-containers'
Expand Down

0 comments on commit 2633ecf

Please sign in to comment.