Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DevOps Tools
Documentation
Commits
afc38988
Commit
afc38988
authored
8 months ago
by
danielspeicher
Browse files
Options
Downloads
Patches
Plain Diff
Document stages and jobs.
parent
dc8a385e
No related branches found
No related tags found
1 merge request
!22
Develop
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/gitlab/drupal/index.md
+144
-3
144 additions, 3 deletions
docs/gitlab/drupal/index.md
with
144 additions
and
3 deletions
docs/gitlab/drupal/index.md
+
144
−
3
View file @
afc38988
...
@@ -105,11 +105,70 @@ This stage is currently not officially used.
...
@@ -105,11 +105,70 @@ This stage is currently not officially used.
This stage executes the build itself.
This stage executes the build itself.
### Build Prod
This stage is responsible for building the production website, which we want to finally deploy.
#### Build Prod Site
First we have to do some preparation. This is done in the
`before_script`
section.
-
[
.prepareaccess
](
#prepareaccess
)
-
[
.preparecomposerplugins
](
#preparecomposerplugins
)
We start a docker image for php with the specifies versions:
-
`PHP_MAJOR_VERSION`
-
`PHP_MINOR_VERSION`
In the script section we first update the environment by executing
`/usr/local/bin/update-env`
.
After that we install the production site with
`composer install`
**without**
the tools for development. That is pretty
it. We also add
`drupal/core-vendor-hardening`
.
The entire installation is saved as a build artefact called
`build-prod`
where all
`git`
files are excluded.
#### Build Prod Site NG
### Build
### Build
Here, we define jobs, which build the Drupal website and does some additional checks. This stage is
Here, we define jobs, which build the Drupal website and does some additional checks. This stage is
responsible for the database downloads as well.
responsible for the database downloads as well.
#### Build Site
We start a docker image for php with the specifies versions:
-
`PHP_MAJOR_VERSION`
-
`PHP_MINOR_VERSION`
After that, we start to build the Drupal site with
[
Composer
](
https://getcomposer.org/
)
:
Now we execute a
`composer install`
twice to ensure that all patches get applied correctly. After
that we setup our own
`LakeDrops`
tools by
`composer lakedrops:scaffold`
and
`composer lakedrops:docker4drupal`
.
The next step is to pull all required
[
Docker
](
https://www.docker.com/
)
images
with
[
Docker Compose
](
https://docs.docker.com/compose/
)
adn start the services.
After everything has started, we create some directories, e.g. for styles, logs and JavaScript.
The entire installation is saved as a build artefact called
`build`
where all
`git`
files are excluded.
Rules, when the job should run:
-
the tests are enabled by
`$TESTSDISABLED`
== "no"
#### Build Theme
This job creates the required files for the styling of the website.
The following jobs must run before successfully:
-
[
Build Prod Site
](
#build-prod-site
)
#### Download DB
#### Download DB
This job executes a script, that removes the SQL file
`$]PROJECT_NAME}.sql`
, if it exists already.
This job executes a script, that removes the SQL file
`$]PROJECT_NAME}.sql`
, if it exists already.
...
@@ -138,7 +197,18 @@ to dumb the current live database to the file `$]PROJECT_NAME}.sql`.
...
@@ -138,7 +197,18 @@ to dumb the current live database to the file `$]PROJECT_NAME}.sql`.
The file is saved as a build artefact, which contains
`$]PROJECT_NAME}.sql`
.
The file is saved as a build artefact, which contains
`$]PROJECT_NAME}.sql`
.
The rules are equal to
[
Download DB
](
#download-db
)
.
Rules, when the job must not run:
-
`$DISABLE_DEPLOYMENT`
!= "0"
-
`$DISABLE_DEPLOYMENT_LOCAL`
!= "0"
-
`$DBREQUIRED`
== "no"
-
`$INITIALINSTALL`
== "yes"
-
`$TESTSDISABLED`
== "yes"
-
`$LOCALDBFILE`
!= "none"
Rules, when the job should run:
-
the tests are enabled by
`$DISABLE_CI_TESTS`
!= "1"
### Prepare
### Prepare
...
@@ -152,7 +222,7 @@ anchor [import_db_default](#import-db-default-anchor).
...
@@ -152,7 +222,7 @@ anchor [import_db_default](#import-db-default-anchor).
The following jobs must run before successfully:
The following jobs must run before successfully:
-
[
Build Site
](
)
-
[
Build Site
](
#build-site
)
-
[
Download DB
](
#download-db
)
-
[
Download DB
](
#download-db
)
Rules, when the job must not run:
Rules, when the job must not run:
...
@@ -169,6 +239,7 @@ Rules, when the job should run:
...
@@ -169,6 +239,7 @@ Rules, when the job should run:
-
the tests are enabled by
`$DISABLE_CI_TESTS`
!= "1"
-
the tests are enabled by
`$DISABLE_CI_TESTS`
!= "1"
##### Import DB Default Anchor
##### Import DB Default Anchor
We start a docker image for php with the specifies versions:
We start a docker image for php with the specifies versions:
-
`PHP_MAJOR_VERSION`
-
`PHP_MAJOR_VERSION`
...
@@ -178,13 +249,83 @@ A script copies the available SQL file into the PHP container, drops the current
...
@@ -178,13 +249,83 @@ A script copies the available SQL file into the PHP container, drops the current
If the variable
`SKIPCONFIGIMPORT`
is
`no`
, a
`drush config-import`
gets executed as well. After that the
If the variable
`SKIPCONFIGIMPORT`
is
`no`
, a
`drush config-import`
gets executed as well. After that the
`UPDATE_DB_COMMAND`
gets called as well as a cache reset.
`UPDATE_DB_COMMAND`
gets called as well as a cache reset.
#### Import DB
#### Import DB
NG
This job extends
`.importdbNG`
, which itself defines the
anchor
[
import_db_default
](
#import-db-default-anchor
)
.
The following jobs must run before successfully:
-
[
Build Site
](
#build-site
)
-
[
Download DB NG
](
#download-db-ng
)
Rules, when the job must not run:
-
`$DISABLE_DEPLOYMENT`
!= "0"
-
`$DISABLE_DEPLOYMENT_LOCAL`
!= "0"
-
`$DBREQUIRED`
== "no"
-
`$INITIALINSTALL`
== "yes"
-
`$TESTSDISABLED`
== "yes"
-
`$LOCALDBFILE`
!= "none"
Rules, when the job should run:
-
the tests are enabled by
`$DISABLE_CI_TESTS`
!= "1"
#### Import Local DB
#### Import Local DB
This job extends
`.importdbLocal`
, which itself defines the
anchor
[
import_db_default
](
#import-db-default-anchor
)
.
The following jobs must run before successfully:
-
[
Build Site
](
#build-site
)
A before script is executed, which copies the
`${LOCALDBFILE}`
to
`${PROJECT_NAME}.sql.gz`
and
unzips that file.
Rules, when the job must not run:
-
`$DBREQUIRED`
== "no"
-
`$TESTSDISABLED`
== "yes"
-
`$LOCALDBFILE`
!= "none"
Rules, when the job should run:
-
the tests are enabled by
`$DISABLE_CI_TESTS`
!= "1"
#### Update DB
We start a docker image for php with the specifies versions:
-
`PHP_MAJOR_VERSION`
-
`PHP_MINOR_VERSION`
If the variable
`SKIPCONFIGIMPORT`
is
`no`
, a
`drush config-import`
gets executed as well.
After that the
`UPDATE_DB_COMMAND`
gets called as well as a cache reset.
The following jobs must run before successfully:
-
[
Build Site
](
#build-site
)
Rules, when the job must not run:
-
`$DBREQUIRED`
== "yes"
-
`$DBUPDREQUIRED`
== "no"
-
`$INITIALINSTALL`
== "yes"
-
`$TESTSDISABLED`
== "yes"
Rules, when the job should run:
-
the tests are enabled by
`$DISABLE_CI_TESTS`
!= "1"
### Internal Stages
Here we have some internal stages, which cannot be executed alone. The purpose is to
collect repeating execution.
#### .prepareaccess
#### .preparecomposerplugins
## Configuration
## Configuration
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment