mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-11 00:36:14 +00:00
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
.limit_scheduled_pipelines:
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == 'main' && $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
base image:
|
|
image: docker
|
|
stage: setup
|
|
tags:
|
|
- gitlab-org-docker
|
|
inherit:
|
|
default:
|
|
- interruptible
|
|
services:
|
|
- docker:dind
|
|
script:
|
|
- >
|
|
docker login -u "${CI_REGISTRY_USER}" -p "${CI_JOB_TOKEN}" "${CI_REGISTRY}" &&
|
|
docker build
|
|
-t "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:$(grep -o '"version": "[^"]*' "${DEPLOY_DIR}/package.json" | cut -d'"' -f4)"
|
|
-t "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest" "${CI_PROJECT_DIR}/${DEPLOY_DIR}" &&
|
|
docker push "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}" --all-tags
|
|
cache: {} # disable irrelevant cache for this job
|
|
before_script: [] # do not run irrelevant before script for this job
|
|
parallel:
|
|
matrix:
|
|
- IMAGE_NAME: node-base
|
|
DEPLOY_DIR: images/node-base
|
|
- IMAGE_NAME: node-builder
|
|
DEPLOY_DIR: images/node-builder
|
|
- IMAGE_NAME: app-builder
|
|
DEPLOY_DIR: images/app-builder
|
|
- IMAGE_NAME: app-cypress
|
|
DEPLOY_DIR: images/app-cypress
|
|
rules:
|
|
- !reference [.limit_scheduled_pipelines, rules] |