Compare commits

..

No commits in common. "4fb84bc0af514b3cd50d0f2328f333a2626136a9" and "71bbba11ccfe331cfc609698795c54da5dbadff2" have entirely different histories.

4 changed files with 88 additions and 41 deletions

View File

@ -1,4 +1,3 @@
---
kind: pipeline
type: docker
name: linux-amd64
@ -34,7 +33,9 @@ steps:
username:
from_secret: docker_username
tags:
- latest-amd64
- ${DRONE_TAG}-linux-amd64
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}-linux-amd64
- ${DRONE_SEMVER_MAJOR}-linux-amd64
when:
event:
- tag
@ -75,11 +76,54 @@ steps:
username:
from_secret: docker_username
tags:
- latest-arm64
- ${DRONE_TAG}-linux-arm64
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}-linux-arm64
- ${DRONE_SEMVER_MAJOR}-linux-arm64
when:
event:
- tag
# no build server available (at the moment) for this arch
# ---
# kind: pipeline
# type: docker
# name: linux-arm
# platform:
# arch: arm
# os: linux
# steps:
# - name: build
# image: plugins/docker:linux-arm
# settings:
# dockerfile: Dockerfile
# dry_run: true
# repo: docker.asperti.com/paspo/hugo
# when:
# event:
# - push
# - name: build_and_publish
# image: plugins/docker:linux-arm
# settings:
# dockerfile: Dockerfile
# force_tag: true
# password:
# from_secret: docker_password
# registry: docker.asperti.com
# repo: docker.asperti.com/paspo/hugo
# username:
# from_secret: docker_username
# tags:
# - ${DRONE_TAG}-linux-arm
# - ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}-linux-arm
# - ${DRONE_SEMVER_MAJOR}-linux-arm
# when:
# event:
# - tag
---
kind: pipeline
type: docker
@ -98,6 +142,9 @@ steps:
from_secret: docker_password
tags:
- latest
- ${DRONE_TAG}
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}
- ${DRONE_SEMVER_MAJOR}
trigger:
event:
@ -106,3 +153,4 @@ trigger:
depends_on:
- linux-amd64
- linux-arm64
# - linux-arm

View File

@ -1,23 +1,11 @@
##### this stage will download latest deb package
FROM alpine:latest as prep
FROM debian:11-slim
ARG HUGO_VERSION=0.111.3
ARG HUGO_ARCH=amd64
RUN \
apk -U add lastversion && \
wget $(lastversion --filter "hugo_extended_.*\-${HUGO_ARCH}\.deb$" --pre gohugoio/hugo --format assets ) -O /tmp/hugo.deb
##### final image
FROM debian:12-slim
COPY --from=prep /tmp/hugo.deb /tmp/hugo.deb
ADD "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${HUGO_ARCH}.deb" /tmp/hugo.deb
RUN \
apt update && \
DEBIAN_FRONTEND=noninteractive apt -y upgrade && \
apt install -y /tmp/hugo.deb && rm /tmp/hugo.deb
ENTRYPOINT [ "/usr/local/bin/hugo" ]

View File

@ -4,14 +4,6 @@
Simple container for hugo development
## available tags
| tag | description |
| ------------ | ----------------------------------- |
| latest | multi-arch manifest |
| latest-amd64 | latest build for amd64 architecture |
| latest-arm64 | latest build for arm64 architecture |
## build
```bash
@ -52,3 +44,4 @@ steps:
## TODO
- Auto build and update based on hugo version

View File

@ -1,13 +1,31 @@
image: docker.asperti.com/paspo/hugo:latest
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
-
image: docker.asperti.com/paspo/hugo:latest-amd64
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
-
image: docker.asperti.com/paspo/hugo:latest-arm64
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform:
variant: v8
architecture: arm64
os: linux
-
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform:
variant: v7
architecture: arm
os: linux
-
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform:
variant: v6
architecture: arm
os: linux