Newer
Older
# --------------------------------------------------------------------------------------
# Global
# --------------------------------------------------------------------------------------
# As the trigger job is not executed in a environment with checked out repository, we
# need to get the includes directly from gitlab
- project: '{{ CI_PROJECT_ROOT_NAMESPACE }}/yocto/infrastructure/gitlab-ci'
file: 'common.yml'
- project: '{{ CI_PROJECT_ROOT_NAMESPACE }}/yocto/infrastructure/gitlab-ci'
file: 'manifest-build.yml'
- project: '{{ CI_PROJECT_ROOT_NAMESPACE }}/yocto/infrastructure/gitlab-ci'
file: 'manifest-package.yml'
MASTER_BRANCH_MANIFEST: {{ MASTER_BRANCH_MANIFEST }}
workflow:
rules:
# This rule is needed, as otherwise the workflow:rules from
# the parent job seem to be used and prevent the pipeline generation
- if: $CI_PIPELINE_SOURCE == "parent_pipeline"
stages:
- infrastructure
- build
- test
- deploy
- uploadftp
# --------------------------------------------------------------------------------------
# Stage: infrastructure
# --------------------------------------------------------------------------------------
changelog:
extends: .infrastructure
script: .gitlab-ci/scripts/changelog_generator.py
--token=${GITBOT_TOKEN}
--branch=${MASTER_BRANCH_MANIFEST}
> changelog.md
artifacts:
expire_in: 4 weeks
paths:
- "changelog.md"
# --------------------------------------------------------------------------------------
# Generated build jobs
# --------------------------------------------------------------------------------------
{% if CI_PARAM_DISTRO is not defined %}
{% set CI_PARAM_DISTRO = "guf-wayland" %}
{% endif %}
{% if CI_PARAM_DISTRO_FNG is not defined %}
{% set CI_PARAM_DISTRO_FNG = "guf-fngsystem" %}
{% endif %}
{% if CI_PARAM_MACHINES is defined %}
{% for machine in CI_PARAM_MACHINES.split(' ') %}
# Build jobs for the normal yocto image
build-{{ machine }}:
extends: .buildimage
stage: build
variables:
CI_PARAM_MACHINE: {{ machine }}
CI_PARAM_DISTRO: {{ CI_PARAM_DISTRO }}
CI_PARAM_IMAGE: {{ CI_PARAM_IMAGE }}
# Build jobs for the sdk
buildsdk-{{ machine }}:
extends: .buildsdk
stage: build
variables:
CI_PARAM_MACHINE: {{ machine }}
CI_PARAM_DISTRO: {{ CI_PARAM_DISTRO }}
CI_PARAM_IMAGE: {{ CI_PARAM_IMAGE }}
# Deploy jobs for the yocto image
deployimage-{{ machine }}:
extends: .deployimage
stage: deploy
needs: [build-{{ machine }}, changelog]
Jonas Höppner
committed
# Deploy jobs for the yocto sdk
deploysdk-{{ machine }}:
extends: .deployimage
stage: deploy
needs: [buildsdk-{{ machine }}]
# Upload ftp jobs for the yocto image
uploadftp-{{ machine }}:
extends:
- .uploadftp
stage: uploadftp
Jonas Höppner
committed
needs: [build-{{ machine }}, changelog]
# Upload ftp jobs for the yocto sdk
uploadftp-sdk-{{ machine }}:
extends:
- .uploadftp
stage: uploadftp
needs: [ buildsdk-{{ machine }}]
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# 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
{% if machine == 'imx6guf' %}
{% set platforms = "santaro santoka santino santino-lt" %}
{% elif machine == 'imx6ullguf' %}
{% set platforms = "nallino" %}
{% elif machine == 'imx8mguf' %}
{% set platforms = "tanaro" %}
{% else %}
{% set platforms = '' %}
{% endif %}
{% if platforms %}
# Run smoketests for this machine which the yocto image
smoketest:{{ machine }}:
extends: .test
stage: test
needs:
- job: build-{{ machine }}
variables:
CI_PARAM_MACHINE: {{ machine }}
CI_PARAM_PLATFORMS: {{ machine }}
CI_PARAM_TEST_SUITE: boot.jinja2
CI_PARAM_EXTRA: --all-devices
platformtest:{{ machine }}:
extends: .test
stage: test
needs:
- job: build-{{ machine }}
variables:
CI_PARAM_MACHINE: {{ machine }}
CI_PARAM_PLATFORMS: {{ platforms }}
{% endif %}
{% endif %} # if CI_PARAM_IMAGE is defined
# Build jobs for the fng system image
build-{{ machine }}-fngsystem:
extends: .buildfng
stage: build
variables:
CI_PARAM_MACHINE: {{ machine }}
CI_PARAM_DISTRO: {{ CI_PARAM_DISTRO_FNG }}
CI_PARAM_IMAGE: {{ CI_PARAM_IMAGE_FNG }}
# Deploy jobs for the fngsystem image
deployimage-{{ machine }}-fngsystem:
extends: .deployimage
stage: deploy
needs: [build-{{ machine }}-fngsystem, changelog]
# Upload ftp jobs for the fngsystem image
uploadftp-{{ machine }}-fngsystem:
extends: .uploadftp
stage: uploadftp
needs: [build-{{ machine }}-fngsystem, changelog]
{% endif %} # if CI_PARAM_IMAGE_FNG is defined
{% endfor %}
{% endif %}