build:Test semantic-release + build flow
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
0468cd6269
commit
8b4a1e380c
303
.drone.yml
303
.drone.yml
@ -66,173 +66,164 @@ steps:
|
|||||||
--analyzeCommits @semantic-release/commit-analyzer \
|
--analyzeCommits @semantic-release/commit-analyzer \
|
||||||
--verifyRelease @semantic-release/exec \
|
--verifyRelease @semantic-release/exec \
|
||||||
--verifyReleaseCmd 'echo "$${nextRelease.version}" > .version'
|
--verifyReleaseCmd 'echo "$${nextRelease.version}" > .version'
|
||||||
- |
|
|
||||||
ls -lash
|
|
||||||
environment:
|
environment:
|
||||||
GIT_APIKEY:
|
GIT_APIKEY:
|
||||||
from_secret: git_apikey
|
from_secret: git_apikey
|
||||||
GIT_USERNAME: djpbessems
|
GIT_USERNAME: djpbessems
|
||||||
|
|
||||||
- name: Print version
|
- name: Install Ansible Galaxy collections
|
||||||
depends_on:
|
depends_on:
|
||||||
- Semantic Release (Dry-run)
|
- Semantic Release (Dry-run)
|
||||||
image: bv11-cr01.bessems.eu/library/packer-extended
|
image: bv11-cr01.bessems.eu/library/packer-extended
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
cat .version
|
ansible-galaxy collection install \
|
||||||
|
-r ansible/requirements.yml \
|
||||||
|
-p ./ansible/collections
|
||||||
|
|
||||||
# - name: Install Ansible Galaxy collections
|
- name: Kubernetes Bootstrap Appliance
|
||||||
# depends_on:
|
depends_on:
|
||||||
# - Semantic Release (Dry-run)
|
- Install Ansible Galaxy collections
|
||||||
# image: bv11-cr01.bessems.eu/library/packer-extended
|
image: bv11-cr01.bessems.eu/library/packer-extended
|
||||||
# pull: always
|
pull: always
|
||||||
# commands:
|
commands:
|
||||||
# - |
|
- |
|
||||||
# ansible-galaxy collection install \
|
sed -i -e "s/<<img-password>>/$${SSH_PASSWORD}/g" \
|
||||||
# -r ansible/requirements.yml \
|
packer/preseed/UbuntuServer22.04/user-data
|
||||||
# -p ./ansible/collections
|
- |
|
||||||
# volumes:
|
export K8S_VERSION=$(yq '.components.clusterapi.workload.version.k8s' < ./ansible/vars/metacluster.yml)
|
||||||
# - name: scratch
|
export NEXT_RELEASE_VERSION=$(cat .version)
|
||||||
# path: /scratch
|
- |
|
||||||
|
packer init -upgrade \
|
||||||
|
./packer
|
||||||
|
- |
|
||||||
|
packer validate \
|
||||||
|
-only=vsphere-iso.bootstrap \
|
||||||
|
-var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
|
||||||
|
-var docker_username=$${DOCKER_USERNAME} \
|
||||||
|
-var docker_password=$${DOCKER_PASSWORD} \
|
||||||
|
-var repo_username=$${REPO_USERNAME} \
|
||||||
|
-var repo_password=$${REPO_PASSWORD} \
|
||||||
|
-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 \
|
||||||
|
-on-error=cleanup -timestamp-ui \
|
||||||
|
-only=vsphere-iso.bootstrap \
|
||||||
|
-var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
|
||||||
|
-var docker_username=$${DOCKER_USERNAME} \
|
||||||
|
-var docker_password=$${DOCKER_PASSWORD} \
|
||||||
|
-var repo_username=$${REPO_USERNAME} \
|
||||||
|
-var repo_password=$${REPO_PASSWORD} \
|
||||||
|
-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:
|
||||||
|
from_secret: docker_username
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
# PACKER_LOG: 1
|
||||||
|
REPO_USERNAME:
|
||||||
|
from_secret: repo_username
|
||||||
|
REPO_PASSWORD:
|
||||||
|
from_secret: repo_password
|
||||||
|
SSH_PASSWORD:
|
||||||
|
from_secret: ssh_password
|
||||||
|
VSPHERE_PASSWORD:
|
||||||
|
from_secret: vsphere_password
|
||||||
|
volumes:
|
||||||
|
- name: output
|
||||||
|
path: /output
|
||||||
|
- name: scratch
|
||||||
|
path: /scratch
|
||||||
|
|
||||||
# - name: Kubernetes Bootstrap Appliance
|
- name: Kubernetes Upgrade Appliance
|
||||||
# depends_on:
|
depends_on:
|
||||||
# - Install Ansible Galaxy collections
|
- Install Ansible Galaxy collections
|
||||||
# image: bv11-cr01.bessems.eu/library/packer-extended
|
image: bv11-cr01.bessems.eu/library/packer-extended
|
||||||
# pull: always
|
pull: alwaysquery(
|
||||||
# commands:
|
commands:
|
||||||
# - |
|
- |
|
||||||
# sed -i -e "s/<<img-password>>/$${SSH_PASSWORD}/g" \
|
sed -i -e "s/<<img-password>>/$${SSH_PASSWORD}/g" \
|
||||||
# packer/preseed/UbuntuServer22.04/user-data
|
packer/preseed/UbuntuServer22.04/user-data
|
||||||
# - |
|
- |
|
||||||
# export K8S_VERSION=$(yq '.components.clusterapi.workload.version.k8s' < ./ansible/vars/metacluster.yml)
|
export K8S_VERSION=$(yq '.components.clusterapi.workload.version.k8s' < ./ansible/vars/metacluster.yml)
|
||||||
# - |
|
- |
|
||||||
# packer init -upgrade \
|
packer init -upgrade \
|
||||||
# ./packer
|
./packer
|
||||||
# - |
|
- |
|
||||||
# packer validate \
|
packer validate \
|
||||||
# -only=vsphere-iso.bootstrap \
|
-only=vsphere-iso.upgrade \
|
||||||
# -var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
|
-var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
|
||||||
# -var docker_username=$${DOCKER_USERNAME} \
|
-var docker_username=$${DOCKER_USERNAME} \
|
||||||
# -var docker_password=$${DOCKER_PASSWORD} \
|
-var docker_password=$${DOCKER_PASSWORD} \
|
||||||
# -var repo_username=$${REPO_USERNAME} \
|
-var repo_username=$${REPO_USERNAME} \
|
||||||
# -var repo_password=$${REPO_PASSWORD} \
|
-var repo_password=$${REPO_PASSWORD} \
|
||||||
# -var ssh_password=$${SSH_PASSWORD} \
|
-var ssh_password=$${SSH_PASSWORD} \
|
||||||
# -var vsphere_password=$${VSPHERE_PASSWORD} \
|
-var vsphere_password=$${VSPHERE_PASSWORD} \
|
||||||
# -var k8s_version=$K8S_VERSION \
|
-var k8s_version=$K8S_VERSION \
|
||||||
# ./packer
|
-var next_release_version=$NEXT_RELEASE_VERSION \
|
||||||
# - |
|
./packer
|
||||||
# packer build \
|
- |
|
||||||
# -on-error=cleanup -timestamp-ui \
|
packer build \
|
||||||
# -only=vsphere-iso.bootstrap \
|
-on-error=cleanup -timestamp-ui \
|
||||||
# -var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
|
-only=vsphere-iso.upgrade \
|
||||||
# -var docker_username=$${DOCKER_USERNAME} \
|
-var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
|
||||||
# -var docker_password=$${DOCKER_PASSWORD} \
|
-var docker_username=$${DOCKER_USERNAME} \
|
||||||
# -var repo_username=$${REPO_USERNAME} \
|
-var docker_password=$${DOCKER_PASSWORD} \
|
||||||
# -var repo_password=$${REPO_PASSWORD} \
|
-var repo_username=$${REPO_USERNAME} \
|
||||||
# -var ssh_password=$${SSH_PASSWORD} \
|
-var repo_password=$${REPO_PASSWORD} \
|
||||||
# -var vsphere_password=$${VSPHERE_PASSWORD} \
|
-var ssh_password=$${SSH_PASSWORD} \
|
||||||
# -var k8s_version=$K8S_VERSION \
|
-var vsphere_password=$${VSPHERE_PASSWORD} \
|
||||||
# ./packer
|
-var k8s_version=$K8S_VERSION \
|
||||||
# environment:
|
-var next_release_version=$NEXT_RELEASE_VERSION \
|
||||||
# DOCKER_USERNAME:
|
./packer
|
||||||
# from_secret: docker_username
|
environment:
|
||||||
# DOCKER_PASSWORD:
|
DOCKER_USERNAME:
|
||||||
# from_secret: docker_password
|
from_secret: docker_username
|
||||||
# # PACKER_LOG: 1
|
DOCKER_PASSWORD:
|
||||||
# REPO_USERNAME:
|
from_secret: docker_password
|
||||||
# from_secret: repo_username
|
# PACKER_LOG: 1
|
||||||
# REPO_PASSWORD:
|
REPO_USERNAME:
|
||||||
# from_secret: repo_password
|
from_secret: repo_username
|
||||||
# SSH_PASSWORD:
|
REPO_PASSWORD:
|
||||||
# from_secret: ssh_password
|
from_secret: repo_password
|
||||||
# VSPHERE_PASSWORD:
|
SSH_PASSWORD:
|
||||||
# from_secret: vsphere_password
|
from_secret: ssh_password
|
||||||
# volumes:
|
VSPHERE_PASSWORD:
|
||||||
# - name: output
|
from_secret: vsphere_password
|
||||||
# path: /output
|
volumes:
|
||||||
# - name: scratch
|
- name: output
|
||||||
# path: /scratch
|
path: /output
|
||||||
|
- name: scratch
|
||||||
|
path: /scratch
|
||||||
|
|
||||||
# - name: Kubernetes Upgrade Appliance
|
- name: Remove temporary resources
|
||||||
# depends_on:
|
depends_on:
|
||||||
# - Install Ansible Galaxy collections
|
- Kubernetes Bootstrap Appliance
|
||||||
# image: bv11-cr01.bessems.eu/library/packer-extended
|
- Kubernetes Upgrade Appliance
|
||||||
# pull: alwaysquery(
|
image: bv11-cr01.bessems.eu/library/packer-extended
|
||||||
# commands:
|
commands:
|
||||||
# - |
|
- |
|
||||||
# sed -i -e "s/<<img-password>>/$${SSH_PASSWORD}/g" \
|
pwsh -file scripts/Remove-Resources.ps1 \
|
||||||
# packer/preseed/UbuntuServer22.04/user-data
|
-VMName $DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
|
||||||
# - |
|
-VSphereFQDN 'bv11-vc.bessems.lan' \
|
||||||
# export K8S_VERSION=$(yq '.components.clusterapi.workload.version.k8s' < ./ansible/vars/metacluster.yml)
|
-VSphereUsername 'administrator@vsphere.local' \
|
||||||
# - |
|
-VSpherePassword $${VSPHERE_PASSWORD}
|
||||||
# packer init -upgrade \
|
environment:
|
||||||
# ./packer
|
VSPHERE_PASSWORD:
|
||||||
# - |
|
from_secret: vsphere_password
|
||||||
# packer validate \
|
volumes:
|
||||||
# -only=vsphere-iso.upgrade \
|
- name: scratch
|
||||||
# -var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
|
path: /scratch
|
||||||
# -var docker_username=$${DOCKER_USERNAME} \
|
when:
|
||||||
# -var docker_password=$${DOCKER_PASSWORD} \
|
status:
|
||||||
# -var repo_username=$${REPO_USERNAME} \
|
- success
|
||||||
# -var repo_password=$${REPO_PASSWORD} \
|
- failure
|
||||||
# -var ssh_password=$${SSH_PASSWORD} \
|
|
||||||
# -var vsphere_password=$${VSPHERE_PASSWORD} \
|
|
||||||
# -var k8s_version=$K8S_VERSION \
|
|
||||||
# ./packer
|
|
||||||
# - |
|
|
||||||
# packer build \
|
|
||||||
# -on-error=cleanup -timestamp-ui \
|
|
||||||
# -only=vsphere-iso.upgrade \
|
|
||||||
# -var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
|
|
||||||
# -var docker_username=$${DOCKER_USERNAME} \
|
|
||||||
# -var docker_password=$${DOCKER_PASSWORD} \
|
|
||||||
# -var repo_username=$${REPO_USERNAME} \
|
|
||||||
# -var repo_password=$${REPO_PASSWORD} \
|
|
||||||
# -var ssh_password=$${SSH_PASSWORD} \
|
|
||||||
# -var vsphere_password=$${VSPHERE_PASSWORD} \
|
|
||||||
# -var k8s_version=$K8S_VERSION \
|
|
||||||
# ./packer
|
|
||||||
# environment:
|
|
||||||
# DOCKER_USERNAME:
|
|
||||||
# from_secret: docker_username
|
|
||||||
# DOCKER_PASSWORD:
|
|
||||||
# from_secret: docker_password
|
|
||||||
# # PACKER_LOG: 1
|
|
||||||
# REPO_USERNAME:
|
|
||||||
# from_secret: repo_username
|
|
||||||
# REPO_PASSWORD:
|
|
||||||
# from_secret: repo_password
|
|
||||||
# SSH_PASSWORD:
|
|
||||||
# from_secret: ssh_password
|
|
||||||
# VSPHERE_PASSWORD:
|
|
||||||
# from_secret: vsphere_password
|
|
||||||
# volumes:
|
|
||||||
# - name: output
|
|
||||||
# path: /output
|
|
||||||
# - name: scratch
|
|
||||||
# path: /scratch
|
|
||||||
|
|
||||||
# - name: Remove temporary resources
|
|
||||||
# depends_on:
|
|
||||||
# - Kubernetes Bootstrap Appliance
|
|
||||||
# - Kubernetes Upgrade Appliance
|
|
||||||
# image: bv11-cr01.bessems.eu/library/packer-extended
|
|
||||||
# commands:
|
|
||||||
# - |
|
|
||||||
# pwsh -file scripts/Remove-Resources.ps1 \
|
|
||||||
# -VMName $DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
|
|
||||||
# -VSphereFQDN 'bv11-vc.bessems.lan' \
|
|
||||||
# -VSphereUsername 'administrator@vsphere.local' \
|
|
||||||
# -VSpherePassword $${VSPHERE_PASSWORD}
|
|
||||||
# environment:
|
|
||||||
# VSPHERE_PASSWORD:
|
|
||||||
# from_secret: vsphere_password
|
|
||||||
# volumes:
|
|
||||||
# - name: scratch
|
|
||||||
# path: /scratch
|
|
||||||
# when:
|
|
||||||
# status:
|
|
||||||
# - success
|
|
||||||
# - failure
|
|
||||||
|
@ -45,7 +45,7 @@ build {
|
|||||||
" -ManifestFileName '/scratch/bld_${var.vm_name}_${source.name}.mf'",
|
" -ManifestFileName '/scratch/bld_${var.vm_name}_${source.name}.mf'",
|
||||||
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",
|
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",
|
||||||
" '/scratch/bld_${var.vm_name}_${source.name}.ovf' \\",
|
" '/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"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,3 +35,4 @@ variable "docker_password" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
variable "k8s_version" {}
|
variable "k8s_version" {}
|
||||||
|
variable "next_release_version" {}
|
||||||
|
Loading…
Reference in New Issue
Block a user