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
|
||||
/kaniko/executor \
|
||||
--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 .
|
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
|
||||
|
||||
RUN apk add -U --no-cache hugo
|
||||
RUN apk add -U --no-cache hugo git
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
baseURL = 'https://www.icb4dc0.de/'
|
||||
languageCode = 'en-us'
|
||||
title = 'icb4dc0.de'
|
||||
theme = "anubis"
|
||||
theme = ['github.com/Mitrichius/hugo-theme-anubis']
|
||||
paginate = 10
|
||||
enableEmoji = true
|
||||
disqusShortname = ""
|
||||
|
|
|
@ -5,9 +5,7 @@ metadata:
|
|||
labels:
|
||||
{{- include "web.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- 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
|
||||
|
||||
image:
|
||||
|
@ -19,13 +15,14 @@ podAnnotations: {}
|
|||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65532
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
@ -33,7 +30,7 @@ service:
|
|||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: ""
|
||||
className: "traefik"
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
|
@ -43,28 +40,14 @@ ingress:
|
|||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 60Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 20Mi
|
||||
|
||||
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