open-consul/.github/workflows/reusable-dev-build.yml

48 lines
1.5 KiB
YAML
Raw Permalink Normal View History

name: reusable-dev-build
Github Actions Migration - move go-tests workflows to GHA (#16761) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * making on pull_request * Update .github/scripts/rerun_fails_report.sh Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * make runs-on required * removing go-version param that is not used. * removing go-version param that is not used. * Modify build-distros to use medium runners (#16773) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * trying mediums * adding in script * fixing runs-on to be parameter * fixing merge conflict * changing to on push * removing whitespace * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * changing back to on pull_request --------- Co-authored-by: Dan Bond <danbond@protonmail.com> * Github Actions Migration - move verify-ci workflows to GHA (#16777) * add verify-ci workflow * adding comment and changing to on pull request. * changing to pull_requests * changing to pull_request * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * [NET-3029] Migrate frontend to GHA (#16731) * changing set up to a small * using consuls own custom runner pool. --------- Co-authored-by: Dan Bond <danbond@protonmail.com>
2023-03-28 21:29:27 +00:00
on:
workflow_call:
inputs:
uploaded-binary-name:
required: false
type: string
default: "consul-bin"
runs-on:
description: An expression indicating which kind of runners to use.
required: true
type: string
repository-name:
required: true
type: string
2023-04-05 15:58:00 +00:00
go-arch:
required: false
type: string
default: ""
secrets:
elevated-github-token:
required: true
Github Actions Migration - move go-tests workflows to GHA (#16761) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * making on pull_request * Update .github/scripts/rerun_fails_report.sh Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * make runs-on required * removing go-version param that is not used. * removing go-version param that is not used. * Modify build-distros to use medium runners (#16773) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * trying mediums * adding in script * fixing runs-on to be parameter * fixing merge conflict * changing to on push * removing whitespace * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * changing back to on pull_request --------- Co-authored-by: Dan Bond <danbond@protonmail.com> * Github Actions Migration - move verify-ci workflows to GHA (#16777) * add verify-ci workflow * adding comment and changing to on pull request. * changing to pull_requests * changing to pull_request * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * [NET-3029] Migrate frontend to GHA (#16731) * changing set up to a small * using consuls own custom runner pool. --------- Co-authored-by: Dan Bond <danbond@protonmail.com>
2023-03-28 21:29:27 +00:00
jobs:
build:
runs-on: ${{ fromJSON(inputs.runs-on) }}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
- name: Setup Git
if: ${{ endsWith(inputs.repository-name, '-enterprise') }}
run: git config --global url."https://${{ secrets.elevated-github-token }}:@github.com".insteadOf "https://github.com"
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
Github Actions Migration - move go-tests workflows to GHA (#16761) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * making on pull_request * Update .github/scripts/rerun_fails_report.sh Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * make runs-on required * removing go-version param that is not used. * removing go-version param that is not used. * Modify build-distros to use medium runners (#16773) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * trying mediums * adding in script * fixing runs-on to be parameter * fixing merge conflict * changing to on push * removing whitespace * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * changing back to on pull_request --------- Co-authored-by: Dan Bond <danbond@protonmail.com> * Github Actions Migration - move verify-ci workflows to GHA (#16777) * add verify-ci workflow * adding comment and changing to on pull request. * changing to pull_requests * changing to pull_request * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * [NET-3029] Migrate frontend to GHA (#16731) * changing set up to a small * using consuls own custom runner pool. --------- Co-authored-by: Dan Bond <danbond@protonmail.com>
2023-03-28 21:29:27 +00:00
with:
go-version-file: 'go.mod'
- name: Build
2023-04-05 15:58:00 +00:00
env:
GOARCH: ${{ inputs.goarch }}
Github Actions Migration - move go-tests workflows to GHA (#16761) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * making on pull_request * Update .github/scripts/rerun_fails_report.sh Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * make runs-on required * removing go-version param that is not used. * removing go-version param that is not used. * Modify build-distros to use medium runners (#16773) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * trying mediums * adding in script * fixing runs-on to be parameter * fixing merge conflict * changing to on push * removing whitespace * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * changing back to on pull_request --------- Co-authored-by: Dan Bond <danbond@protonmail.com> * Github Actions Migration - move verify-ci workflows to GHA (#16777) * add verify-ci workflow * adding comment and changing to on pull request. * changing to pull_requests * changing to pull_request * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * [NET-3029] Migrate frontend to GHA (#16731) * changing set up to a small * using consuls own custom runner pool. --------- Co-authored-by: Dan Bond <danbond@protonmail.com>
2023-03-28 21:29:27 +00:00
run: make dev
# save dev build to pass to downstream jobs
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
Github Actions Migration - move go-tests workflows to GHA (#16761) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * making on pull_request * Update .github/scripts/rerun_fails_report.sh Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * make runs-on required * removing go-version param that is not used. * removing go-version param that is not used. * Modify build-distros to use medium runners (#16773) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * trying mediums * adding in script * fixing runs-on to be parameter * fixing merge conflict * changing to on push * removing whitespace * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * changing back to on pull_request --------- Co-authored-by: Dan Bond <danbond@protonmail.com> * Github Actions Migration - move verify-ci workflows to GHA (#16777) * add verify-ci workflow * adding comment and changing to on pull request. * changing to pull_requests * changing to pull_request * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * [NET-3029] Migrate frontend to GHA (#16731) * changing set up to a small * using consuls own custom runner pool. --------- Co-authored-by: Dan Bond <danbond@protonmail.com>
2023-03-28 21:29:27 +00:00
with:
name: ${{inputs.uploaded-binary-name}}
path: ./bin/consul
- name: Notify Slack
if: ${{ failure() }}
Github Actions Migration - move go-tests workflows to GHA (#16761) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * making on pull_request * Update .github/scripts/rerun_fails_report.sh Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * make runs-on required * removing go-version param that is not used. * removing go-version param that is not used. * Modify build-distros to use medium runners (#16773) * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * trying mediums * adding in script * fixing runs-on to be parameter * fixing merge conflict * changing to on push * removing whitespace * go-tests workflow * add test splitting to go-tests * fix re-reun fails report path * fix re-reun fails report path another place * fixing tests for32bit and race * use script file to generate runners * fixing run path * add checkout * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * passing runs-on * setting up runs-on as a parameter to check-go-mod * changing back to on pull_request --------- Co-authored-by: Dan Bond <danbond@protonmail.com> * Github Actions Migration - move verify-ci workflows to GHA (#16777) * add verify-ci workflow * adding comment and changing to on pull request. * changing to pull_requests * changing to pull_request * Apply suggestions from code review Co-authored-by: Dan Bond <danbond@protonmail.com> * [NET-3029] Migrate frontend to GHA (#16731) * changing set up to a small * using consuls own custom runner pool. --------- Co-authored-by: Dan Bond <danbond@protonmail.com>
2023-03-28 21:29:27 +00:00
run: .github/scripts/notify_slack.sh