Skip to content
Snippets Groups Projects
Commit ff31d083 authored by Tim Jaacks's avatar Tim Jaacks
Browse files

Refactoring: use multiple MACHINE loops for better structure

This is a preparation for adding dedicated documentation jobs. In order
to have these grouped by stage along with their corresponding machine
jobs, we have to get rid of the giant outer loop and add loops for each
stage instead.
parent 69973c95
No related branches found
No related tags found
1 merge request!347Refactoring: use multiple MACHINE loops for better structure
Pipeline #86106 skipped with stage
......@@ -40,15 +40,12 @@ build-version:
# so we just choose the first.
MACHINE: {{ MACHINES.split(' ')[0] }}
# --------------------------------------------------------------------------------------
# Generated jobs
# --------------------------------------------------------------------------------------
{% if MACHINES %}
{% for machine in MACHINES.split(' ') %}
# --------------------------------------------------------------------------------------
# Stage: Build
# --------------------------------------------------------------------------------------
{% for machine in MACHINES.split(' ') %}
{% if SIMULATE_BUILD is not defined or SIMULATE_BUILD != "true" %}
build-{{ machine }}:
......@@ -84,12 +81,16 @@ build-{{ machine }}:
{% endif %}
{% endfor %}
# --------------------------------------------------------------------------------------
# Stage: Test
# --------------------------------------------------------------------------------------
# Run platform tests for this machine which the yocto image
# This is a little hacky as we need to match the machine name to
# the available platforms
{% for machine in MACHINES.split(' ') %}
{% if machine == 'seco-mx6' or machine == 'imx6guf' %}
{% set platforms = "santaro santoka santino santino-lt" %}
......@@ -132,10 +133,14 @@ platformtest:{{ machine }}:
PLATFORMS: {{ platforms }}
{% endif %}
{% endfor %}
# --------------------------------------------------------------------------------------
# Stage: Package
# --------------------------------------------------------------------------------------
{% for machine in MACHINES.split(' ') %}
package-{{ machine }}:
extends: .package
variables:
......@@ -148,10 +153,14 @@ package-{{ machine }}:
- job: changelog
- job: build-version
{% endfor %}
# --------------------------------------------------------------------------------------
# Stage: Deploy SoftwareStore
# --------------------------------------------------------------------------------------
{% for machine in MACHINES.split(' ') %}
deploy-{{ machine }}:
extends: .deploy-rsync
{% if CI_COMMIT_TAG is defined %}
......@@ -184,10 +193,14 @@ deploy-{{ machine }}:
- job: changelog
- job: build-version
{% endfor %}
# --------------------------------------------------------------------------------------
# Stage: Alphaplan
# --------------------------------------------------------------------------------------
{% for machine in MACHINES.split(' ') %}
generate-alphaplan-data-{{ machine }}:
extends: .generate_alphaplan_data
variables:
......@@ -201,6 +214,8 @@ import-alphaplan-data-{{ machine }}:
needs:
- generate-alphaplan-data-{{ machine }}
{% endfor %}
# --------------------------------------------------------------------------------------
# Stage: Deploy FTP
......@@ -208,6 +223,8 @@ import-alphaplan-data-{{ machine }}:
{% if SIMULATE_BUILD is defined and SIMULATE_BUILD == "true"
or CI_COMMIT_TAG is defined %}
{% for machine in MACHINES.split(' ') %}
ftp-{{ machine }}:
extends: .deploy-rsync
stage: Deploy FTP
......@@ -229,6 +246,8 @@ ftp-{{ machine }}:
- job: changelog
- job: build-version
{% endfor %}
{% endif %}
......@@ -238,6 +257,8 @@ ftp-{{ machine }}:
{% if SIMULATE_BUILD is defined and SIMULATE_BUILD == "true"
or CI_COMMIT_TAG is defined %}
{% for machine in MACHINES.split(' ') %}
azure-{{ machine }}:
extends: .deploy-azure
stage: Deploy Azure
......@@ -259,14 +280,10 @@ azure-{{ machine }}:
- job: changelog
- job: build-version
{% endif %}
# --------------------------------------------------------------------------------------
# End of generated jobs
# --------------------------------------------------------------------------------------
{% endfor %}
{% endif %}
# --------------------------------------------------------------------------------------
# Stage: Confluence
......@@ -293,5 +310,3 @@ publish-confluence-page:
- .confluence-rules
{% endif %}
{% endif %} # if MACHINES
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment