Skip to content
Snippets Groups Projects

Refactoring: use multiple MACHINE loops for better structure

Merged Tim Jaacks requested to merge use-multiple-machine-loops into master
1 file
+ 28
13
Compare changes
  • Side-by-side
  • Inline
@@ -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
Loading