Compare commits
No commits in common. "3df40715b40f1d8b4fbe8698daabd0760e7d3a83" and "6431c4c01e912cb5b06412bec5f9433ed6b66a4c" have entirely different histories.
3df40715b4
...
6431c4c01e
6 changed files with 6 additions and 128 deletions
10
Justfile
10
Justfile
|
@ -3,10 +3,7 @@ target := 'main'
|
||||||
|
|
||||||
# Internal endpoint of the Docker registry, where no authentication is necessary
|
# Internal endpoint of the Docker registry, where no authentication is necessary
|
||||||
registry_url := env_var_or_default('REGISTRY_URL', 'docker.io/')
|
registry_url := env_var_or_default('REGISTRY_URL', 'docker.io/')
|
||||||
forgejo_api_key := env_var("FORGEJO_API_KEY")
|
repo_url := shell("git remote get-url origin | sed 's|git@\\([^:]*\\):\\(.*\\).git|https://\\1/\\2|'")
|
||||||
forgejo_url := shell("git remote get-url origin | sed 's|git@\\([^:]*\\):\\(.*\\).git|https://\\1/\\2|' | cut -d'/' -f-3")
|
|
||||||
repo_owner := shell("git remote get-url origin | sed 's|git@\\([^:]*\\):\\(.*\\).git|https://\\1/\\2|' | cut -d'/' -f4")
|
|
||||||
repo_name := shell("git remote get-url origin | sed 's|git@\\([^:]*\\):\\(.*\\).git|https://\\1/\\2|' | cut -d'/' -f5-")
|
|
||||||
|
|
||||||
pipeline_file := shell('mktemp')
|
pipeline_file := shell('mktemp')
|
||||||
|
|
||||||
|
@ -33,10 +30,7 @@ set-pipeline: (make-pipeline pipeline_file)
|
||||||
--pipeline {{pipeline_name}} \
|
--pipeline {{pipeline_name}} \
|
||||||
--config "{{pipeline_file}}" \
|
--config "{{pipeline_file}}" \
|
||||||
-v registry_url={{registry_url}} \
|
-v registry_url={{registry_url}} \
|
||||||
-v forgejo_api_key={{forgejo_api_key}} \
|
-v repo_url={{repo_url}}
|
||||||
-v forgejo_url={{forgejo_url}} \
|
|
||||||
-v repo_owner={{repo_owner}} \
|
|
||||||
-v repo_name={{repo_name}}
|
|
||||||
|
|
||||||
validate:
|
validate:
|
||||||
docker run --rm -v ./:/usr/src/app renovate/renovate renovate-config-validator --strict
|
docker run --rm -v ./:/usr/src/app renovate/renovate renovate-config-validator --strict
|
||||||
|
|
|
@ -30,5 +30,6 @@ ENV PATH=/home/runner/.local/bin:$PATH
|
||||||
|
|
||||||
COPY requirements.txt ./
|
COPY requirements.txt ./
|
||||||
|
|
||||||
RUN --mount=type=cache,id=pip-cache,target=/home/runner/.cache/pip \
|
RUN set -e; \
|
||||||
pip install --user -r requirements.txt;
|
pip install --user -r requirements.txt; \
|
||||||
|
rm -r /home/runner/.cache;
|
||||||
|
|
|
@ -1,16 +1,5 @@
|
||||||
{%- import 'jobs/simple-image.yml.j2' as simple_image %}
|
{%- import 'jobs/simple-image.yml.j2' as simple_image %}
|
||||||
{%- macro simple_image_resource(name, registry_url) -%}
|
{%- macro simple_image_resource(name, registry_url) -%}
|
||||||
- name: status-{{name}}
|
|
||||||
type: gitea-status
|
|
||||||
source:
|
|
||||||
access_token: ((forgejo_api_key))
|
|
||||||
url: ((forgejo_url))
|
|
||||||
owner: ((repo_owner))
|
|
||||||
name: ((repo_name))
|
|
||||||
type: generic
|
|
||||||
context: build/{{name}}
|
|
||||||
description: Building image {{name}}
|
|
||||||
|
|
||||||
- name: image-{{ name }}
|
- name: image-{{ name }}
|
||||||
type: registry-image
|
type: registry-image
|
||||||
icon: docker
|
icon: docker
|
||||||
|
@ -26,17 +15,12 @@ resource_types:
|
||||||
source:
|
source:
|
||||||
repository: concourse/github-release-resource
|
repository: concourse/github-release-resource
|
||||||
|
|
||||||
- name: gitea-status
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
repository: ((registry_url))/gitea-status
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- name: repo
|
- name: repo
|
||||||
type: git
|
type: git
|
||||||
icon: github
|
icon: github
|
||||||
source:
|
source:
|
||||||
uri: ((forgejo_url))/((repo_owner))/((repo_name))
|
uri: ((repo_url))
|
||||||
branch: master
|
branch: master
|
||||||
|
|
||||||
{%- set registry_url = "((registry_url))" %}
|
{%- set registry_url = "((registry_url))" %}
|
||||||
|
@ -58,5 +42,3 @@ jobs:
|
||||||
{{ job.jobs() }}
|
{{ job.jobs() }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{# vim: ft=yaml-jinja #}
|
|
||||||
|
|
|
@ -29,17 +29,6 @@
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro resources(registry_url) -%}
|
{% macro resources(registry_url) -%}
|
||||||
- name: status-gitea
|
|
||||||
type: gitea-status
|
|
||||||
source:
|
|
||||||
access_token: ((forgejo_api_key))
|
|
||||||
url: ((forgejo_url))
|
|
||||||
owner: ((repo_owner))
|
|
||||||
name: ((repo_name))
|
|
||||||
type: generic
|
|
||||||
context: build/gitea
|
|
||||||
description: Building images gitea-package, gitea-pr, gitea-status
|
|
||||||
|
|
||||||
{{ resource('package', registry_url) }}
|
{{ resource('package', registry_url) }}
|
||||||
{{ resource('status', registry_url) }}
|
{{ resource('status', registry_url) }}
|
||||||
{{ resource('pr', registry_url) }}
|
{{ resource('pr', registry_url) }}
|
||||||
|
@ -48,33 +37,9 @@
|
||||||
{% macro jobs() -%}
|
{% macro jobs() -%}
|
||||||
- name: gitea
|
- name: gitea
|
||||||
serial: true
|
serial: true
|
||||||
on_success:
|
|
||||||
put: state-success
|
|
||||||
resource: status-gitea
|
|
||||||
no_get: true
|
|
||||||
params:
|
|
||||||
state: success
|
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
on_failure:
|
|
||||||
put: state-failure
|
|
||||||
resource: status-gitea
|
|
||||||
no_get: true
|
|
||||||
params:
|
|
||||||
state: failure
|
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
plan:
|
plan:
|
||||||
- get: repo
|
- get: repo
|
||||||
trigger: true
|
trigger: true
|
||||||
- load_var: git_sha
|
|
||||||
file: repo/.git/ref
|
|
||||||
- put: state-pending
|
|
||||||
resource: status-gitea
|
|
||||||
no_get: true
|
|
||||||
params:
|
|
||||||
state: pending
|
|
||||||
sha: ((.:git_sha))
|
|
||||||
{{ build('package') }}
|
{{ build('package') }}
|
||||||
{{ build('status') }}
|
{{ build('status') }}
|
||||||
{{ build('pr') }}
|
{{ build('pr') }}
|
||||||
|
@ -85,4 +50,3 @@
|
||||||
{{ put('pr') }}
|
{{ put('pr') }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{# vim: ft=yaml-jinja #}
|
|
||||||
|
|
|
@ -1,15 +1,4 @@
|
||||||
{% macro resources(registry_url) -%}
|
{% macro resources(registry_url) -%}
|
||||||
- name: status-rust-xwin
|
|
||||||
type: gitea-status
|
|
||||||
source:
|
|
||||||
access_token: ((forgejo_api_key))
|
|
||||||
url: ((forgejo_url))
|
|
||||||
owner: ((repo_owner))
|
|
||||||
name: ((repo_name))
|
|
||||||
type: generic
|
|
||||||
context: build/rust-xwin
|
|
||||||
description: Building image rust-xwin
|
|
||||||
|
|
||||||
- name: image-rust-xwin
|
- name: image-rust-xwin
|
||||||
type: registry-image
|
type: registry-image
|
||||||
icon: docker
|
icon: docker
|
||||||
|
@ -28,33 +17,9 @@
|
||||||
{% macro jobs() -%}
|
{% macro jobs() -%}
|
||||||
- name: rust-xwin
|
- name: rust-xwin
|
||||||
serial: true
|
serial: true
|
||||||
on_success:
|
|
||||||
put: state-success
|
|
||||||
resource: status-rust-xwin
|
|
||||||
no_get: true
|
|
||||||
params:
|
|
||||||
state: success
|
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
on_failure:
|
|
||||||
put: state-failure
|
|
||||||
resource: status-rust-xwin
|
|
||||||
no_get: true
|
|
||||||
params:
|
|
||||||
state: failure
|
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
plan:
|
plan:
|
||||||
- get: repo
|
- get: repo
|
||||||
trigger: true
|
trigger: true
|
||||||
- load_var: git_sha
|
|
||||||
file: repo/.git/ref
|
|
||||||
- put: state-pending
|
|
||||||
resource: status-rust-xwin
|
|
||||||
no_get: true
|
|
||||||
params:
|
|
||||||
state: pending
|
|
||||||
sha: ((.:git_sha))
|
|
||||||
- task: build-rust-xwin
|
- task: build-rust-xwin
|
||||||
file: repo/tasks/build-image.yml
|
file: repo/tasks/build-image.yml
|
||||||
privileged: true
|
privileged: true
|
||||||
|
@ -84,5 +49,3 @@
|
||||||
params: { image: image-rust-xwin-ci/image.tar }
|
params: { image: image-rust-xwin-ci/image.tar }
|
||||||
no_get: true
|
no_get: true
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{# vim: ft=yaml-jinja #}
|
|
||||||
|
|
|
@ -1,33 +1,9 @@
|
||||||
{% macro jobs(job) -%}
|
{% macro jobs(job) -%}
|
||||||
- name: {{ job.name }}
|
- name: {{ job.name }}
|
||||||
serial: true
|
serial: true
|
||||||
on_success:
|
|
||||||
put: state-success
|
|
||||||
resource: status-{{ job.name }}
|
|
||||||
no_get: true
|
|
||||||
params:
|
|
||||||
state: success
|
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
on_failure:
|
|
||||||
put: state-failure
|
|
||||||
resource: status-{{ job.name }}
|
|
||||||
no_get: true
|
|
||||||
params:
|
|
||||||
state: failure
|
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
plan:
|
plan:
|
||||||
- get: repo
|
- get: repo
|
||||||
trigger: true
|
trigger: true
|
||||||
- load_var: git_sha
|
|
||||||
file: repo/.git/ref
|
|
||||||
- put: state-pending
|
|
||||||
resource: status-{{ job.name }}
|
|
||||||
no_get: true
|
|
||||||
params:
|
|
||||||
state: pending
|
|
||||||
sha: ((.:git_sha))
|
|
||||||
- task: build-image
|
- task: build-image
|
||||||
privileged: true
|
privileged: true
|
||||||
file: repo/tasks/build-image.yml
|
file: repo/tasks/build-image.yml
|
||||||
|
@ -46,5 +22,3 @@
|
||||||
params: { image: image/image.tar }
|
params: { image: image/image.tar }
|
||||||
no_get: true
|
no_get: true
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{# vim: ft=yaml-jinja #}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue