Compare commits

...

6 Commits

Author SHA1 Message Date
4fb84bc0af
always build latest hugo
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2024-05-02 09:48:54 +02:00
901f1162a8
removed useless container tags 2024-05-02 09:23:59 +02:00
6cd9ce42b6
armv7 removed 2024-05-02 09:17:10 +02:00
02ec4dbe04
lint 2024-05-02 09:15:25 +02:00
1b5c7fab00
debian upgrade 2024-05-02 09:14:25 +02:00
d168e6aaa6
os upgrade 2024-05-02 09:14:07 +02:00
4 changed files with 41 additions and 88 deletions

View File

@ -1,3 +1,4 @@
---
kind: pipeline kind: pipeline
type: docker type: docker
name: linux-amd64 name: linux-amd64
@ -33,9 +34,7 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
tags: tags:
- ${DRONE_TAG}-linux-amd64 - latest-amd64
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}-linux-amd64
- ${DRONE_SEMVER_MAJOR}-linux-amd64
when: when:
event: event:
- tag - tag
@ -76,75 +75,29 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
tags: tags:
- ${DRONE_TAG}-linux-arm64 - latest-arm64
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}-linux-arm64
- ${DRONE_SEMVER_MAJOR}-linux-arm64
when: when:
event: event:
- tag - 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 kind: pipeline
type: docker type: docker
name: manifest name: manifest
steps: steps:
- name: manifest - name: manifest
image: plugins/manifest image: plugins/manifest
settings: settings:
force_tag: true force_tag: true
ignore_missing: true ignore_missing: true
spec: manifest.tmpl spec: manifest.tmpl
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
from_secret: docker_password from_secret: docker_password
tags: tags:
- latest - latest
- ${DRONE_TAG}
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}
- ${DRONE_SEMVER_MAJOR}
trigger: trigger:
event: event:
@ -153,4 +106,3 @@ trigger:
depends_on: depends_on:
- linux-amd64 - linux-amd64
- linux-arm64 - linux-arm64
# - linux-arm

View File

@ -1,11 +1,23 @@
FROM debian:11-slim ##### this stage will download latest deb package
FROM alpine:latest as prep
ARG HUGO_VERSION=0.111.3
ARG HUGO_ARCH=amd64 ARG HUGO_ARCH=amd64
ADD "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${HUGO_ARCH}.deb" /tmp/hugo.deb 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
RUN \ RUN \
apt update && \
DEBIAN_FRONTEND=noninteractive apt -y upgrade && \
apt install -y /tmp/hugo.deb && rm /tmp/hugo.deb apt install -y /tmp/hugo.deb && rm /tmp/hugo.deb
ENTRYPOINT [ "/usr/local/bin/hugo" ] ENTRYPOINT [ "/usr/local/bin/hugo" ]

View File

@ -4,6 +4,14 @@
Simple container for hugo development 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 ## build
```bash ```bash
@ -44,4 +52,3 @@ steps:
## TODO ## TODO
- Auto build and update based on hugo version - Auto build and update based on hugo version

View File

@ -1,31 +1,13 @@
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} image: docker.asperti.com/paspo/hugo:latest
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests: manifests:
- -
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 image: docker.asperti.com/paspo/hugo:latest-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- -
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 image: docker.asperti.com/paspo/hugo:latest-arm64
platform: platform:
variant: v8 variant: v8
architecture: arm64 architecture: arm64
os: linux 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