mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-04 20:42:52 +00:00
ci: add automatic docker image building
This commit is contained in:
committed by
Rainer Killinger
parent
1dbf4515fe
commit
f2ca308a29
@@ -7,7 +7,7 @@ stages:
|
||||
- setup
|
||||
- build
|
||||
- test
|
||||
- docs
|
||||
- publish
|
||||
- deploy
|
||||
|
||||
setup:
|
||||
@@ -65,7 +65,7 @@ scheduled-audit:
|
||||
- schedules
|
||||
|
||||
pages:
|
||||
stage: docs
|
||||
stage: publish
|
||||
script:
|
||||
- npm run documentation
|
||||
- mv docs public
|
||||
@@ -75,6 +75,29 @@ pages:
|
||||
paths:
|
||||
- public
|
||||
|
||||
executable:
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/builder
|
||||
stage: publish
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- npm run build:prod
|
||||
- export REGISTRY_BRANCH=$(.gitlab/ci/getRegistryBranch.sh "$CI_JOB_NAME")
|
||||
- export CORE_VERSION=$(openstapps-projectmanagement get-used-version @openstapps/core)
|
||||
- export IMAGETAG_BASE=$CI_REGISTRY_IMAGE/$REGISTRY_BRANCH
|
||||
- export IMAGETAG_CORE_VERSION=$IMAGETAG_BASE:core-$CORE_VERSION
|
||||
- export IMAGETAG_LATEST=$IMAGETAG_BASE:latest
|
||||
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
|
||||
- docker build -t $IMAGETAG_CORE_VERSION -t $IMAGETAG_LATEST -f Dockerfile.Executable .
|
||||
- docker push $IMAGETAG_CORE_VERSION
|
||||
- .gitlab/ci/pushAsLatestVersion.sh "$CI_COMMIT_REF_NAME" "$IMAGETAG_BASE"
|
||||
only:
|
||||
- /^(v[0-9]+\.[0-9]+\.[0-9]+|master|develop)$/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
review:
|
||||
stage: deploy
|
||||
script:
|
||||
|
||||
Reference in New Issue
Block a user