Support development builds for specific host

This commit is contained in:
Chris Roberts 2023-05-31 18:02:08 -07:00
parent 1b63ba859b
commit 3eca70387e
8 changed files with 125 additions and 6 deletions

View File

@ -6,13 +6,14 @@ root="$( cd -P "$( dirname "$csource" )/../" && pwd )"
. "${root}/.ci/load-ci.sh"
if [ "${#}" -ne 2 ]; then
printf "Usage: %s BRANCH COMMIT_ID\n" "${0}" >&2
if [ "${#}" -ne 3 ]; then
printf "Usage: %s BRANCH COMMIT_ID BUILD_TYPE\n" "${0}" >&2
exit 1
fi
branch="${1}"
full_sha="${2}"
build_type="${3}"
if [ -z "${branch}" ]; then
failure "Branch variable is unset, required for dev build"
@ -20,6 +21,9 @@ fi
if [ -z "${full_sha}" ]; then
failure "The full_sha variable is unexpectedly missing, cannot trigger dev build"
fi
if [ -z "${build_type}" ]; then
failure "The build type is required for triggering dev build"
fi
# Trim the reference prefix if needed
if [[ "${branch}" = *"refs/heads"* ]]; then
@ -28,5 +32,5 @@ if [[ "${branch}" = *"refs/heads"* ]]; then
debug "trimmed branch value - %s" "${branch}"
fi
info "Triggering development build %s (%s)" "${tag}" "${full_sha}"
github_repository_dispatch "vagrant-builders" "build" "commit_id=${full_sha}" "branch=${branch}"
info "Triggering development build %s (%s)" "${branch}" "${full_sha}"
github_repository_dispatch "vagrant-builders" "${build_type}" "commit_id=${full_sha}" "branch=${branch}"

View File

@ -0,0 +1,19 @@
name: Appimage Vagrant Development Build
on:
push:
branches: 'dev-appimage-*'
jobs:
trigger-build:
if: github.repository == 'hashicorp/vagrant'
name: Trigger Vagrant Appimage Development Build
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v3
- name: Trigger Development Build
run: ./.ci/dev-build "${BRANCH}" "${COMMIT_ID}" build-appimage
env:
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
BRANCH: ${{ github.ref_name }}
COMMIT_ID: ${{ github.sha }}

19
.github/workflows/dev-arch-build.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Arch Linux Vagrant Development Build
on:
push:
branches: 'dev-arch-*'
jobs:
trigger-build:
if: github.repository == 'hashicorp/vagrant'
name: Trigger Vagrant Arch Linux Development Build
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v3
- name: Trigger Development Build
run: ./.ci/dev-build "${BRANCH}" "${COMMIT_ID}" build-arch
env:
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
BRANCH: ${{ github.ref_name }}
COMMIT_ID: ${{ github.sha }}

View File

@ -1,3 +1,4 @@
name: Full Vagrant Development Build
on:
push:
branches: 'build-*'
@ -5,13 +6,13 @@ on:
jobs:
trigger-build:
if: github.repository == 'hashicorp/vagrant'
name: Trigger Development Build
name: Trigger Vagrant Development Build
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v3
- name: Trigger Development Build
run: ./.ci/dev-build "${BRANCH}" "${COMMIT_ID}"
run: ./.ci/dev-build "${BRANCH}" "${COMMIT_ID}" build
env:
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
BRANCH: ${{ github.ref_name }}

19
.github/workflows/dev-debs-build.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: DEB Vagrant Development Build
on:
push:
branches: 'dev-debs-*'
jobs:
trigger-build:
if: github.repository == 'hashicorp/vagrant'
name: Trigger Vagrant DEB Development Build
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v3
- name: Trigger Development Build
run: ./.ci/dev-build "${BRANCH}" "${COMMIT_ID}" build-debs
env:
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
BRANCH: ${{ github.ref_name }}
COMMIT_ID: ${{ github.sha }}

19
.github/workflows/dev-macos-build.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: macOS Vagrant Development Build
on:
push:
branches: 'dev-macos-*'
jobs:
trigger-build:
if: github.repository == 'hashicorp/vagrant'
name: Trigger Vagrant macOS Development Build
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v3
- name: Trigger Development Build
run: ./.ci/dev-build "${BRANCH}" "${COMMIT_ID}" build-macos
env:
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
BRANCH: ${{ github.ref_name }}
COMMIT_ID: ${{ github.sha }}

19
.github/workflows/dev-rpms-build.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: RPM Vagrant Development Build
on:
push:
branches: 'dev-rpms-*'
jobs:
trigger-build:
if: github.repository == 'hashicorp/vagrant'
name: Trigger Vagrant RPM Development Build
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v3
- name: Trigger Development Build
run: ./.ci/dev-build "${BRANCH}" "${COMMIT_ID}" build-rpms
env:
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
BRANCH: ${{ github.ref_name }}
COMMIT_ID: ${{ github.sha }}

19
.github/workflows/dev-windows-build.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Windows Vagrant Development Build
on:
push:
branches: 'dev-windows-*'
jobs:
trigger-build:
if: github.repository == 'hashicorp/vagrant'
name: Trigger Vagrant Windows Development Build
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v3
- name: Trigger Development Build
run: ./.ci/dev-build "${BRANCH}" "${COMMIT_ID}" build-windows
env:
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
BRANCH: ${{ github.ref_name }}
COMMIT_ID: ${{ github.sha }}