Compare commits
8 commits
10e2740053
...
dea08e07df
Author | SHA1 | Date | |
---|---|---|---|
dea08e07df | |||
d0de1040ea | |||
4d81a4eafc | |||
01f4d05b37 | |||
0b40c16db4 | |||
3c5067f7ac | |||
6d8afda5dd | |||
3993c2556a |
6 changed files with 588 additions and 482 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
.envrc
|
||||
**/target/
|
||||
|
|
|
@ -6,7 +6,7 @@ fava_envelope==0.5.9
|
|||
fava-investor==0.7.0
|
||||
# renovate: branch=main
|
||||
git+https://github.com/andreasgerstmayr/fava-dashboards.git@50a0b7c8b20e50b15bf491329e1ecab6598d8b96
|
||||
git+https://github.com/beancount/beangrow.git@56f1c2a62c808917fad66fbaa4aa4028a6d2def6
|
||||
git+https://github.com/beancount/beangrow.git@8bc91509db0454ad87e257431c74d4d52e991bc9
|
||||
# renovate: branch=main
|
||||
git+https://github.com/daniel-wells/beancount_checkclosed.git@5abc380703105c12b518144f83a5c4fe25cc8f39
|
||||
# renovate: branch=main
|
||||
|
|
974
images/gitea/Cargo.lock
generated
974
images/gitea/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,40 +1,29 @@
|
|||
FROM rust:alpine AS builder
|
||||
FROM rust:1.80.1-alpine3.20 AS builder
|
||||
|
||||
# Use a dummy project to ensure the crate index is up to date.
|
||||
RUN set -e; \
|
||||
cargo new --color always /tmp/dummy; \
|
||||
cargo add --color always --manifest-path /tmp/dummy/Cargo.toml serde; \
|
||||
rm -rf /tmp/dummy; \
|
||||
cargo new --color always --bin /app
|
||||
RUN apk add --no-cache musl-dev;
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache \
|
||||
# openssl-dev \
|
||||
# pkgconfig \
|
||||
musl-dev
|
||||
|
||||
# Build dependencies with a dummy project to cache those regardless of changes
|
||||
# in the actual source code
|
||||
COPY ./Cargo.toml ./Cargo.lock /app/
|
||||
RUN cargo build --color always --release --locked
|
||||
|
||||
COPY . .
|
||||
RUN touch -a -m ./src/main.rs && cargo build --color always --release --locked
|
||||
|
||||
FROM alpine AS final
|
||||
RUN --mount=type=cache,id=cargo-registry,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,id=cargo-target,target=/app/target \
|
||||
set -e; \
|
||||
cargo build --color always --release --locked; \
|
||||
# The cache will disappear after this directive, so we
|
||||
# need to copy the binary to a persistent place.
|
||||
cp target/release/gitea /app/gitea;
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
FROM alpine:3.20.2 AS final
|
||||
|
||||
RUN apk add --no-cache ca-certificates;
|
||||
|
||||
ENV RUST_BACKTRACE=1
|
||||
ENV RUST_LOG=info
|
||||
|
||||
COPY --from=builder /app/target/release/gitea /bin/
|
||||
COPY --from=builder /app/gitea /bin/
|
||||
|
||||
# Put this last, as it's the only thing that's different between variants.
|
||||
# This way, the previous layers can all be shared.
|
||||
|
||||
ARG VARIANT="missing build arg 'VARIANT'"
|
||||
ARG VERSION="0.1.0"
|
||||
LABEL version="$VERSION"
|
||||
COPY ./shims/${VARIANT}/* /opt/resource/
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
{
|
||||
"type": "file",
|
||||
"name": "rust-xwin"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"name": "gitea"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
52
pipelines/jobs/gitea.yml.j2
Normal file
52
pipelines/jobs/gitea.yml.j2
Normal file
|
@ -0,0 +1,52 @@
|
|||
{% macro resource(variant, registry_url) -%}
|
||||
- name: image-gitea-{{ variant }}
|
||||
type: registry-image
|
||||
icon: docker
|
||||
source:
|
||||
repository: "{{ registry_url }}/gitea-{{ variant }}"
|
||||
tag: latest
|
||||
{% endmacro %}
|
||||
|
||||
{% macro build(variant) -%}
|
||||
- task: build-gitea-{{ variant }}
|
||||
file: repo/tasks/build-image.yml
|
||||
privileged: true
|
||||
vars:
|
||||
context: repo/images/gitea
|
||||
target: ''
|
||||
dockerfile: ''
|
||||
params:
|
||||
VARIANT: {{ variant }}
|
||||
output_mapping:
|
||||
image: image-gitea-{{ variant }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro put(variant) -%}
|
||||
- put: image-gitea-{{ variant }}
|
||||
inputs: detect
|
||||
params: { image: image-gitea-{{ variant }}/image.tar }
|
||||
no_get: true
|
||||
{% endmacro %}
|
||||
|
||||
{% macro resources(registry_url) -%}
|
||||
{{ resource('package', registry_url) }}
|
||||
{{ resource('status', registry_url) }}
|
||||
{{ resource('pr', registry_url) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro jobs() -%}
|
||||
- name: gitea
|
||||
serial: true
|
||||
plan:
|
||||
- get: repo
|
||||
trigger: true
|
||||
{{ build('package') }}
|
||||
{{ build('status') }}
|
||||
{{ build('pr') }}
|
||||
- in_parallel:
|
||||
steps:
|
||||
{{ put('package') }}
|
||||
{{ put('status') }}
|
||||
{{ put('pr') }}
|
||||
{% endmacro %}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue