From d6572391cbcb5ce18b215166dde9d4ba14aa1828 Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 22 May 2020 10:15:31 -0600 Subject: Use rules instead of only --- .gitlab/deploy.yml | 14 +++++++------- .gitlab/test.yml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab/deploy.yml b/.gitlab/deploy.yml index 22c8633..c32149d 100644 --- a/.gitlab/deploy.yml +++ b/.gitlab/deploy.yml @@ -22,8 +22,8 @@ latest: extends: .docker_tag variables: IMAGE_TAG: latest - only: - - $CI_DEFAULT_BRANCH + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH version: extends: .docker_tag @@ -31,15 +31,15 @@ version: - export IMAGE_TAG=${CI_COMMIT_TAG/v/} - echo "Checking that $CI_COMMIT_TAG is last in the changelog" - test "$(grep '^## v' CHANGELOG.md |head -n 1)" = "## $CI_COMMIT_TAG" - only: - - tags + rules: + - if: $CI_COMMIT_TAG allow_failure: false .release: extends: .docker_tag - when: manual - only: - - tags + rules: + - if: $CI_COMMIT_TAG + when: manual after_script: # Also push to registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder - docker login -u gitlab-ci-token -p $GITLAB_TOKEN $CI_REGISTRY diff --git a/.gitlab/test.yml b/.gitlab/test.yml index fb0b723..996f5b2 100644 --- a/.gitlab/test.yml +++ b/.gitlab/test.yml @@ -88,8 +88,8 @@ integration-ruby: LICENSE_MANAGEMENT_VERSION: $CI_COMMIT_SHA SAST_DISABLED: 'true' SECURE_ANALYZERS_PREFIX: $CI_REGISTRY_IMAGE - only: - - $CI_DEFAULT_BRANCH + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH functional-csharp-nuget-dotnetcore: extends: .functional -- cgit v1.2.3