Skip to content
Snippets Groups Projects
Commit 6a92bd87 authored by jurgenhaas's avatar jurgenhaas
Browse files

#2 Add new task to also get the production-ready build

parent eef29276
No related branches found
No related tags found
No related merge requests found
stages:
- validation
- buildprod
- build
- prepare
- test
......@@ -28,6 +29,15 @@ stages:
- .env
- docker-compose.yml
.artifact_paths_prod: &artifact_paths_prod
paths:
- config/
- drush/
- vendor/
- web/
- .ahoy.yml
- .env
.artifact_paths: &artifact_paths
paths:
- .docker-init/
......@@ -87,6 +97,41 @@ stages:
reports:
dotenv: validation.env
.build-prod:
stage: buildprod
tags:
- default
cache:
<<: *cache_default
policy: pull-push
script: |
if [[ -n $SSH_PRIVATE_KEY ]]; then
eval $(ssh-agent -s)
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan gitlab.lakedrops.com >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
ssh git@gitlab.lakedrops.com
fi
if [[ -n $DOWNGRADE_COMPOSER ]]; then
composer self-update --$DOWNGRADE_COMPOSER;
fi
if [[ -n $GITLAB_ACCESS_TOKEN ]]; then
composer config -g gitlab-token.gitlab.lakedrops.com $GITLAB_ACCESS_TOKEN;
fi
composer install --no-interaction --no-progress --no-dev
artifacts:
name: build-prod
when: always
<<: *artifact_paths_prod
except:
refs:
- tags
variables:
- $CI_COMMIT_MESSAGE =~ /^Merge tag /i
- $CAE
.build:
stage: build
tags:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment