Upgrade gRPC to 1.58 [5.0.z] #34
Workflow file for this run
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
name: aws-tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'hazelcast/src/main/java/com/hazelcast/aws/**' | |
- 'hazelcast/pom.xml' | |
- '.github/terraform/aws/**' | |
jobs: | |
build: | |
defaults: | |
run: | |
shell: bash | |
env: | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }} | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ '8' ] | |
architecture: [ 'x64' ] | |
distribution: [ 'adopt' ] | |
steps: | |
# SET UP JDK | |
- name: Setup JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: ${{ matrix.java }} | |
architecture: ${{ matrix.architecture }} | |
distribution: ${{ matrix.distribution }} | |
- run: java -version | |
- run : mkdir ~/lib | |
# BUILD HAZELCAST AWS SNAPSHOT | |
- uses: actions/checkout@v2.3.4 | |
with: | |
path: hazelcast | |
- name: Build hazelcast jar | |
run: | | |
cd hazelcast | |
mvn clean install -DskipTests -Dcheckstyle.skip | |
echo "Hazelcast jar is: " hazelcast/target/hazelcast-*-SNAPSHOT.jar | |
cp hazelcast/target/hazelcast-*-SNAPSHOT.jar ~/lib/hazelcast.jar | |
#BUILD TERRAFORM | |
- name : Set-up Terraform | |
uses: hashicorp/setup-terraform@v1.3.2 | |
with: | |
terraform_version: 0.13.0 | |
- name: Create unique prefix for resources | |
run: | | |
sed -i -e "s/SET_PREFIX/${GITHUB_WORKFLOW}-${GITHUB_RUN_ID}/g" hazelcast/.github/terraform/aws/hazelcast.yaml | |
sed -i -e "s/SET_PREFIX/\"${GITHUB_WORKFLOW}-${GITHUB_RUN_ID}\"/g" hazelcast/.github/terraform/aws/terraform.tfvars | |
- name: Terraform Init | |
run: cd hazelcast/.github/terraform/aws && terraform init | |
- name: Terraform Format | |
run: cd hazelcast/.github/terraform/aws && terraform fmt | |
- name: Generate SSH keys | |
id: ssh | |
run: | | |
ssh-keygen -t rsa -b 4096 -C "devOpsHazelcast@hazelcast.com" -f id_rsa -P "" 1>/dev/null | |
ssh_key=$(cat id_rsa) | |
echo 'SSH_KEY<<EOF' >> $GITHUB_ENV | |
echo "$ssh_key" >> $GITHUB_ENV | |
echo 'EOF' >> $GITHUB_ENV | |
ssh_key_public=$(cat id_rsa.pub) | |
echo 'SSH_KEY_PUBLIC<<EOF' >> $GITHUB_ENV | |
echo "$ssh_key_public" >> $GITHUB_ENV | |
echo 'EOF' >> $GITHUB_ENV | |
- name: Install private key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ env.SSH_KEY }} | |
name: id_rsa | |
known_hosts: " " | |
- name: Install public key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ env.SSH_KEY_PUBLIC }} | |
name: id_rsa.pub | |
known_hosts: " " | |
- name: Terraform Apply | |
run: | | |
cd hazelcast/.github/terraform/aws && terraform apply -auto-approve | |
- name: Terraform Destroy | |
if: ${{ always() }} | |
run: | | |
cd hazelcast/.github/terraform/aws && terraform destroy -auto-approve |