--- kind: pipeline name: lint platform: os: linux arch: amd64 steps: - name: check-format image: python:3.11 commands: - git fetch -tq - pip install poetry -qq - poetry install --all-extras - poetry run yapf -dr ./plugins environment: PY_COLORS: 1 - name: check-coding image: python:3.11 commands: - git fetch -tq - pip install poetry -qq - poetry install --all-extras - poetry run ruff ./plugins environment: PY_COLORS: 1 trigger: ref: - refs/heads/main - refs/tags/** - refs/pull/** --- kind: pipeline name: unit-test platform: os: linux arch: amd64 steps: - name: python38-pytest image: python:3.8 commands: - pip install poetry -qq - poetry install --all-extras - poetry run pytest environment: PY_COLORS: 1 depends_on: - clone - name: python39-pytest image: python:3.9 commands: - pip install poetry -qq - poetry install --all-extras - poetry run pytest environment: PY_COLORS: 1 depends_on: - clone - name: python310-pytest image: python:3.10 commands: - pip install poetry -qq - poetry install --all-extras - poetry run pytest environment: PY_COLORS: 1 depends_on: - clone - name: python311-pytest image: python:3.11 commands: - pip install poetry -qq - poetry install --all-extras - poetry run pytest environment: PY_COLORS: 1 depends_on: - clone trigger: ref: - refs/heads/main - refs/tags/** - refs/pull/** depends_on: - lint --- kind: pipeline name: sanity-test platform: os: linux arch: amd64 workspace: path: /drone/src/ansible_collections/${DRONE_REPO_NAME/./\/} steps: - name: ansible-devel image: python:3.9 commands: - pip install poetry -qq - poetry install - poetry run pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check - poetry run ansible --version - poetry run ansible-test sanity --exclude .chglog/ --exclude .drone.yml --python 3.9 environment: PY_COLORS: 1 depends_on: - clone - name: ansible-214 image: python:3.9 commands: - pip install poetry -qq - poetry install - poetry run pip install https://github.com/ansible/ansible/archive/stable-2.14.tar.gz --disable-pip-version-check - poetry run ansible --version - poetry run ansible-test sanity --exclude .chglog/ --exclude .drone.yml --python 3.9 environment: PY_COLORS: 1 depends_on: - clone - name: ansible-213 image: python:3.9 commands: - pip install poetry -qq - poetry install - poetry run pip install https://github.com/ansible/ansible/archive/stable-2.13.tar.gz --disable-pip-version-check - poetry run ansible --version - poetry run ansible-test sanity --exclude .chglog/ --exclude .drone.yml --python 3.9 environment: PY_COLORS: 1 depends_on: - clone trigger: ref: - refs/heads/main - refs/tags/** - refs/pull/** depends_on: - unit-test --- kind: pipeline name: build platform: os: linux arch: amd64 steps: - name: build image: python:3.11 commands: - GALAXY_VERSION=${DRONE_TAG##v} - "sed -i 's/version: 0.0.0/version: '\"$${GALAXY_VERSION:-0.0.0}\"'/g' galaxy.yml" - pip install poetry -qq - poetry install --all-extras - poetry run ansible-galaxy collection build --output-path dist/ - name: checksum image: alpine commands: - cd dist/ && sha256sum * > ../sha256sum.txt - name: changelog-generate image: thegeeklab/git-chglog commands: - git fetch -tq - git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased} - name: changelog-format image: thegeeklab/alpine-tools commands: - prettier CHANGELOG.md - prettier -w CHANGELOG.md - name: publish-gitea image: plugins/gitea-release settings: api_key: from_secret: gitea_token base_url: https://gitea.rknet.org files: - dist/* - sha256sum.txt note: CHANGELOG.md overwrite: true title: ${DRONE_TAG} when: ref: - refs/tags/** trigger: ref: - refs/heads/main - refs/tags/** - refs/pull/** depends_on: - sanity-test --- kind: pipeline name: documentation platform: os: linux arch: amd64 steps: - name: publish image: plugins/gh-pages settings: netrc_machine: gitea.rknet.org pages_directory: docs/ password: from_secret: gitea_token remote_url: https://gitea.rknet.org/ansible/${DRONE_REPO_NAME} target_branch: docs username: from_secret: gitea_username trigger: ref: - refs/heads/main - refs/tags/** depends_on: - build --- kind: pipeline name: notifications platform: os: linux arch: amd64 steps: - name: matrix image: thegeeklab/drone-matrix settings: homeserver: from_secret: matrix_homeserver password: from_secret: matrix_password roomid: from_secret: matrix_roomid template: "Status: **{{ .Build.Status }}**
Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}
Message: {{ .Commit.Message.Title }}" username: from_secret: matrix_username trigger: ref: - refs/heads/main - refs/tags/** status: - success - failure depends_on: - documentation --- kind: signature hmac: 440b43b8ce15d152c7abdd936c77b25aeb978c5f63e7f7ac9895063afbdba384 ...