Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.gitlab-ci.yml 18.29 KiB
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Huawei Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Note: While main CI operations are done on Eclipse Foundation infrastructure,
# a few extra operations are run on Huawei OSTC infrastructure, providing:
#
# - hosting Docker images on registry.ostc-eu.org
# - automatically updated mirror of source files in China
#
# The Docker images will move to Eclipse Foundation infrastructure when Docker
# registry becomes available on gitlab.eclipse.org.
#
# The mirror in China will need to be investigated further. Do we actually need
# it? Can it be supported by Eclipse Foundation infrastructure?
#

# switch between branch pipelines and merge request pipelines
workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
      when: never
    - if: $CI_COMMIT_BRANCH

include:
 - local: '.gitlab-ci/container.yml'

variables:
  # output upload and download progress every 10 seconds
  TRANSFER_METER_FREQUENCY: "10s"
  # Use no compression for artifacts
  ARTIFACT_COMPRESSION_LEVEL: "fastest"
  # Use no compression for caches
  CACHE_COMPRESSION_LEVEL: "fastest"
  # The bitbake-builder Docker image registry path.
  #
  # As we don't have Docker registry support on gitlab.eclipse.org, use this
  # setup for now. When updating the bitbake-builder image, you therefore need
  # to push to git.ostc-eu.org first, and wait for the bitbake-builder image to
  # be pushed to the registry before starting a pipeline on gitlab.eclipse.org.
  BITBAKE_BUILDER: "registry.ostc-eu.org/ostc/pre-integration/meta-openharmony/bitbake-builder"
  # And same for openharmony-builder
  OPENHARMONY_BUILDER: "registry.ostc-eu.org/ostc/pre-integration/meta-openharmony/openharmony-builder"

stages:
  - container
  - maintenance
  - fetch
  - build
  - test

# Common job definition for bitbake driven jobs, such as fetch and build
.bitbake:
  image:
    name: $BITBAKE_BUILDER:$BITBAKE_CONTAINER_VERSION
  variables:
    MANIFEST_FILE: manifests/ci.xml