0.2.1
gitea-resource
A Concourse resource to interact with Gitea.
Installation
resource_types:
- name: gitea-pr
type: registry-image
source:
repository: quay.io/avanier/gitea-resource
tag: latest-pr
resrouces:
- name: some-repo-pr
type: gitea-pr
source:
access_token: ((my_cred.token))
repo: some-repo
owner: some_user_or_org
hostname: privatehost.example
port: 443 # default, optional
insecure: false # default, optional, true uses http instead of https
skip_ssl_verification: false # default, optional, ignore invalid certificates
Usage
check
This resource is opinionated, and does not allow you to track every commit on every PR. All it does for now is allow you to know when new PRs are created, and it returns the PR number as a ref.
in
When you get
a ref, the resource will provide the raw Gitea API payload, and
the Concourse metadata for that PR as the following files:
some-repo-pr/pr.json
some-repo-pr/metadata.json
The intent is to parse this with jq
in a separate task to get the branch, and
template a pipeline for every PR with the fly-resource
. It's
the only way to avoid PR race conditions.
out
noop
FAQ
- I'd like to set the CI status for those PRs. It's an incoming feature. I
organized my code to be able to have a single codebase to do all the
operations on Gitea. Right now only listing and querying PRs is implemented,
but that's why the
base
image is separate from thepr
image. I'll eventually probably implementsinglepr
andrelease
. Thepr
image only has one extra layer which puts the right commands in the$PATH
.
Issues
Description
Languages
Go
88.4%
Shell
9.7%
Dockerfile
1.9%