Download the PHP package smichaelsen/typo3-gitlab-ci without Composer

On this page you can find all versions of the php package smichaelsen/typo3-gitlab-ci. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package typo3-gitlab-ci

Gitlab CI configuration for your TYPO3

Build Status

This package can help you to set up deployment of your TYPO3 installation with GitLab CI. Your TYPO3 installation has to be composer based.

Setup

Include the following configuration in your root composer.json:

"require": {
    "smichaelsen/typo3-gitlab-ci": "^4.0.0"
},
"extra": {
    "helhum/typo3-console": {
        "install-binary": false,
        "install-extension-dummy": false
    },
    "typo3/cms": {
        "cms-package-dir": "{$vendor-dir}/typo3/cms",
        "web-dir": "web"
    }
},
"scripts": {
    "install-gitlab-ci": [
        "{$vendor-dir}/smichaelsen/typo3-gitlab-ci/scripts/install.sh"
    ],
    "post-autoload-dump": [
        "@install-gitlab-ci"
    ]
}

Run composer update to install everything. You'll find a .env.example in your root directory. Copy it to .env, add it to .gitignore and populate it with the settings for your local TYPO3 installation.

If previously there was no typo3conf/AdditionalConfiguration.php there will be one after installing this package that will take care of loading the settings from .env. If you have a custom typo3conf/AdditionalConfiguration.php already, just include the following line at the beginning of the file:

`

Experimental: Setup a fresh installation with helhum/minimal-typo3-distribution

` The last command is interactive and will ask for your DB credentials. Select "site" or "no" as setup type.

`

GitLab variables

Set the following variables in your GitLab project to get a working deployment.

Variable Name prefixable with branch name :star: Description Mandatory
SSH_PRIVATE_KEY :x: Private SSH key :sparkles: :white_check_mark:
SSH_USERNAME :white_check_mark: User name for SSH connection :white_check_mark:
SSH_HOST :white_check_mark: Hostname (IP or domain) of target server. :white_check_mark:
SSH_PORT :white_check_mark: Port for the ssh connection. Defaults to 22. :x:
SSH_REMOTE_PATH :white_check_mark: Path where on the target server the project should be deployed. :white_check_mark:
DBHOST :white_check_mark: Database host :white_check_mark:
DBNAME :white_check_mark: Database name :white_check_mark:
DBUSER :white_check_mark: Database user :white_check_mark:
DBPASS :white_check_mark: Database password :white_check_mark:
ENCRYPTION_KEY :white_check_mark: Overwrites the $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']. :x:
INSTALL_TOOL_PASSWORD :white_check_mark: Overwrites the $GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword']. :x:
IM_PATH :white_check_mark: Overwrites the $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']. :x:
PHP_BINARY :white_check_mark: PHP binary that should be used to execute PHP cli scripts on the target server. :x:

:star: Prefixing a variable name with a certain branch name will make the setting valid only for this branch. E.g. master_DBPASS will only be valid for the master branch and will then take precedence over DBPASS if that is configured.

:sparkles: Generate an SSH key pair and store the private key in SSH_PRIVATE_KEY. Add the public key to .ssh/authorized_keys on your target server(s). Additionally add the public key as "Deploy Key" to private repositories that you need to load (e.g. via composer).

Custom Scripts and configuration

You can invoke your own scripts at certain points of the deployment process. After installing this package you will find a folder gitlab-script/ in your root directory with files prefixed with an underscore _. Remove the underscore to activate the file and fill it with your own commands.

after-composer.sh

Will be executed in the composer job which loads all dependencies and then moves everything to the .Build folder that is needed in the next stages and will eventually be deployed. You can use this custom script to influence the contents of .Build.

build-extensions.sh

Will be executed in the build_extensions job. If your TYPO3 extensions need to be built before the deployment, you can do it here. This job is executed with the node:8 docker image, which means the machine is well prepared for node based frontend buildings (npm, grunt etc). But your script can also install other software you need.

pre-deploy.sh

Will be executed in the deploy job, right before the code is actually transfered to the target server. Use this script to do last minute preparations on the target server.

Hint: In your own scripts you have all your Gitlab CI variables available. So you can perform commands on the target server like this:

ssh -p $SSH_PORT $SSH_USERNAME@$SSH_HOST "echo 'Hello from the target server!'"

rsync-build-excludes.txt

List files and directories in here that you want to exclude from your whole CI process. This speeds up your CI process and lowers disk usage on the runner server. List one file / directory pattern per line.

rsync-deploy-excludes.txt

List files and directories in here that you used in the CI process but don't want to deploy onto the target server. It's good practice and improves security to only ship to the production server what is really needed to run then website. List one file / directory pattern per line.

Versions and updating

This package uses semantic versioning. So you are encouraged to require the package with ^4.0.0. Then you can expect receiving bugfix releases and improvements without breaking changes.

Breaking Changes:

4.x to 5.x:

3.x to 4.x:

2.x to 3.x:

1.x to 2.x:


All versions of typo3-gitlab-ci with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0 <7.2
typo3/cms Version ^7.6 || ^8.7
helhum/dotenv-connector Version ^2.0.1
helhum/typo3-console Version ^4.6.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package smichaelsen/typo3-gitlab-ci contains the following files

Loading the files please wait ....