Skip to content

Azure VM Release Workflow #25

Azure VM Release Workflow

Azure VM Release Workflow #25

# This is a basic workflow to help you get started with Actions
name: Azure VM Release Workflow
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
workflow_dispatch:
inputs:
version:
description: "Couchbase Server/Gateway Version"
required: true
default: "7.1.1"
syncgateway:
description: "Gateway (Y/N)?"
type: choice
options:
- "Y"
- "N"
required: true
default: "N"
# 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"
azure-vm-release:
# 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
- name: Checkout Code
uses: actions/checkout@v2
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Create Build Directory
run: mkdir ${GITHUB_WORKSPACE}/build
# Runs a set of commands using the runners shell
- name: Build CBS Packages
if: ${{ github.event.inputs.syncgateway == 'N' }}
env:
VERSION: ${{github.event.inputs.version}}
run: bash ${GITHUB_WORKSPACE}/azure/Couchbase-VirtualMachine/create.sh -l eastus -g cb-mkt-artifacts -s cbmktvm$(date +%Y)$(date +%m)$(date +%d)$(date +%H)$(date +%M) -v "$VERSION"
- name: Build CBS Packages
if: ${{ github.event.inputs.syncgateway == 'Y' }}
env:
VERSION: ${{github.event.inputs.version}}
run: bash ${GITHUB_WORKSPACE}/azure/Couchbase-VirtualMachine/create.sh -l eastus -g cb-mkt-artifacts -s cbmktvm$(date +%Y)$(date +%m)$(date +%d)$(date +%H)$(date +%M) -v "$VERSION" -m
- name: Upload VM Configuration
if: ${{ github.event.inputs.syncgateway == 'N' }}
uses: actions/upload-artifact@v2
with:
name: ServerTechnicalConfiguration.json
path: build/azure/Couchbase-VirtualMachine/ServerTechnicalConfiguration.json
retention-days: 14
- name: Upload VM Configuration
if: ${{ github.event.inputs.syncgateway == 'Y' }}
uses: actions/upload-artifact@v2
with:
name: GatewayTechnicalConfiguration.json
path: build/azure/Couchbase-VirtualMachine/GatewayTechnicalConfiguration.json
retention-days: 14