-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sameer Kulkarni <[email protected]>
- Loading branch information
1 parent
374d2a8
commit 5d5dfe5
Showing
11 changed files
with
1,036 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Repository Dispatch | ||
on: | ||
push: | ||
pull_request: | ||
repository_dispatch: | ||
types: build-on-release | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
if: github.event.client_payload.prerelease == 'false' | ||
env: | ||
GCP_KEY: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | ||
GOOGLE_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
steps: | ||
- name: Tag for Repository Dispatch event | ||
if: github.event_name == 'repository_dispatch' | ||
run: | | ||
tag_name="${{ github.event.client_payload.tag }}" | ||
version_number="$(echo "$tag_name" | sed 's/v//')" | ||
count="$(echo "$version_number" | awk -F"." '{print NF-1}')" | ||
if [[ $count -eq 2 ]]; then | ||
version_number="$(echo "$version_number" | sed 's/$/.0/')" | ||
fi | ||
if [[ "$(echo "$version_number" | awk -F"." '{print NF-1}')" -ne 3 ]]; then | ||
echo "The tag '$tag_name' is invalid" 1>&2 | ||
exit 1 | ||
fi | ||
echo "::set-env name=TAG_NAME::$version_number" | ||
- name: Google Cloud Platform (GCP) CLI - gcloud | ||
uses: actions-hub/[email protected] | ||
env: | ||
# Project id | ||
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
# GCP authorization credentials | ||
APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | ||
with: | ||
args: auth list | ||
|
||
- name: Set up Go 1.13 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.5 | ||
id: go | ||
|
||
- name: Setup Terraform environment | ||
uses: marocchino/[email protected] | ||
with: | ||
# The terraform version to download (if necessary) and use. Example: 0.12.13 | ||
version: 0.12.13 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
|
||
- name: Get dependencies | ||
run: | | ||
cd ./test | ||
go mod download | ||
- name: Build | ||
run: | | ||
echo "$GCP_KEY" | base64 -d > /tmp/account.json | ||
export GOOGLE_APPLICATION_CREDENTIALS="/tmp/account.json" | ||
cd ./test | ||
go test -v -timeout 90m yugabyte_test.go | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
create_universe.sh | ||
install_software.sh | ||
start_master.sh | ||
start_tserver.sh | ||
yugabyte-db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module terraform-gcp-yugabyte/test | ||
|
||
go 1.13 | ||
|
||
require ( | ||
github.com/Pallinder/go-randomdata v1.2.0 | ||
github.com/gruntwork-io/terratest v0.23.4 | ||
github.com/stretchr/testify v1.4.0 | ||
) |
Oops, something went wrong.