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:
- build-common.yml
- build-yocto.yml
- common.yml
- manifest-package.yml
stages:
- infrastructure
- build
- test
- deploy
- uploadftp
variables:
MASTER_BRANCH: {{ MASTER_BRANCH }}
# --------------------------------------------------------------------------------------
# Stage: infrastructure
# --------------------------------------------------------------------------------------
changelog:
extends: .infrastructure
script: .gitlab-ci/scripts/changelog_generator.py
--token=${GITBOT_TOKEN}
> 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 }}
INSTALLSCRIPT: "fng-install.sh"
artifacts:
paths:
- build-{{ CI_PARAM_DISTRO }}-{{ machine }}/tmp/deploy/images/{{ machine }}/*
- build-{{ CI_PARAM_DISTRO }}-{{ machine }}/tmp/deploy/licenses/**/license.manifest
- build.env
# 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 }}
artifacts:
paths:
- build-{{ CI_PARAM_DISTRO }}-{{ machine }}/tmp/deploy/sdk/*
- build.env
# 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 }}]
# 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 == 'seco-mx6' or machine == 'imx6guf' %}
{% set platforms = "santaro santoka santino santino-lt" %}
{% set lavamachine = "imx6guf" %}
{% elif machine == 'seco-mx6ull' or machine == 'imx6ullguf' %}
{% set platforms = "nallino" %}
{% set lavamachine = "imx6ullguf" %}
{% elif machine == 'seco-mx8mm' or machine == 'imx8mguf' %}
{% set platforms = "tanaro" %}
{% set lavamachine = "imx8mguf" %}
{% else %}
{% set platforms = '' %}
{% set lavamachine = '' %}
{% 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_BUILDJOB: build-{{ machine }}
CI_PARAM_MACHINE: {{ lavamachine }}
CI_PARAM_PLATFORMS: {{ lavamachine }}
CI_PARAM_TEST_SUITE: boot.jinja2
CI_PARAM_EXTRA: --all-devices
platformtest:{{ machine }}:
extends:
- .test
stage: test
needs:
- job: build-{{ machine }}
variables:
CI_PARAM_BUILDJOB: build-{{ machine }}
CI_PARAM_MACHINE: {{ lavamachine }}
CI_PARAM_PLATFORMS: {{ platforms }}
{% endif %}
{% endif %} # if CI_PARAM_IMAGE is defined
# Build jobs for the fng system image
build-{{ machine }}-fngsystem:
extends: .buildimage
stage: build
variables:
CI_PARAM_MACHINE: {{ machine }}
CI_PARAM_DISTRO: {{ CI_PARAM_DISTRO_FNG }}
CI_PARAM_IMAGE: {{ CI_PARAM_IMAGE_FNG }}
INSTALLSCRIPT: "fngsystem-self-update.sh"
artifacts:
paths:
- build-{{ CI_PARAM_DISTRO_FNG }}-{{ machine }}/tmp/deploy/images/{{ machine }}/*
- build-{{ CI_PARAM_DISTRO_FNG }}-{{ machine }}/tmp/deploy/licenses/**/license.manifest
- build.env
# 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 %}