Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drupal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
GitLab CI/CD
Drupal
Commits
82e297f0
Commit
82e297f0
authored
3 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Further improve settings for extra tests from GitLab
parent
ef4480e6
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lakedrops-execute.yml
+0
-12
0 additions, 12 deletions
lakedrops-execute.yml
test-and-deploy.yml
+18
-163
18 additions, 163 deletions
test-and-deploy.yml
tests/gitlab.yml
+61
-0
61 additions, 0 deletions
tests/gitlab.yml
tests/lakedrops.yml
+92
-0
92 additions, 0 deletions
tests/lakedrops.yml
with
171 additions
and
175 deletions
lakedrops-execute.yml
+
0
−
12
View file @
82e297f0
...
...
@@ -21,18 +21,6 @@ Update DB:
Build Theme
:
extends
:
'
.theme'
Test Code Style
:
extends
:
'
.codestyle'
Test PHPUnit
:
extends
:
'
.phpunit'
Test Behat
:
extends
:
'
.behat'
Test Backstop
:
extends
:
'
.backstop'
Deploy
:
extends
:
'
.deployartefact'
...
...
This diff is collapsed.
Click to expand it.
test-and-deploy.yml
+
18
−
163
View file @
82e297f0
...
...
@@ -21,12 +21,24 @@ include:
file
:
'
/no-staging.yml'
rules
:
-
if
:
'
$STAGING
==
"no"'
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml
-
template
:
Code-Quality.gitlab-ci.yml
# See https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/SAST.gitlab-ci.yml
-
template
:
Security/SAST.gitlab-ci.yml
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Secret-Detection.gitlab-ci.yml
-
template
:
Security/Secret-Detection.gitlab-ci.yml
-
project
:
gitlab-ci-cd/drupal
ref
:
master
file
:
'
/tests/lakedrops.yml'
rules
:
-
if
:
'
$INITIALINSTALL
==
"yes"'
when
:
never
-
if
:
$DISABLE_CI_TESTS
when
:
never
-
project
:
gitlab-ci-cd/drupal
ref
:
master
file
:
'
/tests/gitlab.yml'
rules
:
-
if
:
'
$INITIALINSTALL
==
"yes"'
when
:
never
-
if
:
$DISABLE_CI_TESTS
when
:
never
-
if
:
$DISABLE_GITLAB_CI_TESTS
when
:
never
stages
:
-
validation
...
...
@@ -118,30 +130,6 @@ stages:
key
:
build-prod-${COMPOSE_PROJECT_NAME}
<<
:
*cache_paths
.test_default
:
&test_default
stage
:
test
tags
:
-
default
variables
:
GIT_STRATEGY
:
none
.test_lakedrops_default
:
&test_lakedrops_default
<<
:
*test_default
except
:
variables
:
-
$INITIALINSTALL == "yes"
-
$DISABLE_CI_TESTS
.test_gitlab_default
:
&test_gitlab_default
<<
:
*test_default
rules
:
-
if
:
'
$INITIALINSTALL
==
"yes"'
when
:
never
-
if
:
$DISABLE_CI_TESTS
when
:
never
-
if
:
$DISABLE_GITLAB_CI_TESTS
when
:
never
.prerequisites
:
stage
:
validation
tags
:
...
...
@@ -363,92 +351,6 @@ stages:
dependencies
:
-
'
Build
Site'
.codestyle
:
<<
:
*test_lakedrops_default
image
:
registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script
:
-
if [[ -f phpcs.xml ]]; then rm phpcs.xml; fi
-
ahoy test phpcs -- --report=xml --report-file=/tmp/phpcs.xml
after_script
:
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/phpcs.xml phpcs.xml
retry
:
1
artifacts
:
name
:
phpcs
when
:
always
paths
:
-
phpcs.xml
dependencies
:
-
'
Build
Site'
except
:
variables
:
-
$DISABLE_CI_TEST_CODESTYLE
.phpunit
:
<<
:
*test_lakedrops_default
stage
:
test
image
:
registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script
:
-
if [[ -f junit.xml ]]; then rm junit.xml; fi
-
if [[ -f testdox.html ]]; then rm testdox.html; fi
-
ahoy test phpunit -- --log-junit /tmp/junit.xml --testdox-html testdox.html
after_script
:
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/junit.xml junit.xml
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/testdox.html testdox.html
retry
:
1
artifacts
:
name
:
phpunit
when
:
always
paths
:
-
junit.xml
-
testdox.html
reports
:
junit
:
junit.xml
dependencies
:
-
'
Build
Site'
except
:
variables
:
-
$DISABLE_CI_TEST_PHPUNIT
.behat
:
<<
:
*test_lakedrops_default
image
:
registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script
:
-
if [[ -f behat.xml ]]; then rm behat.xml; fi
-
ahoy behat update
-
ahoy behat exec -- --format junit --out /tmp
after_script
:
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/default.xml behat.xml
retry
:
1
artifacts
:
name
:
behat
when
:
always
paths
:
-
behat.xml
dependencies
:
-
'
Build
Site'
except
:
variables
:
-
$DISABLE_CI_TEST_BEHAT
.backstop
:
<<
:
*test_lakedrops_default
image
:
registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script
:
-
backstop test
retry
:
1
artifacts
:
name
:
backstop
when
:
always
paths
:
-
config/backstop_reference
-
tests/backstop/backstop_data
dependencies
:
-
'
Build
Site'
-
'
Build
Theme'
except
:
variables
:
-
$DISABLE_CI_TEST_BACKSTOP
.deploy
:
stage
:
deploy
tags
:
...
...
@@ -561,50 +463,3 @@ stages:
-
$CHECKUPDATES
refs
:
-
develop
# ==================================== Code Quality
code_quality
:
<<
:
*test_gitlab_default
variables
:
CODE_QUALITY_IMAGE
:
registry.lakedrops.com/docker/code-climate-drupal/code-climate-drupal
artifacts
:
paths
:
-
gl-code-quality-report.json
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_CODE_QUALITY
when
:
never
# ==================================== SAST
bandit-sast
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_BANDIT_SAST
when
:
never
eslint-sast
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_ESLINT_SAST
when
:
never
nodejs-scan-sast
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_NODEJS_SCAN_SAST
when
:
never
phpcs-security-audit-sast
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_PHPCS_SECURITY_AUDIT_SAST
when
:
never
semgrep-sast
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_SEMGREP_SAST
when
:
never
# ==================================== Secret Detection
secret_detection
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_SECRET_DETECTION
when
:
never
This diff is collapsed.
Click to expand it.
tests/gitlab.yml
0 → 100644
+
61
−
0
View file @
82e297f0
include
:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml
-
template
:
Code-Quality.gitlab-ci.yml
# See https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/SAST.gitlab-ci.yml
-
template
:
Security/SAST.gitlab-ci.yml
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Secret-Detection.gitlab-ci.yml
-
template
:
Security/Secret-Detection.gitlab-ci.yml
.test_gitlab_default
:
&test_gitlab_default
stage
:
test
tags
:
-
default
variables
:
GIT_STRATEGY
:
none
# ==================================== Code Quality
code_quality
:
<<
:
*test_gitlab_default
variables
:
GIT_STRATEGY
:
none
CODE_QUALITY_IMAGE
:
registry.lakedrops.com/docker/code-climate-drupal/code-climate-drupal
artifacts
:
paths
:
-
gl-code-quality-report.json
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_CODE_QUALITY
when
:
never
# ==================================== SAST
bandit-sast
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_BANDIT_SAST
when
:
never
eslint-sast
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_ESLINT_SAST
when
:
never
nodejs-scan-sast
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_NODEJS_SCAN_SAST
when
:
never
phpcs-security-audit-sast
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_PHPCS_SECURITY_AUDIT_SAST
when
:
never
semgrep-sast
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_SEMGREP_SAST
when
:
never
# ==================================== Secret Detection
secret_detection
:
<<
:
*test_gitlab_default
rules
:
-
if
:
$DISABLE_GITLAB_CI_TESTS_SECRET_DETECTION
when
:
never
This diff is collapsed.
Click to expand it.
tests/lakedrops.yml
0 → 100644
+
92
−
0
View file @
82e297f0
.test_lakedrops_default
:
&test_lakedrops_default
stage
:
test
tags
:
-
default
variables
:
GIT_STRATEGY
:
none
Test Code Style
:
<<
:
*test_lakedrops_default
image
:
registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script
:
-
if [[ -f phpcs.xml ]]; then rm phpcs.xml; fi
-
ahoy test phpcs -- --report=xml --report-file=/tmp/phpcs.xml
after_script
:
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/phpcs.xml phpcs.xml
retry
:
1
artifacts
:
name
:
phpcs
when
:
always
paths
:
-
phpcs.xml
dependencies
:
-
'
Build
Site'
rules
:
-
if
:
$DISABLE_CI_TEST_CODESTYLE
when
:
never
Test PHPUnit
:
<<
:
*test_lakedrops_default
stage
:
test
image
:
registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script
:
-
if [[ -f junit.xml ]]; then rm junit.xml; fi
-
if [[ -f testdox.html ]]; then rm testdox.html; fi
-
ahoy test phpunit -- --log-junit /tmp/junit.xml --testdox-html testdox.html
after_script
:
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/junit.xml junit.xml
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/testdox.html testdox.html
retry
:
1
artifacts
:
name
:
phpunit
when
:
always
paths
:
-
junit.xml
-
testdox.html
reports
:
junit
:
junit.xml
dependencies
:
-
'
Build
Site'
rules
:
-
if
:
$DISABLE_CI_TEST_PHPUNIT
when
:
never
Test Behat
:
<<
:
*test_lakedrops_default
image
:
registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script
:
-
if [[ -f behat.xml ]]; then rm behat.xml; fi
-
ahoy behat update
-
ahoy behat exec -- --format junit --out /tmp
after_script
:
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/default.xml behat.xml
retry
:
1
artifacts
:
name
:
behat
when
:
always
paths
:
-
behat.xml
dependencies
:
-
'
Build
Site'
rules
:
-
if
:
$DISABLE_CI_TEST_BEHAT
when
:
never
Test Backstop
:
<<
:
*test_lakedrops_default
image
:
registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script
:
-
backstop test
retry
:
1
artifacts
:
name
:
backstop
when
:
always
paths
:
-
config/backstop_reference
-
tests/backstop/backstop_data
dependencies
:
-
'
Build
Site'
-
'
Build
Theme'
rules
:
-
if
:
$DISABLE_CI_TEST_BACKSTOP
when
:
never
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