summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2018-04-10 18:14:55 +0000
committerRobert Speicher <rspeicher@gmail.com>2018-04-10 19:05:03 -0500
commit46dbd965030cfc313303a020e7d6f0b33f7a7931 (patch)
tree85814506ab4317c2679bac9e667a225554078ac1
parentf0ee75f19c2730aa3d73251e6a24f5d7c63b80ec (diff)
downloadgitlab-ce-46dbd965030cfc313303a020e7d6f0b33f7a7931.tar.gz
Merge branch 'update_vendored_gitlab_ci_yml_for_auto_devops' into 'master'
Update vendored .gitlab-ci.yml for Auto-Devops See merge request gitlab-org/gitlab-ce!18289
-rw-r--r--vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml53
1 files changed, 42 insertions, 11 deletions
diff --git a/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml b/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
index 4223dc18933..4810035a9e3 100644
--- a/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
+++ b/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
@@ -50,9 +50,9 @@ stages:
build:
stage: build
- image: docker:git
+ image: docker:stable-git
services:
- - docker:dind
+ - docker:stable-dind
variables:
DOCKER_DRIVER: overlay2
script:
@@ -76,12 +76,12 @@ test:
- branches
codequality:
- image: docker:latest
+ image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- - docker:dind
+ - docker:stable-dind
script:
- setup_docker
- codeclimate
@@ -90,12 +90,12 @@ codequality:
performance:
stage: performance
- image: docker:latest
+ image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- - docker:dind
+ - docker:stable-dind
script:
- setup_docker
- performance
@@ -109,25 +109,37 @@ performance:
kubernetes: active
sast:
- image: docker:latest
+ image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- - docker:dind
+ - docker:stable-dind
script:
- setup_docker
- sast
artifacts:
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:
- image: docker:latest
+ image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- - docker:dind
+ - docker:stable-dind
script:
- setup_docker
- sast_container
@@ -324,7 +336,6 @@ production:
fi
docker run --env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}" \
- --env SAST_DISABLE_REMOTE_CHECKS="${SAST_DISABLE_REMOTE_CHECKS:-false}" \
--volume "$PWD:/code" \
--volume /var/run/docker.sock:/var/run/docker.sock \
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
@@ -335,6 +346,20 @@ production:
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() {
track="${1-stable}"
name="$CI_ENVIRONMENT_SLUG"
@@ -355,10 +380,16 @@ production:
if [[ "$track" == "stable" ]]; then
# for stable track get number of replicas from `PRODUCTION_REPLICAS`
eval new_replicas=\$${env_slug}_REPLICAS
+ if [[ -z "$new_replicas" ]]; then
+ new_replicas=$REPLICAS
+ fi
service_enabled="true"
else
# for all tracks get number of replicas from `CANARY_PRODUCTION_REPLICAS`
eval new_replicas=\$${env_track}_${env_slug}_REPLICAS
+ if [[ -z "$new_replicas" ]]; then
+ eval new_replicas=\${env_track}_REPLICAS
+ fi
fi
if [[ -n "$new_replicas" ]]; then
replicas="$new_replicas"