build: Populate/Reference packer parameters
This commit is contained in:
parent
092ce5eabc
commit
6568acf541
@ -62,6 +62,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
- name: Parse Kubernetes version
|
||||||
|
uses: mikefarah/yq@master
|
||||||
|
id: get_k8sversion
|
||||||
|
with:
|
||||||
|
cmd: yq '.components.clusterapi.workload.version.k8s' ansible/vars/metacluster.yml
|
||||||
- name: Setup `packer`
|
- name: Setup `packer`
|
||||||
uses: hashicorp/setup-packer@main
|
uses: hashicorp/setup-packer@main
|
||||||
id: setup
|
id: setup
|
||||||
@ -75,15 +80,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
packer validate \
|
packer validate \
|
||||||
-only=vsphere-iso.bootstrap \
|
-only=vsphere-iso.bootstrap \
|
||||||
-var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
|
-var vm_name=${{ gitea.job }}-${{ gitea.sha:0:10 }}-$(openssl rand -hex 3) \
|
||||||
-var docker_username=${{ secrets.DOCKER_USERNAME }} \
|
-var docker_username=${{ secrets.DOCKER_USERNAME }} \
|
||||||
-var docker_password=${{ secrets.DOCKER_PASSWORD }} \
|
-var docker_password=${{ secrets.DOCKER_PASSWORD }} \
|
||||||
-var repo_username=${{ secrets.REPO_USERNAME }} \
|
-var repo_username=${{ secrets.REPO_USERNAME }} \
|
||||||
-var repo_password=${{ secrets.REPO_PASSWORD }} \
|
-var repo_password=${{ secrets.REPO_PASSWORD }} \
|
||||||
-var ssh_password=${{ secrets.SSH_PASSWORD }} \
|
-var ssh_password=${{ secrets.SSH_PASSWORD }} \
|
||||||
-var hv_password=${{ secrets.HV_PASSWORD }} \
|
-var hv_password=${{ secrets.HV_PASSWORD }} \
|
||||||
-var k8s_version=$K8S_VERSION \
|
-var k8s_version=${{ steps.get_k8sversion.outputs.result }} \
|
||||||
-var appliance_version=$APPLIANCE_VERSION \
|
-var appliance_version=${{ needs.semrel_dryrun.outputs.version }} \
|
||||||
./packer
|
./packer
|
||||||
# - name: Build Artifact
|
# - name: Build Artifact
|
||||||
# run: packer build -color=false -on-error=abort ./image.pkr.hcl
|
# run: packer build -color=false -on-error=abort ./image.pkr.hcl
|
||||||
|
Loading…
Reference in New Issue
Block a user