chore: Refactor string substitutions
Some checks failed
Container & Helm chart / Linting (push) Successful in 5s
Container & Helm chart / Semantic Release (Dry-run) (push) Successful in 49s
Container & Helm chart / Kubernetes Bootstrap Appliance (push) Failing after 21s

This commit is contained in:
Danny Bessems 2024-06-05 13:05:30 +10:00
parent 7d431d88c3
commit d99fca654f

View File

@ -78,10 +78,12 @@ jobs:
- name: Run `packer validate` - name: Run `packer validate`
id: validate id: validate
run: | run: |
echo "${{ gitea.run_number }}-${BUILD_COMMIT}-${BUILD_SUFFIX}" BUILD_COMMIT=$(echo "${{ gitea.sha }}" | cut -c 1-10)
BUILD_SUFFIX=$(openssl rand -hex 3)
packer validate \ packer validate \
-only=vsphere-iso.bootstrap \ -only=vsphere-iso.bootstrap \
-var vm_name=${{ gitea.run_number }}-${BUILD_COMMIT}-${$BUILD_SUFFIX} \ -var vm_name=${{ gitea.run_number }}-${BUILD_COMMIT}-${BUILD_SUFFIX} \
-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 }} \
@ -91,15 +93,14 @@ jobs:
-var k8s_version=${{ steps.get_k8sversion.outputs.result }} \ -var k8s_version=${{ steps.get_k8sversion.outputs.result }} \
-var appliance_version=${{ needs.semrel_dryrun.outputs.version }} \ -var appliance_version=${{ needs.semrel_dryrun.outputs.version }} \
./packer ./packer
env:
BUILD_COMMIT: echo "${{ gitea.sha }}" | cut -c 1-10
BUILD_SUFFIX: echo "$(openssl rand -hex 3)"
- name: Run `packer build` - name: Run `packer build`
run: | run: |
BUILD_COMMIT=$(echo "${{ gitea.sha }}" | cut -c 1-10)
BUILD_SUFFIX=$(openssl rand -hex 3)
packer build \ packer build \
# -e PACKER_LOG=1 \
-only=vsphere-iso.bootstrap \ -only=vsphere-iso.bootstrap \
-var vm_name=${{ gitea.job }}-${{ gitea.sha:0:10 }}-$(openssl rand -hex 3) \ -var vm_name=${{ gitea.run_number }}-${BUILD_COMMIT}-${BUILD_SUFFIX} \
-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 }} \