Compare commits
6 Commits
71bbba11cc
...
4fb84bc0af
Author | SHA1 | Date | |
---|---|---|---|
4fb84bc0af | |||
901f1162a8 | |||
6cd9ce42b6 | |||
02ec4dbe04 | |||
1b5c7fab00 | |||
d168e6aaa6 |
78
.drone.yml
78
.drone.yml
@ -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
|
|
||||||
|
18
Dockerfile
18
Dockerfile
@ -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" ]
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user