Skip to content
Snippets Groups Projects
Select Git revision
  • d0bacefe9a53f2a4ceb47a44ae5f00da28d0ced4
  • main default protected
  • renovate/immich
  • renovate/kube-prometheus-stack-75.x
  • renovate/quay.io-keycloak-keycloak-26.x
  • renovate/redis-21.x
  • renovate/loki-6.x
  • renovate/ghcr.io-mastodon-mastodon-4.x
  • renovate/cloudflare-5.x
  • renovate/mikefarah-yq-4.x
  • renovate/prometheus-json-exporter-0.x
  • renovate/prometheus-smartctl-exporter-0.x
  • renovate/hcloud-exporter-4.x
  • renovate/gitlab-runner-0.x
  • renovate/gcr.io-projectsigstore-cosign-2.x
  • renovate/docker.io-bitnami-kubectl-1.x
  • renovate/docker.io-earthly-earthly-0.x
  • renovate/siderolabs-kubelet-1.33.x
  • renovate/mariadb-21.x
  • renovate/kubernetes-go
  • renovate/external-dns-1.x
  • v25.07
  • v25.06
  • v25.05
  • v25.04
  • v25.03
  • v25.02
  • v25.01
  • v24.12
  • v24.11
  • v24.10
  • v24.09
  • v24.08
  • v24.07
  • v24.06
  • v24.05
  • v24.04
  • v24.03
  • v24.02
  • v24.01
  • v23.12
41 results

Earthfile

Blame
  • Earthfile 2.36 KiB
    VERSION --wait-block 0.7
    
    # images builds all container images in the Repository
    images:
        ARG CONTAINER_REGISTRY=quay.io/shivering-isles
        BUILD +images-earthly --CONTAINER_REGISTRY=${CONTAINER_REGISTRY}
    
    images-src:
        FROM quay.io/fedora/fedora:39
        COPY images/ ./images
    
    images-earthly:
        FROM +images-src
        ARG CONTAINER_REGISTRY=quay.io/shivering-isles
        FOR dir IN $(find ./images -type d -execdir test -f {}/Earthfile -a \! -e {}/.skip-earthly \; -print)
            BUILD "${dir}+container" --registry="$CONTAINER_REGISTRY/$(basename ${dir})"
        END
    
    # changelog generates a local RELEASENOTES.md file using git-chglog
    changelog:
      FROM quay.io/git-chglog/git-chglog:0.15.4
      COPY . /src
      WORKDIR /src
      RUN git-chglog --template .chglog/unreleased.tpl.md --next-tag "v$(date +%y.%m)" --output RELEASENOTES.md
      SAVE ARTIFACT RELEASENOTES.md AS LOCAL RELEASENOTES.md
    
    # merge allows to merge branches in the origin remote, this helps to keep everything signed
    merge:
        LOCALLY
        ARG --required branch
        RUN git fetch
        RUN git merge --no-ff origin/${branch} --no-edit
        RUN git push
        RUN git push origin --delete ${branch}
    
    # rotate will rotate encryption keys in sops-encrypted files
    rotate:
        LOCALLY
        RUN grep -Ril "sops:" ./**/*.yaml | xargs sops -r -i
    
    # enable-autoupdates enables the fedora autoupdating form the system-upgrades namespace
    enable-autoupdates:
        LOCALLY
        ARG --required node
        RUN kubectl label node "${node}" upgrade.shivering-isles.com/fedora-autoupdate=true
    
    # vale-lint runs vale linting on documentation
    vale-lint:
        FROM ./images/tools+vale
        RUN apk add --no-cache hunspell-en
        WORKDIR /src
        COPY .vale.ini .vale /src/
        COPY . /src
        ARG alertlevel=suggestion
        RUN vale --minAlertLevel=$alertlevel ./docs
    
    # vale-sync runs a new vale sync locally
    vale-sync:
        FROM ./images/tools+vale
        WORKDIR /src
        COPY .vale.ini /src
        RUN vale sync
        SAVE ARTIFACT ./.vale AS LOCAL .vale
    
    # docs runs a local mdbook instance using koolbox that will listen on localhost:3000
    docs:
        WAIT
            BUILD ./images/koolbox+install
        END
        LOCALLY
        RUN koolbox mdbook serve docs
    
    docs-lint:
        BUILD +vale-lint --alertlevel=error
    
    docs-build:
        FROM ./images/tools+mdbook
        COPY . .
        RUN mdbook build docs
        SAVE ARTIFACT ./docs/book AS LOCAL ./docs/book
    
    renovate-lint:
        DO ./shared/earthly+RENOVATE_LINT