37 Commits

Author SHA1 Message Date
1f55ff7cfa build: Revert to semi-working syntax
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 16:30:49 +02:00
ba4a0148ff build: Try different syntax (remove quotes)
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 15:44:45 +02:00
c177dbd03b build: Test different syntax for character escape
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 15:40:39 +02:00
2e8ce6cc00 build: Escape escape sequence characters
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 15:37:36 +02:00
7fd1cf73db build: Fix linebreak
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 15:35:09 +02:00
cf001cd0ce build:Test explicit tag format
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 15:32:53 +02:00
438b944011 build: Add missing variable export
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-22 13:43:53 +02:00
679a9457b5 build:Fix variable name
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-22 12:44:13 +02:00
8b4a1e380c build:Test semantic-release + build flow
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-22 12:19:10 +02:00
0468cd6269 build:Debug echo to file
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-22 12:11:14 +02:00
b808397d47 build:Fix var substitution
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-22 12:08:01 +02:00
8fd0136bb7 build:debug brace mismatch #2
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-22 12:06:14 +02:00
479d896599 build:Debug brace mismatch
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-05-22 12:05:32 +02:00
263f156eb1 build:Try different syntax
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-05-22 11:55:28 +02:00
f1dfc83d7c build:Revert back to cli arguments while specifying custom command
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-05-22 09:23:44 +02:00
5b950a3834 build:Test with configuration in .releaserc.json
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-22 09:09:50 +02:00
978f39d45b build: Test different semantic-release plugins
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-21 18:27:34 +02:00
9b9ab6b784 build:Skip build on tag
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-21 18:09:22 +02:00
24dca2755a fix: Run semantic-release with different drone variable as input
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-21 18:02:00 +02:00
0d1db2f29f feat: Test semantic-release dry-run #2
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-21 17:51:04 +02:00
cce39a5bb7 fix:Test semantic release dry-run
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
2023-05-20 15:18:23 +02:00
823cc467fa Explicitly install semantic-release plugins #2
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 14:32:47 +02:00
9cb89bf055 Try different syntax
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 14:30:38 +02:00
358cbe39ea Fix quote
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 14:28:31 +02:00
0fee2df2a6 Explicitly install semantic-release plugins
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-05-20 13:44:54 +02:00
e4e58e4789 Disable npm plugin
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 13:31:48 +02:00
75158a8a5b Fix variable substitution
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 13:26:49 +02:00
c83d541a0d Remove redundant parameter
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 13:24:20 +02:00
a46610f828 Add git credentials
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 13:22:20 +02:00
fe5147bd2e Override branch during semantic-release dry-run
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 12:58:44 +02:00
6d168f0517 Add semantic-release prerequisites
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 12:48:40 +02:00
68445ee13f Testing semantic-release
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 12:44:32 +02:00
31b21c9b7a Upgrade node template OS version
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-19 12:19:42 +02:00
e03cd20d65 Replay upstream changes;Upgrade to latest minor K8s version
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-19 11:38:53 +02:00
1c19708855 Increase default retries;Add healthcheck
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 16:51:17 +01:00
942c13dde7 Improve console healthchecks
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 11:42:34 +01:00
439223c56e Build n-1 version
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-22 08:54:45 +01:00
9 changed files with 85 additions and 55 deletions

View File

@ -10,6 +10,11 @@ volumes:
claim:
name: flexvolsmb-drone-scratch
trigger:
event:
exclude:
- tag
steps:
- name: Debugging information
image: bv11-cr01.bessems.eu/library/packer-extended
@ -32,9 +37,44 @@ steps:
packer/preseed/UbuntuServer22.04/user-data \
scripts
- name: Install Ansible Galaxy collections
- name: Semantic Release (Dry-run)
depends_on:
- Linting
image: bv11-cr01.bessems.eu/proxy/library/node:20-slim
pull: always
commands:
- |
apt-get update
- |
apt-get install -y --no-install-recommends \
git-core \
ca-certificates
- |
npm install \
semantic-release \
@semantic-release/commit-analyzer \
@semantic-release/exec \
- |
export GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
- |
npx semantic-release \
--package @semantic-release/exec \
--package semantic-release \
--branches ${DRONE_BRANCH} \
--tag-format "K8s_1.25.9-v\$${version}" \
--dry-run \
--plugins @semantic-release/commit-analyzer,@semantic-release/exec \
--analyzeCommits @semantic-release/commit-analyzer \
--verifyRelease @semantic-release/exec \
--verifyReleaseCmd 'echo "$${nextRelease.version}" > .version'
environment:
GIT_APIKEY:
from_secret: git_apikey
GIT_USERNAME: djpbessems
- name: Install Ansible Galaxy collections
depends_on:
- Semantic Release (Dry-run)
image: bv11-cr01.bessems.eu/library/packer-extended
pull: always
commands:
@ -42,9 +82,6 @@ steps:
ansible-galaxy collection install \
-r ansible/requirements.yml \
-p ./ansible/collections
volumes:
- name: scratch
path: /scratch
- name: Kubernetes Bootstrap Appliance
depends_on:
@ -57,6 +94,7 @@ steps:
packer/preseed/UbuntuServer22.04/user-data
- |
export K8S_VERSION=$(yq '.components.clusterapi.workload.version.k8s' < ./ansible/vars/metacluster.yml)
export NEXT_RELEASE_VERSION=$(cat .version)
- |
packer init -upgrade \
./packer
@ -71,6 +109,7 @@ steps:
-var ssh_password=$${SSH_PASSWORD} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var k8s_version=$K8S_VERSION \
-var next_release_version=$NEXT_RELEASE_VERSION \
./packer
- |
packer build \
@ -84,6 +123,7 @@ steps:
-var ssh_password=$${SSH_PASSWORD} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var k8s_version=$K8S_VERSION \
-var next_release_version=$NEXT_RELEASE_VERSION \
./packer
environment:
DOCKER_USERNAME:
@ -116,6 +156,7 @@ steps:
packer/preseed/UbuntuServer22.04/user-data
- |
export K8S_VERSION=$(yq '.components.clusterapi.workload.version.k8s' < ./ansible/vars/metacluster.yml)
export NEXT_RELEASE_VERSION=$(cat .version)
- |
packer init -upgrade \
./packer
@ -130,6 +171,7 @@ steps:
-var ssh_password=$${SSH_PASSWORD} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var k8s_version=$K8S_VERSION \
-var next_release_version=$NEXT_RELEASE_VERSION \
./packer
- |
packer build \
@ -143,6 +185,7 @@ steps:
-var ssh_password=$${SSH_PASSWORD} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var k8s_version=$K8S_VERSION \
-var next_release_version=$NEXT_RELEASE_VERSION \
./packer
environment:
DOCKER_USERNAME:

11
.releaserc.json.DISABLED Normal file
View File

@ -0,0 +1,11 @@
{
"plugins": [
["@semantic-release/commit-analyzer"],
["@semantic-release/release-notes-generator"],
["@semantic-release/exec", {
"prepareCmd": "export SEMANTICRELEASE_NEXTRELEASEVERSION=${nextRelease.version}",
"publishCmd": "echo $SEMANTICRELEASE_NEXTRELEASEVERSION"
}],
["@semantic-release/git"]
]
}

View File

@ -1,14 +0,0 @@
import netaddr
def netaddr_iter_iprange(ip_start, ip_end):
return [str(ip) for ip in netaddr.iter_iprange(ip_start, ip_end)]
class FilterModule(object):
''' Ansible filter. Interface to netaddr methods.
https://pypi.org/project/netaddr/
'''
def filters(self):
return {
'netaddr_iter_iprange': netaddr_iter_iprange
}

View File

@ -55,7 +55,6 @@
force_basic_auth: yes
body:
name: token_init_{{ lookup('password', '/dev/null length=5 chars=ascii_letters,digits') }}
scopes: ["write:public_key","write:org"]
register: gitea_api_token
- name: Retrieve existing gitea configuration

View File

@ -42,11 +42,6 @@ patchesStrategicMerge:
kubeadmConfigSpec:
clusterConfiguration:
imageRepository: registry.{{ _template.network.fqdn }}/kubeadm
ntp:
enabled: true
servers:
- 0.nl.pool.ntp.org
- 1.nl.pool.ntp.org
- |-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
@ -58,11 +53,6 @@ patchesStrategicMerge:
spec:
clusterConfiguration:
imageRepository: registry.{{ _template.network.fqdn }}/kubeadm
ntp:
enabled: true
servers:
- 0.nl.pool.ntp.org
- 1.nl.pool.ntp.org
- |-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate

View File

@ -1,7 +1,7 @@
platform:
k3s:
version: v1.26.5+k3s1
version: v1.25.9+k3s1
packaged_components:
- name: traefik
@ -56,7 +56,7 @@ components:
argo-cd:
helm:
version: 5.34.6 # (= ArgoCD v2.7.3)
version: 5.27.4 # (= ArgoCD v2.6.7)
chart: argo/argo-cd
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
chart_values: !unsafe |
@ -99,7 +99,7 @@ components:
cert-manager:
helm:
version: 1.12.1
version: 1.11.0
chart: jetstack/cert-manager
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
# chart_values: !unsafe |
@ -109,19 +109,19 @@ components:
management:
version:
# Must match the version referenced at `dependencies.static_binaries[.filename==clusterctl].url`
base: v1.4.1
base: v1.4.0
# Must match the version referenced at `components.cert-manager.helm.version`
cert_manager: v1.11.1
infrastructure_vsphere: v1.6.1
cert_manager: v1.11.0
infrastructure_vsphere: v1.6.0
ipam_incluster: v0.1.0-alpha.2
# Refer to `https://console.cloud.google.com/gcr/images/cloud-provider-vsphere/GLOBAL/cpi/release/manager` for available tags
cpi_vsphere: v1.26.2
cpi_vsphere: v1.25.2
workload:
version:
calico: v3.26.0
k8s: v1.26.5
calico: v3.25.0
k8s: v1.25.9
node_template:
url: https://{{ repo_username }}:{{ repo_password }}@sn.itch.fyi/Repository/rel/ubuntu-2204-kube-v1.26.5.ova
url: https://{{ repo_username }}:{{ repo_password }}@sn.itch.fyi/Repository/rel/ubuntu-2204-kube-v1.25.9.ova
# dex:
# helm:
@ -173,7 +173,7 @@ components:
gitea:
helm:
version: v8.3.0 # (= Gitea v1.19.3)
version: v7.0.2 # (= Gitea v1.18.3)
chart: gitea-charts/gitea
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | sed '/:/!s/$/:latest/'
chart_values: !unsafe |
@ -204,7 +204,7 @@ components:
harbor:
helm:
version: 1.12.1 # (= Harbor v2.8.1)
version: 1.11.0 # (= Harbor v2.7.0)
chart: harbor/harbor
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
chart_values: !unsafe |
@ -259,7 +259,7 @@ components:
kube-prometheus-stack:
helm:
version: 46.5.0 # (= Prometheus version v0.65.1)
version: 45.2.0
chart: prometheus-community/kube-prometheus-stack
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
chart_values: !unsafe |
@ -270,11 +270,11 @@ components:
kubevip:
# Must match the version referenced at `dependencies.container_images`
version: v0.6.0
version: v0.5.8
longhorn:
helm:
version: 1.4.2
version: 1.4.1
chart: longhorn/longhorn
parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag'
chart_values: !unsafe |
@ -290,7 +290,7 @@ components:
step-certificates:
helm:
version: 1.23.2+5 # (= step-ca v0.23.2)
version: 1.23.0
chart: smallstep/step-certificates
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sed '/:/!s/$/:latest/' | sort -u
chart_values: !unsafe |
@ -320,7 +320,7 @@ dependencies:
container_images:
# This should match the image tag referenced at `platform.packaged_components[.name==traefik].config`
- busybox:1
- ghcr.io/kube-vip/kube-vip:v0.6.0
- ghcr.io/kube-vip/kube-vip:v0.5.8
# The following list is generated by running the following commands:
# $ clusterctl init -i vsphere:<version> [...]
# $ clusterctl generate cluster <name> [...] | yq eval '.data.data' | yq --no-doc eval '.. | .image? | select(.)' | sort -u
@ -334,25 +334,25 @@ dependencies:
static_binaries:
- filename: clusterctl
url: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.1/clusterctl-linux-amd64
url: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.0/clusterctl-linux-amd64
- filename: govc
url: https://github.com/vmware/govmomi/releases/download/v0.30.4/govc_Linux_x86_64.tar.gz
url: https://github.com/vmware/govmomi/releases/download/v0.29.0/govc_Linux_x86_64.tar.gz
archive: compressed
- filename: helm
url: https://get.helm.sh/helm-v3.12.0-linux-amd64.tar.gz
url: https://get.helm.sh/helm-v3.10.2-linux-amd64.tar.gz
archive: compressed
extra_opts: --strip-components=1
- filename: kubectl-slice
url: https://github.com/patrickdappollonio/kubectl-slice/releases/download/v1.2.6/kubectl-slice_linux_x86_64.tar.gz
url: https://github.com/patrickdappollonio/kubectl-slice/releases/download/v1.2.5/kubectl-slice_linux_x86_64.tar.gz
archive: compressed
- filename: skopeo
url: https://code.spamasaurus.com/api/packages/djpbessems/generic/skopeo/v1.12.0/skopeo_linux_amd64
- filename: step
url: https://dl.step.sm/gh-release/cli/gh-release-header/v0.23.2/step_linux_0.23.2_amd64.tar.gz
url: https://dl.step.sm/gh-release/cli/gh-release-header/v0.23.0/step_linux_0.23.0_amd64.tar.gz
archive: compressed
extra_opts: --strip-components=2
- filename: yq
url: http://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64
url: http://github.com/mikefarah/yq/releases/download/v4.30.5/yq_linux_amd64
packages:
apt:

View File

@ -9,7 +9,7 @@ downstream:
helm_charts:
longhorn:
version: 1.4.2
version: 1.4.1
chart: longhorn/longhorn
namespace: longhorn-system
parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag'
@ -19,7 +19,7 @@ downstream:
defaultDataPath: /mnt/blockstorage
sealed-secrets:
version: 2.9.0 # (= Sealed Secrets v0.21.0)
version: 2.8.1 # (= Sealed Secrets v0.20.2)
chart: sealed-secrets/sealed-secrets
namespace: sealed-secrets
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'

View File

@ -45,7 +45,7 @@ build {
" -ManifestFileName '/scratch/bld_${var.vm_name}_${source.name}.mf'",
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",
" '/scratch/bld_${var.vm_name}_${source.name}.ovf' \\",
" /output/airgapped-k8s-${var.k8s_version}.${source.name}.ova"
" /output/airgapped-k8s-${var.next_release_version}+${var.k8s_version}-${source.name}.ova"
]
}
}

View File

@ -35,3 +35,4 @@ variable "docker_password" {
}
variable "k8s_version" {}
variable "next_release_version" {}