Commit 8cb45a92 authored by Enrico Scholz's avatar Enrico Scholz

CI: updated

parent e8a465dc
include: https://gitlab-ext.sigma-chemnitz.de/elito/gitlab-ci/raw/v0.1.2/yml/oe-ci.yml
variables:
X_PROJECT: "vm016-mx8m"
GIT_STRATEGY: clone
GIT_CLONE_PATH: $CI_BUILDS_DIR/prj.$CI_PROJECT_ID/git
X_CI_HELPER_REPO: "https://gitlab-ext.sigma-chemnitz.de/elito/gitlab-runner.git"
X_CI_HELPER_REV: "v0.0.5"
stages:
- build
- assemble
- deploy
## generic repository preparation
before_script:
- rm -rf ../gitlab-runner
- git clone -b "${X_CI_HELPER_REV}" --depth 1 "${X_CI_HELPER_REPO}" ../gitlab-runner
- . ../gitlab-runner/scripts/init-env
- . $_CI_DIR/register-gitlab-token
- git submodule sync --recursive
- |
git submodule update --init --recursive -j 12 || \
git submodule update --init --recursive
- git submodule status --recursive
- rm -rf /cache/bld
## generic build script
.build: &build_generic
stage: build
tags:
- "disk:+50G"
- "mem:+4G"
artifacts:
name: "${X_PROJECT}${X_CI_FLAVOR}${X_CI_EXTRA_ARTIFICAT}"
when: on_success
expire_in: 1 day
paths:
- _deploy${X_CI_FLAVOR}/
extends: .build:oe
script:
- _make() { make CI_FLAVOR="${X_CI_FLAVOR}" CI_DIST="${_CI_BUILD_INFO%%:*}" T="${X_CI_TARGETS}" CI_MACHINE="${X_CI_MACHINE}" CI_DIR="${_CI_DIR}" "$@"; }
- trap "_make ci-clean || true" EXIT
- _make ci-build -k
- rm -f _deploy${X_CI_FLAVOR}/*.ubifs
.build-sdk: &build_sdk
artifacts:
name: "${X_PROJECT}${X_CI_FLAVOR}${X_CI_EXTRA_ARTIFICAT}"
when: on_success
expire_in: 1 day
paths:
- _deploy${X_CI_FLAVOR}/
variables:
X_CI_TARGETS: "sdk"
X_CI_FLAVOR: "-sdk"
### Legacy support; fedora:25 docker images are not recreated anymore
- test -d ~/.config/openembedded || ln -s elito ~/.config/openembedded
- submodule_sync
- _bbinfo
- _make ci-build -k
.build-image: &build_image
variables:
X_CI_TARGETS: "image"
X_CI_FLAVOR: ""
.assemble: &assemble_generic
stage: assemble
.build-sdk: &build_sdk
variables:
GIT_STRATEGY: none
GIT_SUBMODULE_STRATEGY: none
artifacts:
expire_in: 1 day
paths:
- _files
before_script:
- "true"
X_CI_TARGETS: "sdk"
X_CI_FLAVOR: "-sdk"
## The real builds
build:ubuntu:
build:ubuntu:xenial:
<<: *build_generic
<<: *build_image
only:
variables:
- $X_CI_ALL_DISTROS
- $X_CI_DISTRO_UBUNTU_XENIAL
image: $CI_REGISTRY/docker/sigma/ci/elito-ubuntu:xenial
build:ubuntu:sdk:
sdk:ubuntu:xenial:
<<: *build_generic
<<: *build_sdk
only:
variables:
- $X_CI_ALL_DISTROS
- $X_CI_DISTRO_UBUNTU_XENIAL
except:
variables:
- $X_CI_NO_SDK
image: $CI_REGISTRY/docker/sigma/ci/elito-ubuntu:xenial
.build:fedora:
##
build:fedora:25:
<<: *build_generic
<<: *build_image
except:
variables:
- $X_CI_DISTRO_NO_FEDORA_25
image: $CI_REGISTRY/docker/sigma/ci/elito-fedora:25
.build:fedora:sdk:
sdk:fedora:25:
<<: *build_generic
<<: *build_sdk
environment: sdk/fedora-25
except:
variables:
- $X_CI_DISTRO_NO_FEDORA_25
- $X_CI_NO_SDK
image: $CI_REGISTRY/docker/sigma/ci/elito-fedora:25
## assemble
assemble:ubuntu:
<<: *assemble_generic
## Assemble results
assemble:fedora:
extends: .assemble:oe
dependencies:
- build:ubuntu
- build:ubuntu:sdk
- build:fedora:25
- sdk:fedora:25
except:
variables:
- $X_CI_DISTRO_NO_FEDORA_25
- $X_CI_NO_SDK
script:
- M='phyboard-polaris-imx8m-2'
- mkdir _files _files/image _files/sdk
- install -p -m 0644 _deploy/${M}_vm016.dtb _files/image/
- install -p -m 0644 _deploy/Image _files/image/
......@@ -109,33 +88,23 @@ assemble:ubuntu:
- install -p -m 0644 _deploy/*-$M.fitimg _files/image/ || ':'
- install -p -m 0644 _deploy/*-$M.raucb _files/image/ || ':'
- install -p -m 0644 _deploy/*-$M.wic.xz _files/image/ || ':'
- install -p -m 0644 _deploy/*-$M.tar.xz _files/image/ || ':'
- install -p -m 0644 _deploy/*-$M.ext4.xz _files/image/ || ':'
- install -p -m 0644 _deploy/*-$M.sdcard.xz _files/image/ || ':'
- install -p -m 0644 _deploy/*-$M.ubifs.xz _files/image/ || ':'
- install -p -m 0644 _deploy/*-$M.manifest _files/image/
- install -p -m 0644 _deploy-sdk/*.sh _files/sdk/ubuntu-sdk.sh
- install -p -m 0644 _deploy-sdk/*.sh _files/sdk/fedora-sdk.sh
## pages
## create pages
pages:
stage: deploy
variables:
GIT_STRATEGY: none
GIT_SUBMODULE_STRATEGY: none
environment:
name: deploy/$CI_COMMIT_REF_NAME
extends: .pages:oe
only:
variables:
- $CI_BUILD_REF_NAME == $X_CI_PAGES_REF
except:
variables:
- $X_CI_DISTRO_NO_FEDORA_25
- $X_CI_NO_SDK
dependencies:
- assemble:ubuntu
artifacts:
expire_in: 1 week
paths:
- public
before_script:
- "true"
script:
- mkdir -p public/$CI_COMMIT_REF_NAME
- mv _files/* public/$CI_COMMIT_REF_NAME/
- ln -s "$CI_COMMIT_REF_NAME" public/latest
- rm -f public/index.html index.html
- ( cd public && tree -s -F -D --charset=utf-8 -H . ) > index.html
- mv index.html public/
- assemble:fedora
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment