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
3cadf71f
Commit
3cadf71f
authored
3 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Further improve settings for extra tests from GitLab
parent
b39ce9c2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/gitlab.yml
+17
-37
17 additions, 37 deletions
tests/gitlab.yml
with
17 additions
and
37 deletions
tests/gitlab.yml
+
17
−
37
View file @
3cadf71f
...
...
@@ -25,54 +25,34 @@ Code Quality:
CODE_QUALITY_IMAGE
:
registry.lakedrops.com/docker/code-climate-drupal/code-climate-drupal
REPORT_FORMAT
:
html
script
:
-
|
export SOURCE_CODE=$(php /usr/local/bin/volume.php /code) | cut -d: -f1
-
|
if ! docker info &>/dev/null; then
if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
export DOCKER_HOST='tcp://localhost:2375'
fi
fi
-
|
# this is required to avoid undesirable reset of Docker image ENV variables being set on build stage
function propagate_env_vars() {
CURRENT_ENV=$(printenv)
for VAR_NAME; do
echo $CURRENT_ENV | grep "${VAR_NAME}=" > /dev/null && echo "--env $VAR_NAME "
done
}
-
docker pull --quiet "$CODE_QUALITY_IMAGE"
-
|
echo docker run --rm \
$(propagate_env_vars \
SOURCE_CODE \
TIMEOUT_SECONDS \
CODECLIMATE_DEBUG \
CODECLIMATE_DEV \
REPORT_STDOUT \
REPORT_FORMAT \
ENGINE_MEMORY_LIMIT_BYTES \
CODECLIMATE_PREFIX \
) \
--env REPORT_FORMAT="${REPORT_FORMAT}" \
--env SOURCE_CODE="$(php /usr/local/bin/volume.php /code | cut -d: -f1)" \
--env TIMEOUT_SECONDS="${TIMEOUT_SECONDS}" \
--env CODECLIMATE_DEBUG="${CODECLIMATE_DEBUG}" \
--env CODECLIMATE_DEV="${CODECLIMATE_DEV}" \
--env REPORT_FORMAT="${REPORT_FORMAT}" \
--env ENGINE_MEMORY_LIMIT_BYTES="${ENGINE_MEMORY_LIMIT_BYTES}" \
--env CODECLIMATE_PREFIX="${CODECLIMATE_PREFIX}" \
--volume "$(php /usr/local/bin/volume.php /code)" \
--volume /var/run/docker.sock:/var/run/docker.sock \
"$CODE_QUALITY_IMAGE" /code
-
|
docker run --rm \
$(propagate_env_vars \
SOURCE_CODE \
TIMEOUT_SECONDS \
CODECLIMATE_DEBUG \
CODECLIMATE_DEV \
REPORT_STDOUT \
REPORT_FORMAT \
ENGINE_MEMORY_LIMIT_BYTES \
CODECLIMATE_PREFIX \
) \
--env REPORT_FORMAT="${REPORT_FORMAT}" \
--env SOURCE_CODE="$(php /usr/local/bin/volume.php /code | cut -d: -f1)" \
--env TIMEOUT_SECONDS="${TIMEOUT_SECONDS}" \
--env CODECLIMATE_DEBUG="${CODECLIMATE_DEBUG}" \
--env CODECLIMATE_DEV="${CODECLIMATE_DEV}" \
--env REPORT_FORMAT="${REPORT_FORMAT}" \
--env ENGINE_MEMORY_LIMIT_BYTES="${ENGINE_MEMORY_LIMIT_BYTES}" \
--env CODECLIMATE_PREFIX="${CODECLIMATE_PREFIX}" \
--volume "$(php /usr/local/bin/volume.php /code)" \
--volume /var/run/docker.sock:/var/run/docker.sock \
"$CODE_QUALITY_IMAGE" /code
- ls -lisa
-
ls -lisa
artifacts
:
name
:
code-quality
paths
:
[
'
gl-code-quality-report.json'
]
...
...
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