Commit dc10f869 authored by Adrian DC's avatar Adrian DC
Browse files

ci(gitlab-ci): migrate from 'only: local' to 'rules: if: $CI_LOCAL'

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent 6bc6202f
Loading
Loading
Loading
Loading
+18 −20
Changes for .gitlab-ci.yml: 18 added lines, 20 removed lines.
Original line number Diff line number Diff line
@@ -55,8 +55,8 @@ changelog:
    - git add -v ./CHANGELOG.md
    - git commit --amend --no-edit
    - git tag -f -m '' "${tag}"
  only:
    - local
  rules:
    - if: $CI_LOCAL

dependencies:
  stage: development
@@ -69,8 +69,8 @@ dependencies:
    - sudo pip3 install -r ./requirements/quality.txt --upgrade
    - sudo pip3 install -r ./requirements/tests.txt --upgrade
    - sudo pip3 install -r ./requirements/docs.txt --upgrade
  only:
    - local
  rules:
    - if: $CI_LOCAL

development:
  stage: development
@@ -82,8 +82,8 @@ development:
    - pipx install --force ./dist/*.whl
  after_script:
    - sudo rm -rf ./build ./*.egg-info ./.eggs
  only:
    - local
  rules:
    - if: $CI_LOCAL

images:
  stage: development
@@ -120,8 +120,8 @@ images:
      RUN apk add docker
      EOF
      docker push "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/gitlabci-local:preview"
  only:
    - local
  rules:
    - if: $CI_LOCAL

preview:
  stage: development
@@ -132,8 +132,8 @@ preview:
    - pip3 install -q -r ./requirements/tests.txt --upgrade 2>/dev/null
  script:
    - pexpect-executor -- termtosvg ./docs/preview.svg -c 'python3 ./docs/preview.py' -g 80x24 -t ./docs/template.svg
  only:
    - local
  rules:
    - if: $CI_LOCAL

# =============================================================================
# Stage: prepare
@@ -246,8 +246,8 @@ install:
  image: local:quiet
  script:
    - pipx install --force ./dist/*.whl
  only:
    - local
  rules:
    - if: $CI_LOCAL

# =============================================================================
# Stage: test (templates)
@@ -506,8 +506,8 @@ python:dind:
    - export DOCKER_TLS_VERIFY=0
  after_script:
    - docker rm -f gitlabci-local-dind >/dev/null
  only:
    - local
  rules:
    - if: $CI_LOCAL

python:local:
  extends:
@@ -517,8 +517,8 @@ python:local:
    - mkdir -p ./.tmp/
    - sudo pip3 install --force-reinstall --no-deps --upgrade ./dist/*.whl
    - sudo pip3 install -q -r ./requirements/tests.txt --upgrade
  only:
    - local
  rules:
    - if: $CI_LOCAL

# =============================================================================
# Stage: quality
@@ -588,8 +588,6 @@ deploy:trial:
    - pip3 install -q -r ./requirements/deploy.txt --upgrade
  script:
    - twine upload -u '__token__' -p "${TWINE_PASSWORD_TEST}" --repository testpypi ./dist/*
  only:
    - local
  tags:
    - local
  rules:
    - if: $CI_LOCAL
  when: manual