refactor: fetch theme as module
This commit is contained in:
parent
6b9d26a883
commit
f3ff91370d
10 changed files with 27 additions and 105 deletions
|
@ -1,62 +0,0 @@
|
||||||
version: v0
|
|
||||||
runs:
|
|
||||||
- name: Build
|
|
||||||
tasks:
|
|
||||||
- name: Checkout code
|
|
||||||
runtime:
|
|
||||||
type: pod
|
|
||||||
containers:
|
|
||||||
- image: docker.io/alpine/git
|
|
||||||
steps:
|
|
||||||
- clone:
|
|
||||||
recurse_submodules: true
|
|
||||||
- save_to_workspace:
|
|
||||||
contents:
|
|
||||||
- source_dir: .
|
|
||||||
dest_dir: .
|
|
||||||
paths:
|
|
||||||
- '**'
|
|
||||||
- name: Build
|
|
||||||
runtime:
|
|
||||||
containers:
|
|
||||||
- image: gcr.io/kaniko-project/executor:debug
|
|
||||||
environment:
|
|
||||||
DOCKERAUTH:
|
|
||||||
from_variable: dockerauth
|
|
||||||
shell: /busybox/sh
|
|
||||||
steps:
|
|
||||||
- restore_workspace:
|
|
||||||
dest_dir: .
|
|
||||||
- run:
|
|
||||||
name: generate docker config
|
|
||||||
command: |
|
|
||||||
cat << EOF > /kaniko/.docker/config.json
|
|
||||||
{
|
|
||||||
"auths": {
|
|
||||||
"https://code.icb4dc0.de": { "auth" : "$DOCKERAUTH" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
- run:
|
|
||||||
name: Build container image
|
|
||||||
command: |
|
|
||||||
/kaniko/executor \
|
|
||||||
--destination code.icb4dc0.de/prskr/blog:$AGOLA_GIT_COMMITSHA \
|
|
||||||
--destination code.icb4dc0.de/prskr/blog:latest \
|
|
||||||
--context dir:///root/project/ \
|
|
||||||
--dockerfile /root/project/Dockerfile
|
|
||||||
depends:
|
|
||||||
- Checkout code
|
|
||||||
- name: Deploy
|
|
||||||
runtime:
|
|
||||||
containers:
|
|
||||||
- image: docker.io/alpine/helm
|
|
||||||
service_account_name: agola
|
|
||||||
steps:
|
|
||||||
- restore_workspace:
|
|
||||||
dest_dir: .
|
|
||||||
- run:
|
|
||||||
name: Deploy Helm chart
|
|
||||||
command: helm upgrade --set image.tag=$AGOLA_GIT_COMMITSHA --install --namespace blog blog deploy/helm
|
|
||||||
depends:
|
|
||||||
- Build
|
|
|
@ -24,5 +24,5 @@ run:
|
||||||
echo "{\"auths\": {\"https://code.icb4dc0.de\": {\"auth\" : \"$(printf '%s:%s' $GITEA_USER $GITEA_TOKEN | base64)\" }}}" > /kaniko/.docker/config.json
|
echo "{\"auths\": {\"https://code.icb4dc0.de\": {\"auth\" : \"$(printf '%s:%s' $GITEA_USER $GITEA_TOKEN | base64)\" }}}" > /kaniko/.docker/config.json
|
||||||
/kaniko/executor \
|
/kaniko/executor \
|
||||||
--destination code.icb4dc0.de/prskr/blog:latest \
|
--destination code.icb4dc0.de/prskr/blog:latest \
|
||||||
--destination code.icb4dc0.de/prskr/blog:$(cat .git/refs/heads/main) \
|
--destination code.icb4dc0.de/prskr/blog:$(cat .git/ref) \
|
||||||
--context .
|
--context .
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
||||||
[submodule "themes/anubis"]
|
|
||||||
path = themes/anubis
|
|
||||||
url = https://github.com/mitrichius/hugo-theme-anubis.git
|
|
|
@ -1,8 +1,8 @@
|
||||||
FROM docker.io/alpine:latest as builder
|
FROM docker.io/golang:1.19-alpine as builder
|
||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
|
|
||||||
RUN apk add -U --no-cache hugo
|
RUN apk add -U --no-cache hugo git
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
baseURL = 'https://www.icb4dc0.de/'
|
baseURL = 'https://www.icb4dc0.de/'
|
||||||
languageCode = 'en-us'
|
languageCode = 'en-us'
|
||||||
title = 'icb4dc0.de'
|
title = 'icb4dc0.de'
|
||||||
theme = "anubis"
|
theme = ['github.com/Mitrichius/hugo-theme-anubis']
|
||||||
paginate = 10
|
paginate = 10
|
||||||
enableEmoji = true
|
enableEmoji = true
|
||||||
disqusShortname = ""
|
disqusShortname = ""
|
||||||
|
|
|
@ -5,9 +5,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "web.labels" . | nindent 4 }}
|
{{- include "web.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
{{- if not .Values.autoscaling.enabled }}
|
|
||||||
replicas: {{ .Values.replicaCount }}
|
replicas: {{ .Values.replicaCount }}
|
||||||
{{- end }}
|
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "web.selectorLabels" . | nindent 6 }}
|
{{- include "web.selectorLabels" . | nindent 6 }}
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
# Default values for web.
|
|
||||||
# This is a YAML-formatted file.
|
|
||||||
# Declare variables to be passed into your templates.
|
|
||||||
|
|
||||||
replicaCount: 2
|
replicaCount: 2
|
||||||
|
|
||||||
image:
|
image:
|
||||||
|
@ -19,13 +15,14 @@ podAnnotations: {}
|
||||||
podSecurityContext: {}
|
podSecurityContext: {}
|
||||||
# fsGroup: 2000
|
# fsGroup: 2000
|
||||||
|
|
||||||
securityContext: {}
|
securityContext:
|
||||||
# capabilities:
|
capabilities:
|
||||||
# drop:
|
drop:
|
||||||
# - ALL
|
- ALL
|
||||||
# readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
# runAsNonRoot: true
|
allowPrivilegeEscalation: false
|
||||||
# runAsUser: 1000
|
runAsNonRoot: true
|
||||||
|
runAsUser: 65532
|
||||||
|
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
@ -33,7 +30,7 @@ service:
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
className: ""
|
className: "traefik"
|
||||||
annotations: {}
|
annotations: {}
|
||||||
# kubernetes.io/ingress.class: nginx
|
# kubernetes.io/ingress.class: nginx
|
||||||
# kubernetes.io/tls-acme: "true"
|
# kubernetes.io/tls-acme: "true"
|
||||||
|
@ -43,28 +40,14 @@ ingress:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: ImplementationSpecific
|
pathType: ImplementationSpecific
|
||||||
tls: []
|
tls: []
|
||||||
# - secretName: chart-example-tls
|
|
||||||
# hosts:
|
|
||||||
# - chart-example.local
|
|
||||||
|
|
||||||
resources: {}
|
resources:
|
||||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
limits:
|
||||||
# choice for the user. This also increases chances charts run on environments with little
|
cpu: 100m
|
||||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
memory: 60Mi
|
||||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
requests:
|
||||||
# limits:
|
cpu: 50m
|
||||||
# cpu: 100m
|
memory: 20Mi
|
||||||
# memory: 128Mi
|
|
||||||
# requests:
|
|
||||||
# cpu: 100m
|
|
||||||
# memory: 128Mi
|
|
||||||
|
|
||||||
autoscaling:
|
|
||||||
enabled: false
|
|
||||||
minReplicas: 1
|
|
||||||
maxReplicas: 100
|
|
||||||
targetCPUUtilizationPercentage: 80
|
|
||||||
# targetMemoryUtilizationPercentage: 80
|
|
||||||
|
|
||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
|
|
||||||
|
|
5
go.mod
Normal file
5
go.mod
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
module code.icb4dc0.de/prskr/blog
|
||||||
|
|
||||||
|
go 1.19
|
||||||
|
|
||||||
|
require github.com/Mitrichius/hugo-theme-anubis v0.0.0-20220725170731-d4ba47cd2196 // indirect
|
2
go.sum
Normal file
2
go.sum
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
github.com/Mitrichius/hugo-theme-anubis v0.0.0-20220725170731-d4ba47cd2196 h1:TzahMQaJXpezO9D2iQHnifGWPUn+41IWgYNBg/wNtQE=
|
||||||
|
github.com/Mitrichius/hugo-theme-anubis v0.0.0-20220725170731-d4ba47cd2196/go.mod h1:FKD3NbdsQzL+cXsC3x99XD/t/Rd5EyhDlNBAxQhULbo=
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 8e618548dad3553e196aeae334900d9afe76256e
|
|
Loading…
Reference in a new issue