Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
46ed9eb3
Commit
46ed9eb3
authored
Sep 09, 2020
by
Maxime Orefice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ENV overridable for codequality
parent
adf566cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml
lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml
+8
-1
lib/gitlab/ci/templates/utils/env.sh
lib/gitlab/ci/templates/utils/env.sh
+0
-7
No files found.
lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml
View file @
46ed9eb3
...
...
@@ -10,7 +10,6 @@ code_quality:
CODE_QUALITY_IMAGE
:
"
registry.gitlab.com/gitlab-org/ci-cd/codequality:0.85.10-gitlab.1"
needs
:
[]
before_script
:
-
source lib/gitlab/ci/templates/utils/env.sh
-
export SOURCE_CODE=$PWD
script
:
-
|
...
...
@@ -19,6 +18,14 @@ code_quality:
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"
-
|
docker run \
...
...
lib/gitlab/ci/templates/utils/env.sh
deleted
100644 → 0
View file @
adf566cd
function
propagate_env_vars
()
{
CURRENT_ENV
=
$(
printenv
)
for
VAR_NAME
;
do
echo
$CURRENT_ENV
|
grep
"
${
VAR_NAME
}
="
>
/dev/null
&&
echo
"--env
$VAR_NAME
"
done
}
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