Skip to content

Vagrant Development Builds #1

Vagrant Development Builds

Vagrant Development Builds #1

Workflow file for this run

name: Vagrant Development Builds
on:
repository_dispatch:
types:
- nightlies
- build
push:
branches:
- 'nightlies'
workflow_dispatch:
jobs:
vagrant-artifacts:
if: github.repository == 'hashicorp/vagrant-builders'
name: Build Core Vagrant Artifacts
permissions:
contents: write
uses: ./.github/workflows/vagrant-artifacts.yml
with:
vagrant-commit-id: ${{ github.event.client_payload.commit_id }}
info:
name: Generate Build Information
if: github.repository == 'hashicorp/vagrant-builders'
needs: [vagrant-artifacts]
runs-on: ['self-hosted', 'ondemand', 'linux', 'type=t3.small']
permissions:
contents: write
id-token: write
outputs:
release-name: ${{ steps.generate.outputs.release-name }}
release-exists: ${{ steps.generate.outputs.release-exists }}
steps:
- name: Authentication
id: vault-auth
run: vault-auth
- name: Secrets
id: secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ steps.vault-auth.outputs.addr }}
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
token: ${{ steps.vault-auth.outputs.token }}
secrets:
kv/data/teams/vagrant/hashibot vagrant_token;
- name: Code Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Generate Development Build Information
id: generate
run: ./.ci/dev-build-information "${VAGRANT_VERSION}" "${VAGRANT_SHORT_ID}" "${RUN_NUMBER}"
env:
HASHIBOT_TOKEN: ${{ steps.secrets.outputs.vagrant_token }}
RUN_NUMBER: ${{ github.run_number }}
VAGRANT_VERSION: ${{ needs.vagrant-artifacts.outputs.vagrant-version }}
VAGRANT_SHORT_ID: ${{ needs.vagrant-artifacts.outputs.vagrant-short-commit-id }}
build-appimage-package:
if: github.repository == 'hashicorp/vagrant-builders' && needs.info.outputs.release-exists != 'true'
name: Build appimage package
needs: [info, vagrant-artifacts]
permissions:
contents: write
id-token: write
uses: ./.github/workflows/build-appimage.yml
with:
vagrant-artifacts-name: ${{ needs.vagrant-artifacts.outputs.artifacts-name }}
vagrant-artifacts-path: ${{ needs.vagrant-artifacts.outputs.artifacts-path }}
vagrant-gem-name: ${{ needs.vagrant-artifacts.outputs.gem-name }}
vagrant-gem-path: ${{ needs.vagrant-artifacts.outputs.gem-path }}
vagrant-licenses-name: ${{ needs.vagrant-artifacts.outputs.licenses-name }}
vagrant-licenses-path: ${{ needs.vagrant-artifacts.outputs.licenses-path }}
vagrant-version: ${{ needs.vagrant-artifacts.outputs.vagrant-version }}
vagrant-shasum: ${{ needs.vagrant-artifacts.outputs.vagrant-short-commit-id }}
secrets: inherit
build-archlinux-package:
if: github.repository == 'hashicorp/vagrant-builders' && needs.info.outputs.release-exists != 'true'
name: Build Arch Linux Package
needs: [info, vagrant-artifacts]
permissions:
contents: write
id-token: write
uses: ./.github/workflows/build-arch.yml
with:
vagrant-artifacts-name: ${{ needs.vagrant-artifacts.outputs.artifacts-name }}
vagrant-artifacts-path: ${{ needs.vagrant-artifacts.outputs.artifacts-path }}
vagrant-gem-name: ${{ needs.vagrant-artifacts.outputs.gem-name }}
vagrant-gem-path: ${{ needs.vagrant-artifacts.outputs.gem-path }}
vagrant-version: ${{ needs.vagrant-artifacts.outputs.vagrant-version }}
vagrant-shasum: ${{ needs.vagrant-artifacts.outputs.vagrant-short-commit-id }}
secrets: inherit
build-deb-packages:
if: github.repository == 'hashicorp/vagrant-builders' && needs.info.outputs.release-exists != 'true'
name: Build deb packages
needs: [info, vagrant-artifacts]
permissions:
contents: write
id-token: write
uses: ./.github/workflows/build-debs.yml
with:
vagrant-artifacts-name: ${{ needs.vagrant-artifacts.outputs.artifacts-name }}
vagrant-artifacts-path: ${{ needs.vagrant-artifacts.outputs.artifacts-path }}
vagrant-gem-name: ${{ needs.vagrant-artifacts.outputs.gem-name }}
vagrant-gem-path: ${{ needs.vagrant-artifacts.outputs.gem-path }}
vagrant-version: ${{ needs.vagrant-artifacts.outputs.vagrant-version }}
vagrant-shasum: ${{ needs.vagrant-artifacts.outputs.vagrant-short-commit-id }}
secrets: inherit
build-macos-package:
if: github.repository == 'hashicorp/vagrant-builders' && needs.info.outputs.release-exists != 'true'
name: Build macOS package
needs: [info, vagrant-artifacts]
permissions:
contents: write
id-token: write
uses: ./.github/workflows/build-macos.yml
with:
vagrant-artifacts-name: ${{ needs.vagrant-artifacts.outputs.artifacts-name }}
vagrant-artifacts-path: ${{ needs.vagrant-artifacts.outputs.artifacts-path }}
vagrant-gem-name: ${{ needs.vagrant-artifacts.outputs.gem-name }}
vagrant-gem-path: ${{ needs.vagrant-artifacts.outputs.gem-path }}
vagrant-licenses-name: ${{ needs.vagrant-artifacts.outputs.licenses-name }}
vagrant-licenses-path: ${{ needs.vagrant-artifacts.outputs.licenses-path }}
vagrant-version: ${{ needs.vagrant-artifacts.outputs.vagrant-version }}
vagrant-shasum: ${{ needs.vagrant-artifacts.outputs.vagrant-short-commit-id }}
secrets: inherit
build-rpm-packages:
if: github.repository == 'hashicorp/vagrant-builders' && needs.info.outputs.release-exists != 'true'
name: Build rpm packages
needs: [info, vagrant-artifacts]
permissions:
contents: write
id-token: write
uses: ./.github/workflows/build-rpms.yml
with:
vagrant-artifacts-name: ${{ needs.vagrant-artifacts.outputs.artifacts-name }}
vagrant-artifacts-path: ${{ needs.vagrant-artifacts.outputs.artifacts-path }}
vagrant-gem-name: ${{ needs.vagrant-artifacts.outputs.gem-name }}
vagrant-gem-path: ${{ needs.vagrant-artifacts.outputs.gem-path }}
vagrant-version: ${{ needs.vagrant-artifacts.outputs.vagrant-version }}
vagrant-shasum: ${{ needs.vagrant-artifacts.outputs.vagrant-short-commit-id }}
secrets: inherit
build-windows-packages:
if: github.repository == 'hashicorp/vagrant-builders' && needs.info.outputs.release-exists != 'true'
name: Build Windows Packages
needs: [info, vagrant-artifacts]
permissions:
contents: write
id-token: write
uses: ./.github/workflows/build-windows.yml
with:
vagrant-artifacts-name: ${{ needs.vagrant-artifacts.outputs.artifacts-name }}
vagrant-artifacts-path: ${{ needs.vagrant-artifacts.outputs.artifacts-path }}
vagrant-gem-name: ${{ needs.vagrant-artifacts.outputs.gem-name }}
vagrant-gem-path: ${{ needs.vagrant-artifacts.outputs.gem-path }}
vagrant-licenses-name: ${{ needs.vagrant-artifacts.outputs.licenses-name }}
vagrant-licenses-path: ${{ needs.vagrant-artifacts.outputs.licenses-path }}
vagrant-version: ${{ needs.vagrant-artifacts.outputs.vagrant-version }}
vagrant-shasum: ${{ needs.vagrant-artifacts.outputs.vagrant-short-commit-id }}
secrets: inherit
build-release:
if: github.repository == 'hashicorp/vagrant-builders' && needs.info.outputs.release-exists != 'true'
name: Vagrant GitHub Release
needs: [vagrant-artifacts, info, build-appimage-package, build-archlinux-package, build-deb-packages, build-macos-package, build-rpm-packages, build-windows-packages]
runs-on: ['self-hosted', 'ondemand', 'linux', 'type=t3.small']
permissions:
id-token: write
contents: write
steps:
- name: Authentication
id: vault-auth
run: vault-auth
- name: Secrets
id: secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ steps.vault-auth.outputs.addr }}
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
token: ${{ steps.vault-auth.outputs.token }}
secrets:
kv/data/teams/vagrant/hashibot vagrant_token;
kv/data/teams/vagrant/hashibot signore_token;
kv/data/github/hashicorp/vagrant-builders signore_client_id;
kv/data/github/hashicorp/vagrant-builders signore_client_secret;
kv/data/github/hashicorp/vagrant-builders signore_gpg_signer;
- name: Code Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Fetch appimage package
run: ./.ci/restore-cache "${CACHE_ID}" ./pkg
env:
CACHE_ID: ${{ needs.build-appimage-package.outputs.appimage-package-id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch Arch Linux package
run: ./.ci/restore-cache "${CACHE_ID}" ./pkg
env:
CACHE_ID: ${{ needs.build-archlinux-package.outputs.arch-package-id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch deb packages
run: ./.ci/restore-cache "${CACHE_ID}" ./pkg
env:
CACHE_ID: ${{ needs.build-deb-packages.outputs.deb-packages-id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch macOS DMG
run: ./.ci/restore-cache "${CACHE_ID}" ./pkg
env:
CACHE_ID: ${{ needs.build-macos-package.outputs.dmg-cache-id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch rpm packages
run: ./.ci/restore-cache "${CACHE_ID}" ./pkg
env:
CACHE_ID: ${{ needs.build-rpm-packages.outputs.rpm-packages-id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch 32 Bit Windows Package
run: ./.ci/restore-cache "${CACHE_ID}" ./pkg
env:
CACHE_ID: ${{ needs.build-windows-packages.outputs.msi-32-signed-id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch 64 Bit Windows Package
run: ./.ci/restore-cache "${CACHE_ID}" ./pkg
env:
CACHE_ID: ${{ needs.build-windows-packages.outputs.msi-64-signed-id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch Vagrant Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: ${{ needs.vagrant-artifacts.outputs.artifacts-name }}
path: ${{ needs.vagrant-artifacts.outputs.artifacts-path }}
- name: Add Build Artifacts
run: cp "${VAGRANT_ARTIFACTS}/"* ./pkg
env:
VAGRANT_ARTIFACTS: ${{ needs.vagrant-artifacts.outputs.artifacts-path }}
- name: Generate shasums
run: ./.ci/dev-builds-shasums ./pkg "${VAGRANT_VERSION}"
env:
SIGNORE_CLIENT_ID: ${{ steps.secrets.outputs.signore_client_id }}
SIGNORE_CLIENT_SECRET: ${{ steps.secrets.outputs.signore_client_SECRET }}
SIGNORE_SIGNER: ${{ steps.secrets.outputs.signore_gpg_signer }}
HASHIBOT_TOKEN: ${{ steps.secrets.outputs.signore_token }}
VAGRANT_VERSION: ${{ needs.vagrant-artifacts.outputs.vagrant-version }}
- name: Publish Dev Build
run: ./.ci/publish-dev-builds "${RELEASE_NAME}" "${COMMIT_ID:-main}" "${BRANCH:-main}" "${RELEASE_TYPE}" ./pkg
env:
COMMIT_ID: ${{ needs.vagrant-artifacts.outputs.vagrant-commit-id }}
BRANCH: ${{ github.event.client_payload.branch }}
RELEASE_NAME: ${{ needs.info.outputs.release-name }}
RELEASE_TYPE: ${{ github.event.action }}
HASHIBOT_TOKEN: ${{ steps.secrets.outputs.vagrant_token }}