Skip to content

Merge pull request #213 from couchbase-partners/UpdateForSyncGateway3-2 #64

Merge pull request #213 from couchbase-partners/UpdateForSyncGateway3-2

Merge pull request #213 from couchbase-partners/UpdateForSyncGateway3-2 #64

# This is a basic workflow to help you get started with Actions
name: AWS - CouchbaseServer
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
paths:
- 'aws/CouchbaseServer/**'
- 'aws/CouchbaseServer-Graviton/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
CouchbaseServer:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v1
with:
node-version: '15.x'
# Runs a set of commands using the runners shell
- name: Setup AWS CLI
run: |
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
aws configure set default.region $AWS_DEFAULT_REGION
aws configure get region
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_REGION: 'us-east-1'
- name: Deploy To AWS (Defaults)
timeout-minutes: 20
run: |
bash ${GITHUB_WORKSPACE}/aws/CouchbaseServer/deploy.sh -n "cb-server-defaults-${GITHUB_SHA::6}"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_REGION: 'us-east-1'
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Install CouchbaseVerifier
run: |
dotnet tool install CouchbaseVerifier --global --version 1.0.7
- name: Run Default Tests
run: |
DNS=$(aws ec2 describe-instances --region us-east-1 --filter "Name=tag:aws:cloudformation:stack-name,Values=cb-server-defaults-${GITHUB_SHA::6}" | jq -r '.Reservations[0].Instances[0].PublicDnsName')
CouchbaseVerifier verify --host http://${DNS}:8091 -u couchbase -p foo123! -d ${GITHUB_WORKSPACE}/aws/CouchbaseServer/Tests/Defaults.json
- name: Teardown From AWS
timeout-minutes: 20
run: |
bash ${GITHUB_WORKSPACE}/aws/backout.sh "cb-server-defaults-${GITHUB_SHA::6}"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_REGION: 'us-east-1'
- name: Deploy To AWS
timeout-minutes: 20
run: |
bash ${GITHUB_WORKSPACE}/aws/CouchbaseServer/deploy.sh -n "cb-server-non-defaults-${GITHUB_SHA::6}" -c 3 -v 6.6.4 -r "$AWS_REGION"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_REGION: 'us-east-1'
- name: Run Non-Default Tests
run: |
DNS=$(aws ec2 describe-instances --region us-east-1 --filter "Name=tag:aws:cloudformation:stack-name,Values=cb-server-non-defaults-${GITHUB_SHA::6}" | jq -r '.Reservations[0].Instances[0].PublicDnsName')
CouchbaseVerifier verify --host http://${DNS}:8091 -u couchbase -p foo123! -d ${GITHUB_WORKSPACE}/aws/CouchbaseServer/Tests/NonDefaults.json
- name: Teardown From AWS
timeout-minutes: 20
run: |
bash ${GITHUB_WORKSPACE}/aws/backout.sh "cb-server-non-defaults-${GITHUB_SHA::6}"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_REGION: 'us-east-1'
- name: Deploy To AWS (Graviton)
timeout-minutes: 20
run: |
bash ${GITHUB_WORKSPACE}/aws/CouchbaseServer-Graviton/deploy.sh -n "cb-server-graviton-${GITHUB_SHA::6}"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_REGION: 'us-east-1'
- name: Run Graviton Tests
run: |
DNS=$(aws ec2 describe-instances --region us-east-1 --filter "Name=tag:aws:cloudformation:stack-name,Values=cb-server-graviton-${GITHUB_SHA::6}" | jq -r '.Reservations[0].Instances[0].PublicDnsName')
CouchbaseVerifier verify --host http://${DNS}:8091 -u couchbase -p foo123! -d ${GITHUB_WORKSPACE}/aws/CouchbaseServer-Graviton/Tests/Defaults.json
- name: Teardown From AWS (Graviton)
timeout-minutes: 20
run: |
bash ${GITHUB_WORKSPACE}/aws/backout.sh "cb-server-graviton-${GITHUB_SHA::6}"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_REGION: 'us-east-1'
- name: Deploy To AWS (Graviton) Non-Defaults
timeout-minutes: 20
run: |
bash ${GITHUB_WORKSPACE}/aws/CouchbaseServer-Graviton/deploy.sh -n "cb-server-graviton-nondefaults-${GITHUB_SHA::6}" -v 7.1.0
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_REGION: 'us-east-1'
- name: Run Graviton Tests
run: |
DNS=$(aws ec2 describe-instances --region us-east-1 --filter "Name=tag:aws:cloudformation:stack-name,Values=cb-server-graviton-nondefaults-${GITHUB_SHA::6}" | jq -r '.Reservations[0].Instances[0].PublicDnsName')
CouchbaseVerifier verify --host http://${DNS}:8091 -u couchbase -p foo123! -d ${GITHUB_WORKSPACE}/aws/CouchbaseServer-Graviton/Tests/NonDefaults.json
- name: Teardown From AWS (Graviton)
timeout-minutes: 20
run: |
bash ${GITHUB_WORKSPACE}/aws/backout.sh "cb-server-graviton-nondefaults-${GITHUB_SHA::6}"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_REGION: 'us-east-1'