diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-13 21:06:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-13 21:06:45 +0000 |
commit | b42f312df5aee0f1b832b69171e9d1cf92eb7416 (patch) | |
tree | cf0f4e59d45688723d3d534ddf13564fa10d3050 /lib | |
parent | 57e3d49fc0fb99f42ac178761fc6232715734020 (diff) | |
download | gitlab-ce-b42f312df5aee0f1b832b69171e9d1cf92eb7416.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
28 files changed, 57 insertions, 85 deletions
diff --git a/lib/gitlab/ci/templates/Android-Fastlane.gitlab-ci.yml b/lib/gitlab/ci/templates/Android-Fastlane.gitlab-ci.yml index 4ec3bb15230..be584814271 100644 --- a/lib/gitlab/ci/templates/Android-Fastlane.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Android-Fastlane.gitlab-ci.yml @@ -113,10 +113,9 @@ promoteBeta: promoteProduction: extends: .promote_job stage: production - # We only allow production promotion on the default branch because + # We only allow production promotion on `master` because # it has its own production scoped secret variables only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master script: - bundle exec fastlane promote_beta_to_production diff --git a/lib/gitlab/ci/templates/Docker.gitlab-ci.yml b/lib/gitlab/ci/templates/Docker.gitlab-ci.yml index 5160c05a251..15cdbf63cb1 100644 --- a/lib/gitlab/ci/templates/Docker.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Docker.gitlab-ci.yml @@ -10,8 +10,7 @@ docker-build-master: - docker build --pull -t "$CI_REGISTRY_IMAGE" . - docker push "$CI_REGISTRY_IMAGE" only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master docker-build: # Official docker image. @@ -25,5 +24,4 @@ docker-build: - docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" . - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" except: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml index 416aa19e666..a95714d5684 100644 --- a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml @@ -24,8 +24,9 @@ review: - tags kubernetes: active except: + refs: + - master variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME - $REVIEW_DISABLED stop_review: @@ -47,8 +48,9 @@ stop_review: - tags kubernetes: active except: + refs: + - master variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME - $REVIEW_DISABLED # Staging deploys are disabled by default since @@ -71,9 +73,10 @@ staging: name: staging url: http://$CI_PROJECT_PATH_SLUG-staging.$KUBE_INGRESS_BASE_DOMAIN only: + refs: + - master kubernetes: active variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME - $STAGING_ENABLED # Canaries are disabled by default, but if you want them, @@ -95,9 +98,10 @@ canary: url: http://$CI_PROJECT_PATH_SLUG.$KUBE_INGRESS_BASE_DOMAIN when: manual only: + refs: + - master kubernetes: active variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME - $CANARY_ENABLED .production: &production_template @@ -122,9 +126,9 @@ canary: production: <<: *production_template only: + refs: + - master kubernetes: active - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME except: variables: - $STAGING_ENABLED @@ -137,9 +141,10 @@ production_manual: when: manual allow_failure: false only: + refs: + - master kubernetes: active variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME - $STAGING_ENABLED - $CANARY_ENABLED except: @@ -147,7 +152,7 @@ production_manual: - $INCREMENTAL_ROLLOUT_ENABLED - $INCREMENTAL_ROLLOUT_MODE -# This job implements incremental rollout for every push to the default branch. +# This job implements incremental rollout on for every push to `master`. .rollout: &rollout_template extends: .auto-deploy @@ -173,9 +178,10 @@ production_manual: when: manual # This selectors are backward compatible mode with $INCREMENTAL_ROLLOUT_ENABLED (before 11.4) only: + refs: + - master kubernetes: active variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME - $INCREMENTAL_ROLLOUT_MODE == "manual" - $INCREMENTAL_ROLLOUT_ENABLED except: @@ -187,9 +193,10 @@ production_manual: when: delayed start_in: 5 minutes only: + refs: + - master kubernetes: active variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME - $INCREMENTAL_ROLLOUT_MODE == "timed" timed rollout 10%: diff --git a/lib/gitlab/ci/templates/Julia.gitlab-ci.yml b/lib/gitlab/ci/templates/Julia.gitlab-ci.yml index 56785f2017d..32d4e07d398 100644 --- a/lib/gitlab/ci/templates/Julia.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Julia.gitlab-ci.yml @@ -64,8 +64,7 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master # WARNING: This template is using the `julia` images from [Docker # Hub][3]. One can use custom Julia images and/or the official ones found diff --git a/lib/gitlab/ci/templates/Maven.gitlab-ci.yml b/lib/gitlab/ci/templates/Maven.gitlab-ci.yml index f6b69051bfa..84bb0ff3b33 100644 --- a/lib/gitlab/ci/templates/Maven.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Maven.gitlab-ci.yml @@ -6,7 +6,7 @@ # This template will build and test your projects # * Caches downloaded dependencies and plugins between invocation. # * Verify but don't deploy merge requests. -# * Deploy built artifacts from the default branch only. +# * Deploy built artifacts from master branch only. variables: # This will suppress any download for dependencies and plugins or upload messages which would clutter the console log. @@ -33,8 +33,7 @@ cache: script: - 'mvn $MAVEN_CLI_OPTS verify' except: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master # Verify merge requests using JDK8 verify:jdk8: @@ -43,7 +42,7 @@ verify:jdk8: # To deploy packages from CI, create a ci_settings.xml file # For deploying packages to GitLab's Maven Repository: See https://docs.gitlab.com/ee/user/project/packages/maven_repository.html#creating-maven-packages-with-gitlab-cicd for more details. # Please note: The GitLab Maven Repository is currently only available in GitLab Premium / Ultimate. -# For the default branch run `mvn deploy` automatically. +# For `master` branch run `mvn deploy` automatically. deploy:jdk8: stage: deploy script: @@ -52,5 +51,4 @@ deploy:jdk8: fi - 'mvn $MAVEN_CLI_OPTS deploy -s ci_settings.xml' only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Mono.gitlab-ci.yml b/lib/gitlab/ci/templates/Mono.gitlab-ci.yml index 9192f233eac..10fb6be6c39 100644 --- a/lib/gitlab/ci/templates/Mono.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Mono.gitlab-ci.yml @@ -25,8 +25,7 @@ before_script: release: stage: deploy only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master artifacts: paths: - build/release/MyProject.exe diff --git a/lib/gitlab/ci/templates/OpenShift.gitlab-ci.yml b/lib/gitlab/ci/templates/OpenShift.gitlab-ci.yml index 91de258eb7c..65abee1f5eb 100644 --- a/lib/gitlab/ci/templates/OpenShift.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/OpenShift.gitlab-ci.yml @@ -49,8 +49,7 @@ review: only: - branches except: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master stop-review: <<: *deploy @@ -67,8 +66,7 @@ stop-review: only: - branches except: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master staging: <<: *deploy @@ -80,8 +78,7 @@ staging: name: staging url: http://$CI_PROJECT_NAME-staging.$OPENSHIFT_DOMAIN only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master production: <<: *deploy @@ -94,5 +91,4 @@ production: name: production url: http://$CI_PROJECT_NAME.$OPENSHIFT_DOMAIN only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Packer.gitlab-ci.yml b/lib/gitlab/ci/templates/Packer.gitlab-ci.yml index 28255eb893c..0a3cf3dcf77 100644 --- a/lib/gitlab/ci/templates/Packer.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Packer.gitlab-ci.yml @@ -25,5 +25,4 @@ build: - find . -maxdepth 1 -name '*.json' -print0 | xargs -t0n1 packer build when: manual only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Brunch.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Brunch.gitlab-ci.yml index 18778326029..d2dd3fbfb75 100644 --- a/lib/gitlab/ci/templates/Pages/Brunch.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Brunch.gitlab-ci.yml @@ -12,5 +12,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Doxygen.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Doxygen.gitlab-ci.yml index 920b2c7dbd0..ba422c08614 100644 --- a/lib/gitlab/ci/templates/Pages/Doxygen.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Doxygen.gitlab-ci.yml @@ -10,5 +10,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Gatsby.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Gatsby.gitlab-ci.yml index 87f70abe0be..a683561a455 100644 --- a/lib/gitlab/ci/templates/Pages/Gatsby.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Gatsby.gitlab-ci.yml @@ -14,5 +14,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/HTML.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/HTML.gitlab-ci.yml index 8aee121a2e9..92f25280c6e 100644 --- a/lib/gitlab/ci/templates/Pages/HTML.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/HTML.gitlab-ci.yml @@ -9,5 +9,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Harp.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Harp.gitlab-ci.yml index a784e89a6ca..0e206423fa5 100644 --- a/lib/gitlab/ci/templates/Pages/Harp.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Harp.gitlab-ci.yml @@ -12,5 +12,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Hexo.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Hexo.gitlab-ci.yml index 0750bb2cd97..d91a8d7421f 100644 --- a/lib/gitlab/ci/templates/Pages/Hexo.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Hexo.gitlab-ci.yml @@ -14,5 +14,4 @@ pages: - node_modules key: project only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Hugo.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Hugo.gitlab-ci.yml index 45b06c040bd..9a3ecd1c34f 100644 --- a/lib/gitlab/ci/templates/Pages/Hugo.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Hugo.gitlab-ci.yml @@ -8,12 +8,10 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master test: script: - hugo except: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Hyde.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Hyde.gitlab-ci.yml index 6fadda88a30..7a441a2f70f 100644 --- a/lib/gitlab/ci/templates/Pages/Hyde.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Hyde.gitlab-ci.yml @@ -11,8 +11,7 @@ test: - pip install hyde - hyde gen except: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master pages: stage: deploy @@ -23,5 +22,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Jekyll.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Jekyll.gitlab-ci.yml index ef0adfdfcf2..e7dacd3a1fc 100644 --- a/lib/gitlab/ci/templates/Pages/Jekyll.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Jekyll.gitlab-ci.yml @@ -17,8 +17,7 @@ test: paths: - test except: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master pages: stage: deploy @@ -28,5 +27,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Jigsaw.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Jigsaw.gitlab-ci.yml index b53fcb3308a..2d26b86a328 100644 --- a/lib/gitlab/ci/templates/Pages/Jigsaw.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Jigsaw.gitlab-ci.yml @@ -34,5 +34,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Lektor.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Lektor.gitlab-ci.yml index 7fec535aedd..93ab8e0be0d 100644 --- a/lib/gitlab/ci/templates/Pages/Lektor.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Lektor.gitlab-ci.yml @@ -9,5 +9,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Metalsmith.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Metalsmith.gitlab-ci.yml index 7e661fc9858..6524405133a 100644 --- a/lib/gitlab/ci/templates/Pages/Metalsmith.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Metalsmith.gitlab-ci.yml @@ -13,5 +13,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Middleman.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Middleman.gitlab-ci.yml index cdd50485a81..57ac323dfdf 100644 --- a/lib/gitlab/ci/templates/Pages/Middleman.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Middleman.gitlab-ci.yml @@ -12,8 +12,7 @@ test: - bundle install --path vendor - bundle exec middleman build except: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master pages: script: @@ -25,5 +24,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Nanoc.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Nanoc.gitlab-ci.yml index be1a2d0ff0a..7f037b5f5cf 100644 --- a/lib/gitlab/ci/templates/Pages/Nanoc.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Nanoc.gitlab-ci.yml @@ -9,5 +9,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/Octopress.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/Octopress.gitlab-ci.yml index 616f9a6c99b..6d912a89bc1 100644 --- a/lib/gitlab/ci/templates/Pages/Octopress.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/Octopress.gitlab-ci.yml @@ -12,5 +12,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Pages/SwaggerUI.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/SwaggerUI.gitlab-ci.yml index f3af9db3b42..8fd08ea7995 100644 --- a/lib/gitlab/ci/templates/Pages/SwaggerUI.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Pages/SwaggerUI.gitlab-ci.yml @@ -26,5 +26,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Python.gitlab-ci.yml b/lib/gitlab/ci/templates/Python.gitlab-ci.yml index 9f115c05802..00b8b94b574 100644 --- a/lib/gitlab/ci/templates/Python.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Python.gitlab-ci.yml @@ -48,5 +48,4 @@ pages: paths: - public only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/ci/templates/Swift.gitlab-ci.yml b/lib/gitlab/ci/templates/Swift.gitlab-ci.yml index f7b4552f8da..ffed7a0fec2 100644 --- a/lib/gitlab/ci/templates/Swift.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Swift.gitlab-ci.yml @@ -22,8 +22,7 @@ archive_project: - xcodebuild clean archive -archivePath build/ProjectName -scheme SchemeName - xcodebuild -exportArchive -exportFormat ipa -archivePath "build/ProjectName.xcarchive" -exportPath "build/ProjectName.ipa" -exportProvisioningProfile "ProvisioningProfileName" only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master artifacts: paths: - build/ProjectName.ipa diff --git a/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml b/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml index 85c5104eaad..f374bc7e26a 100644 --- a/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml @@ -53,5 +53,4 @@ apply: - plan when: manual only: - variables: - - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME + - master diff --git a/lib/gitlab/metrics/requests_rack_middleware.rb b/lib/gitlab/metrics/requests_rack_middleware.rb index 085e28123a7..b57f9a19f8e 100644 --- a/lib/gitlab/metrics/requests_rack_middleware.rb +++ b/lib/gitlab/metrics/requests_rack_middleware.rb @@ -35,7 +35,7 @@ module Gitlab def self.initialize_http_request_duration_seconds HTTP_METHODS.each do |method, statuses| statuses.each do |status| - http_request_duration_seconds.get({ method: method, status: status.to_i }) + http_request_duration_seconds.get({ method: method, status: status.to_s }) end end end @@ -49,7 +49,7 @@ module Gitlab status, headers, body = @app.call(env) elapsed = Time.now.to_f - started - RequestsRackMiddleware.http_request_duration_seconds.observe({ method: method, status: status }, elapsed) + RequestsRackMiddleware.http_request_duration_seconds.observe({ method: method, status: status.to_s }, elapsed) [status, headers, body] rescue |