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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
ccba8599
Commit
ccba8599
authored
Apr 10, 2018
by
Olivier Gonzalez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update vendored .gitlab-ci.yml for Auto-Devops
parent
977e6849
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
11 deletions
+42
-11
vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
+42
-11
No files found.
vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
View file @
ccba8599
...
@@ -50,9 +50,9 @@ stages:
...
@@ -50,9 +50,9 @@ stages:
build
:
build
:
stage
:
build
stage
:
build
image
:
docker:git
image
:
docker:
stable-
git
services
:
services
:
-
docker:dind
-
docker:
stable-
dind
variables
:
variables
:
DOCKER_DRIVER
:
overlay2
DOCKER_DRIVER
:
overlay2
script
:
script
:
...
@@ -76,12 +76,12 @@ test:
...
@@ -76,12 +76,12 @@ test:
-
branches
-
branches
codequality
:
codequality
:
image
:
docker:
latest
image
:
docker:
stable
variables
:
variables
:
DOCKER_DRIVER
:
overlay2
DOCKER_DRIVER
:
overlay2
allow_failure
:
true
allow_failure
:
true
services
:
services
:
-
docker:dind
-
docker:
stable-
dind
script
:
script
:
-
setup_docker
-
setup_docker
-
codeclimate
-
codeclimate
...
@@ -90,12 +90,12 @@ codequality:
...
@@ -90,12 +90,12 @@ codequality:
performance
:
performance
:
stage
:
performance
stage
:
performance
image
:
docker:
latest
image
:
docker:
stable
variables
:
variables
:
DOCKER_DRIVER
:
overlay2
DOCKER_DRIVER
:
overlay2
allow_failure
:
true
allow_failure
:
true
services
:
services
:
-
docker:dind
-
docker:
stable-
dind
script
:
script
:
-
setup_docker
-
setup_docker
-
performance
-
performance
...
@@ -109,25 +109,37 @@ performance:
...
@@ -109,25 +109,37 @@ performance:
kubernetes
:
active
kubernetes
:
active
sast
:
sast
:
image
:
docker:
latest
image
:
docker:
stable
variables
:
variables
:
DOCKER_DRIVER
:
overlay2
DOCKER_DRIVER
:
overlay2
allow_failure
:
true
allow_failure
:
true
services
:
services
:
-
docker:dind
-
docker:
stable-
dind
script
:
script
:
-
setup_docker
-
setup_docker
-
sast
-
sast
artifacts
:
artifacts
:
paths
:
[
gl-sast-report.json
]
paths
:
[
gl-sast-report.json
]
dependency_scanning
:
image
:
docker:stable
variables
:
DOCKER_DRIVER
:
overlay2
allow_failure
:
true
services
:
-
docker:stable-dind
script
:
-
setup_docker
-
dependency_scanning
artifacts
:
paths
:
[
gl-dependency-scanning-report.json
]
sast:container:
sast:container:
image
:
docker:
latest
image
:
docker:
stable
variables
:
variables
:
DOCKER_DRIVER
:
overlay2
DOCKER_DRIVER
:
overlay2
allow_failure
:
true
allow_failure
:
true
services
:
services
:
-
docker:dind
-
docker:
stable-
dind
script
:
script
:
-
setup_docker
-
setup_docker
-
sast_container
-
sast_container
...
@@ -324,7 +336,6 @@ production:
...
@@ -324,7 +336,6 @@ production:
fi
fi
docker run --env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}" \
docker run --env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}" \
--env SAST_DISABLE_REMOTE_CHECKS="${SAST_DISABLE_REMOTE_CHECKS:-false}" \
--volume "$PWD:/code" \
--volume "$PWD:/code" \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /var/run/docker.sock:/var/run/docker.sock \
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
...
@@ -335,6 +346,20 @@ production:
...
@@ -335,6 +346,20 @@ production:
esac
esac
}
}
function dependency_scanning() {
case "$CI_SERVER_VERSION" in
*-ee)
docker run --env DEP_SCAN_DISABLE_REMOTE_CHECKS="${DEP_SCAN_DISABLE_REMOTE_CHECKS:-false}" \
--volume "$PWD:/code" \
--volume /var/run/docker.sock:/var/run/docker.sock \
"registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$SP_VERSION" /code
;;
*)
echo "GitLab EE is required"
;;
esac
}
function deploy() {
function deploy() {
track="${1-stable}"
track="${1-stable}"
name="$CI_ENVIRONMENT_SLUG"
name="$CI_ENVIRONMENT_SLUG"
...
@@ -355,10 +380,16 @@ production:
...
@@ -355,10 +380,16 @@ production:
if [[ "$track" == "stable" ]]; then
if [[ "$track" == "stable" ]]; then
# for stable track get number of replicas from `PRODUCTION_REPLICAS`
# for stable track get number of replicas from `PRODUCTION_REPLICAS`
eval new_replicas=\$${env_slug}_REPLICAS
eval new_replicas=\$${env_slug}_REPLICAS
if [[ -z "$new_replicas" ]]; then
new_replicas=$REPLICAS
fi
service_enabled="true"
service_enabled="true"
else
else
# for all tracks get number of replicas from `CANARY_PRODUCTION_REPLICAS`
# for all tracks get number of replicas from `CANARY_PRODUCTION_REPLICAS`
eval new_replicas=\$${env_track}_${env_slug}_REPLICAS
eval new_replicas=\$${env_track}_${env_slug}_REPLICAS
if [[ -z "$new_replicas" ]]; then
eval new_replicas=\${env_track}_REPLICAS
fi
fi
fi
if [[ -n "$new_replicas" ]]; then
if [[ -n "$new_replicas" ]]; then
replicas="$new_replicas"
replicas="$new_replicas"
...
...
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