Verified Commit 6eb96712 authored by Adrian DC's avatar Adrian DC
Browse files

ci(gitlab-ci): migrate to RadianDevCore components submodule

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent 92c68463
Loading
Loading
Loading
Loading
Loading
Changes for .gitlab-ci.d: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
Subproject commit 70906187a5dd73c9334d2d5b648eb882e77c052e

.gitlab-ci.d/build.yml

deleted100644 → 0
+0 −21
Changes for .gitlab-ci.d/build.yml: 0 added lines, 21 removed lines.
Original line number Diff line number Diff line
spec:
  inputs:
    stage:
      default: test
      description: 'Defines the build stage (Default: test)'
    image:
      default: undefined:latest
      description: 'Specify the build image (Default: undefined:latest)'
---

.build:
  stage: $[[ inputs.stage ]]
  image: $[[ inputs.image ]]
  script:
    - rm -rf ./build ./dist ./*.egg-info ./.eggs
    - python3 -m build
  after_script:
    - rm -rf ./build ./*.egg-info ./.eggs
  artifacts:
    paths:
      - dist/

.gitlab-ci.d/changelog.yml

deleted100644 → 0
+0 −46
Changes for .gitlab-ci.d/changelog.yml: 0 added lines, 46 removed lines.
Original line number Diff line number Diff line
spec:
  inputs:
    stage:
      default: test
      description: 'Defines the changelog stage (Default: test)'
    image:
      default: local:silent
      description: 'Specify the changelog image (Default: local:silent)'
---

changelog:
  stage: $[[ inputs.stage ]]
  image: $[[ inputs.image ]]
  script:
    # Prepare git-cliff binaries
    - |
      mkdir -p ./.tmp/
      if ! ls ./.tmp/git-cliff-x86_64-unknown-linux-gnu.tar.gz >/dev/null 2>&1; then
        wget -O ./.tmp/git-cliff-x86_64-unknown-linux-gnu.tar.gz -q https://github.com/orhun/git-cliff/releases/download/v2.4.0/git-cliff-2.4.0-x86_64-unknown-linux-gnu.tar.gz
        tar -xzf ./.tmp/git-cliff-x86_64-unknown-linux-gnu.tar.gz -C ./.tmp/ --strip-components 1
        rm -f ./.tmp/git-cliff-x86_64-unknown-linux-gnu.tar.gz
      fi
    # Request release tag
    - |
      echo -n " > Current commit : "
      git describe --always
      echo ' '
      if [ ! -z "${RELEASE_TAG:-}" ]; then
        tag="${RELEASE_TAG}"
      else
        read -p " > Release tag : " -r tag
      fi
      echo ' '
    # Generate changelog
    - |
      git tag -f -m "${tag}" "${tag}"
      ./.tmp/git-cliff --no-exec --config ./config/cliff.toml --output ./CHANGELOG.md
      sed -i "s#raw/[^/]*/docs#raw/${tag}/docs#g" ./README.md
      git add -v ./CHANGELOG.md ./README.md
      echo ' '
      git commit -m "docs(changelog): release version ${tag} and refresh changes history" -s
      echo ' '
    # Create release tag
    - git tag -f -m "${tag}" "${tag}"
  rules:
    - if: $CI_LOCAL

.gitlab-ci.d/clean.yml

deleted100644 → 0
+0 −18
Changes for .gitlab-ci.d/clean.yml: 0 added lines, 18 removed lines.
Original line number Diff line number Diff line
spec:
  inputs:
    stage:
      default: test
      description: 'Defines the clean stage (Default: test)'
    image:
      default: local
      description: 'Specify the clean image (Default: local)'
---

clean:
  stage: $[[ inputs.stage ]]
  image: $[[ inputs.image ]]
  script:
    # Cleanup intermediates
    - sudo rm -rf ./build ./dist ./*.egg-info ./.eggs
  rules:
    - if: $CI_LOCAL

.gitlab-ci.d/codestyle.yml

deleted100644 → 0
+0 −25
Changes for .gitlab-ci.d/codestyle.yml: 0 added lines, 25 removed lines.
Original line number Diff line number Diff line
spec:
  inputs:
    stage:
      default: test
      description: 'Defines the codestyle stage (Default: test)'
    image:
      default: undefined:latest
      description: 'Specify the codestyle image (Default: undefined:latest)'
---

codestyle:
  stage: $[[ inputs.stage ]]
  image: $[[ inputs.image ]]
  script:
    - |
      if ls ./docs/*.py >/dev/null 2>&1; then
        yapf -i ./docs/*.py ./src/*.py ./src/*/*.py ./setup.py
      else
        yapf -i ./src/*.py ./src/*/*.py ./setup.py
      fi
    - echo ' ' && git diff --name-status
    - |
      if [ -z "${CI_LOCAL:-}" ] || [ ! -z "${PRE_COMMIT}" ]; then
        git diff --quiet
      fi
Loading