Browse Source

Fixes for integration tests windows for ENT (#18839)

* fixes for integration tests

* fix runner size for enterprise

* fix spacing

* fix spacing

* removed branch test run
pull/18322/head
Ashesh Vidyut 1 year ago committed by GitHub
parent
commit
0018b7e5a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      .github/scripts/get_runner_classes_windows.sh
  2. 5
      .github/workflows/test-integrations-windows.yml
  3. 9
      build-support/windows/build-consul-dev-image.sh

8
.github/scripts/get_runner_classes_windows.sh

@ -10,11 +10,11 @@ set -euo pipefail
case "$GITHUB_REPOSITORY" in case "$GITHUB_REPOSITORY" in
*-enterprise) *-enterprise)
# shellcheck disable=SC2129 # shellcheck disable=SC2129
echo "compute-small=['self-hosted', 'ondemand', 'os=windows-2019', 'type=m6a.4xlarge']" >>"$GITHUB_OUTPUT" echo "compute-small=['self-hosted', 'ondemand', 'os=windows-2019', 'type=m6a.2xlarge']" >>"$GITHUB_OUTPUT"
echo "compute-medium=['self-hosted', 'ondemand', 'os=windows-2019', 'type=m6a.8xlarge']" >>"$GITHUB_OUTPUT" echo "compute-medium=['self-hosted', 'ondemand', 'os=windows-2019', 'type=m6a.4xlarge']" >>"$GITHUB_OUTPUT"
echo "compute-large=['self-hosted', 'ondemand', 'os=windows-2019', 'type=m6a.12xlarge']" >>"$GITHUB_OUTPUT" echo "compute-large=['self-hosted', 'ondemand', 'os=windows-2019', 'type=m6a.8xlarge']" >>"$GITHUB_OUTPUT"
# m5d.8xlarge is equivalent to our xl custom runner in CE # m5d.8xlarge is equivalent to our xl custom runner in CE
echo "compute-xl=['self-hosted', 'ondemand', 'os=windows-2019', 'type=m6a.16xlarge']" >>"$GITHUB_OUTPUT" echo "compute-xl=['self-hosted', 'ondemand', 'os=windows-2019', 'type=m6a.12xlarge']" >>"$GITHUB_OUTPUT"
;; ;;
*) *)
# shellcheck disable=SC2129 # shellcheck disable=SC2129

5
.github/workflows/test-integrations-windows.yml

@ -76,6 +76,11 @@ jobs:
name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}' name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}'
path: ${{ github.workspace }} path: ${{ github.workspace }}
- name: Create dist folder and copy binary
run: |
mkdir dist
cp ${{ github.workspace }}\consul.exe dist\
- name: Restore mode+x - name: Restore mode+x
run: icacls ${{ github.workspace }}\consul.exe /grant:rx Everyone:RX run: icacls ${{ github.workspace }}\consul.exe /grant:rx Everyone:RX

9
build-support/windows/build-consul-dev-image.sh

@ -4,14 +4,5 @@
cd ../../ cd ../../
rm -rf dist
export GOOS=windows GOARCH=amd64
VERSION=1.16.0 VERSION=1.16.0
CONSUL_BUILDDATE=$(date +"%Y-%m-%dT%H:%M:%SZ")
GIT_IMPORT=github.com/hashicorp/consul/version
GOLDFLAGS=" -X $GIT_IMPORT.Version=$VERSION -X $GIT_IMPORT.VersionPrerelease=dev -X $GIT_IMPORT.BuildDate=$CONSUL_BUILDDATE "
go build -ldflags "$GOLDFLAGS" -o ./dist/ .
docker build -t windows/consul:${VERSION}-dev -f build-support/windows/Dockerfile-consul-dev-windows . --build-arg VERSION=${VERSION} docker build -t windows/consul:${VERSION}-dev -f build-support/windows/Dockerfile-consul-dev-windows . --build-arg VERSION=${VERSION}

Loading…
Cancel
Save