Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
services
T
t3o sites
typo3.org
typo3.org
Commits
02a6c52e
Commit
02a6c52e
authored
Mar 20, 2017
by
Thomas Löffler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TASK] Switched to TYPO3 Surf, first simulating
parent
b8883a54
Pipeline
#165
failed with stages
in 13 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
102 additions
and
68 deletions
+102
-68
.gitlab-ci.yml
.gitlab-ci.yml
+61
-55
.gitlab-ci/follow_up.sh
.gitlab-ci/follow_up.sh
+0
-13
.surf/Development.php
.surf/Development.php
+41
-0
surf.phar
surf.phar
+0
-0
No files found.
.gitlab-ci.yml
View file @
02a6c52e
variables
:
SSH_HOST
:
proserver@vpro0100.proserver.punkt.de
SSH_PATH
:
/var/www/deploy
GIT_STRATEGY
:
"
none"
GIT_SSL_NO_VERIFY
:
"
true"
cache
:
key
:
"
$CI_BUILD_NAME/$CI_BUILD_REF_NAME"
untracked
:
true
paths
:
-
.composer/
before_script
:
-
apk add bash --update
stages
:
-
test
-
build
-
deploy
test
:
stage
:
test
script
:
echo "Running tests..."
-
build
-
layout
-
deploy
build
:
image
:
montoias/docker-nodejs-bower-grunt-compass:v2
stage
:
build
before_script
:
-
cd data/typo3/html/typo3conf/ext/t3olayout/Resources/Private
script
:
-
npm install
-
grunt
artifacts
:
paths
:
-
data/typo3/html/typo3conf/ext/t3olayout/Resources/Public/Css/
-
data/typo3/html/typo3conf/ext/t3olayout/Resources/Public/JavaScript/
stage
:
build
variables
:
GIT_STRATEGY
:
"
clone"
GIT_SUBMODULE_STRATEGY
:
"
recursive"
script
:
-
./.gitlab-ci/scripts/composer.sh config store-auths
false
-
./.gitlab-ci/scripts/composer.sh config http-basic.git-t3o.typo3.org gitlab-ci-token ${CI_BUILD_TOKEN}
-
./.gitlab-ci/scripts/composer.sh install
artifacts
:
paths
:
-
./
expire_in
:
'
1h'
environment
:
${CI_BUILD_REF_NAME}
layout
:
stage
:
layout
image
:
montoias/docker-nodejs-bower-grunt-compass:v2
before_script
:
-
cd html/typo3conf/ext/t3olayout/Resources/Private
script
:
-
npm install
-
grunt
artifacts
:
paths
:
-
./
expire_in
:
'
7d'
environment
:
${CI_BUILD_REF_NAME}
dependencies
:
-
build
.deploy-template
:
&deploy_template
stage
:
deploy
script
:
-
apk add openssh-client
-
eval $(ssh-agent -s)
-
echo "$SSH_PRIVATE_KEY" | ssh-add -
-
php surf.phar simulate Development
when
:
manual
dependencies
:
-
layout
deploy-master
:
<<
:
*deploy_template
environment
:
name
:
master
url
:
https://extensions.typo3.org/
only
:
-
master
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 $SSH_PATH/ci/follow_up.sh
deploy-develop
:
<<
:
*deploy_template
environment
:
name
:
develop
url
:
https://extensions-dev.typo3.org/
only
:
-
develop
.gitlab-ci/follow_up.sh
deleted
100755 → 0
View file @
b8883a54
#!/usr/bin/env bash
cd
/var/www/deploy/
# Generate PackageState file including all core extensions
bin/typo3cms
install
:generatepackagestates 0 1
bin/typo3cms backend:lock
;
bin/typo3cms language:update
;
bin/typo3cms database:updateschema
;
bin/typo3cms
install
:fixfolderstructure
;
bin/typo3cms cache:flush
;
bin/typo3cms backend:unlock
;
.surf/Development.php
0 → 100644
View file @
02a6c52e
<?php
/** @var $deployment TYPO3\Surf\Domain\Model\Deployment "injected" into this script from Surf */
$baseUrl
=
'https://vpro0100.proserver.punkt.de/'
;
$deploymentPath
=
'/var/www/surf'
;
$node
=
new
TYPO3\Surf\Domain\Model\Node
(
'development'
);
$node
->
setHostname
(
'vpro0100.proserver.punkt.de'
)
->
setOption
(
'username'
,
'proserver'
);
$application
=
new
TYPO3\Surf\Application\TYPO3\CMS
(
'typo3.org'
);
$application
->
setOption
(
'applicationWebDirectory'
,
'html'
)
->
setOption
(
'TYPO3\\Surf\\Task\\TYPO3\\CMS\\SymlinkDataTask[webDirectory]'
,
'html'
)
->
setOption
(
'TYPO3\\Surf\\Task\\TYPO3\\CMS\\SetUpExtensionsTask[scriptFileName]'
,
'bin/typo3cms'
)
->
setOption
(
'TYPO3\\Surf\\Task\\TYPO3\\CMS\\FlushCachesTask[scriptFileName]'
,
'bin/typo3cms'
)
->
setOption
(
'keepReleases'
,
3
)
->
setOption
(
'composerCommandPath'
,
'composer'
)
->
setOption
(
'updateMethod'
,
null
)
->
setOption
(
'packageMethod'
,
null
)
->
setOption
(
'baseUrl'
,
$baseUrl
)
->
setContext
(
'Development'
)
->
setDeploymentPath
(
$deploymentPath
)
->
addNode
(
$node
);
$deployment
->
addApplication
(
$application
);
$deployment
->
onInitialize
(
function
()
use
(
$deployment
)
{
$deployment
->
getWorkflow
()
->
setTaskOptions
(
'TYPO3\\Surf\\Task\\Generic\\CreateSymlinksTask'
,
[
'symlinks'
=>
[
'html/sql'
=>
'../../../shared/Sql'
]])
->
removeTask
(
'TYPO3\\Surf\\Task\\TYPO3\\CMS\\CreatePackageStatesTask'
)
->
defineTask
(
'pt:DeleteDirectoriesTask'
,
'TYPO3\\Surf\\Task\\ShellTask'
,
[
'command'
=>
'rm -rf {releasePath}/html/fileadmin {releasePath}/html/uploads'
])
->
beforeTask
(
'TYPO3\\Surf\\Task\\TYPO3\\CMS\\SymlinkDataTask'
,
'pt:DeleteDirectoriesTask'
)
->
defineTask
(
'pt:RestartPhpFpmTask'
,
'TYPO3\\Surf\\Task\\ShellTask'
,
[
'command'
=>
'sudo /usr/local/etc/rc.d/php-fpm restart'
])
->
forStage
(
'cleanup'
,
'TYPO3\\Surf\\Task\\Generic\\CreateSymlinksTask'
)
->
forStage
(
'cleanup'
,
'pt:RestartPhpFpmTask'
);
});
surf.phar
0 → 100644
View file @
02a6c52e
File added
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