Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
T
typo3.org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
92
Issues
92
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
8
Merge Requests
8
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
services
T
t3o sites
typo3.org
typo3.org
Commits
cb00b2d2
Commit
cb00b2d2
authored
Feb 24, 2017
by
Thomas Löffler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TASK] Introduces deployment
parent
a107222c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
.gitlab-ci.yml
.gitlab-ci.yml
+54
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
cb00b2d2
variables
:
SSH_HOST
:
proserver@vpro0100.proserver.punkt.de
SSH_PATH
:
/var/www/deploy
cache
:
key
:
"
$CI_BUILD_NAME/$CI_BUILD_REF_NAME"
untracked
:
true
paths
:
-
cache/
stages
:
-
test
-
build
-
deploy
test
:
stage
:
test
script
:
echo "Running tests..."
build
:
stage
:
build
script
:
echo "Running builds..."
deploy_staging
:
image
:
webdevops/php:debian-9
stage
:
deploy
environment
:
name
:
staging
url
:
https://vpro0100.proserver.punkt.de
only
:
-
master
-
9-add-deployment-on-staging-server
before_script
:
-
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install ssh-agent if not already installed, it is required by Docker.
# (change apt-get to yum if you use a CentOS-based image)
-
'
which
ssh-agent
||
(
apt-get
update
-y
&&
apt-get
install
openssh-client
-y
)'
# Run ssh-agent (inside the build environment)
-
eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
-
ssh-add <(echo "$SSH_PRIVATE_KEY")
# For Docker builds disable host key checking. Be aware that by adding that
# you are suspectible to man-in-the-middle attacks.
# WARNING: Use this only with the Docker executor, if you use it with shell
# you will overwrite your user's SSH config.
-
mkdir -p ~/.ssh
-
'
[[
-f
/.dockerenv
]]
&&
echo
-e
"Host
*\n\tStrictHostKeyChecking
no\n\n"
>
~/.ssh/config'
-
export COMPOSER_CACHE_DIR=.composer
-
cd data/typo3/
script
:
-
composer install --no-dev
-
rsync -az -e "ssh" --delete --exclude=fileadmin --exclude=typo3conf/l10n --exclude=.git --exclude=node_modules --exclude=bower_components --exclude=typo3temp --exclude=.ssh --exclude=.sass-cache --exclude=/uploads ./ $SSH_HOST:$SSH_PATH/
-
ssh $SSH_HOST chmod +x $SSH_PATH/bin/scripts/prepare.sh
-
ssh $SSH_HOST $SSH_PATH/bin/scripts/prepare.sh
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment