mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-12-30 00:51:06 +00:00
121 lines
4.6 KiB
YAML
121 lines
4.6 KiB
YAML
name: Test OpenWIFI Cloud SDK 2.x chart deployment
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
env:
|
|
AWS_EKS_NAME: tip-wlan-main
|
|
AWS_DEFAULT_OUTPUT: json
|
|
AWS_DEFAULT_REGION: us-east-2
|
|
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_CLIENT_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_CLIENT_KEY }}
|
|
|
|
# DigiCert certs
|
|
DIGICERT_CERT: ${{ secrets.DIGICERT_CERT }}
|
|
DIGICERT_KEY: ${{ secrets.DIGICERT_KEY }}
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
deploy_method:
|
|
default: 'git'
|
|
description: 'Deploy method to use (git or bundle is supported, git is default)'
|
|
required: true
|
|
chart_version:
|
|
default: 'main'
|
|
description: 'Chart version to deploy (git tag or helm package version may be used, main is default)'
|
|
required: true
|
|
owgw_version:
|
|
default: 'master'
|
|
description: 'OpenWIFI Gateway version to be deployed (git tag or helm package version may be used, master is default)'
|
|
required: true
|
|
owgwui_version:
|
|
default: 'main'
|
|
description: 'OpenWIFI Web UI version to be deployed (git tag or helm package version may be used, main is default)'
|
|
required: true
|
|
owsec_version:
|
|
default: 'main'
|
|
description: 'OpenWIFI Security version to be deployed (git tag or helm package version may be used, main is default)'
|
|
required: true
|
|
owfms_version:
|
|
default: 'main'
|
|
description: 'OpenWIFI Firmware version to be deployed (git tag or helm package version may be used, main is default)'
|
|
required: true
|
|
owprov_version:
|
|
default: 'main'
|
|
description: 'OpenWIFI Provisioning version to be deployed (git tag or helm package version may be used, main is default)'
|
|
required: true
|
|
owprovui_version:
|
|
default: 'main'
|
|
description: 'OpenWIFI Provisioning Web UI version to be deployed (git tag or helm package version may be used, main is default)'
|
|
required: true
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Deploy test OpenWIFI Cloud SDK 2.x instance
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Checkout repo with Helm values
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: wlan-testing
|
|
|
|
- name: Prepare certificates from secrets
|
|
working-directory: wlan-testing/helm/ucentral
|
|
run: |
|
|
echo "${{ env.DIGICERT_CERT }}" | base64 -d > cert.pem
|
|
echo "${{ env.DIGICERT_KEY }}" | base64 -d > key.pem
|
|
|
|
- name: Fetch kubeconfig
|
|
run: |
|
|
aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
|
|
|
- name: Deploy OpenWIFI Cloud SDK
|
|
working-directory: wlan-testing/helm/ucentral
|
|
run: |
|
|
export NAMESPACE=deployment-$GITHUB_RUN_ID
|
|
export DEPLOY_METHOD=${{ github.event.inputs.deploy_method }}
|
|
export CHART_VERSION=${{ github.event.inputs.chart_version }}
|
|
export OWGW_VERSION=${{ github.event.inputs.owgw_version }}
|
|
export OWGWUI_VERSION=${{ github.event.inputs.owgwui_version }}
|
|
export OWSEC_VERSION=${{ github.event.inputs.owsec_version }}
|
|
export OWFMS_VERSION=${{ github.event.inputs.owfms_version }}
|
|
export OWPROV_VERSION=${{ github.event.inputs.owprov_version }}
|
|
export OWPROVUI_VERSION=${{ github.event.inputs.owprovui_version }}
|
|
export VALUES_FILE_LOCATION=values.ucentral-qa.yaml
|
|
export RTTY_TOKEN=${{ secrets.RTTY_TOKEN }}
|
|
export OWGW_AUTH_USERNAME=${{ secrets.UCENTRALGW_AUTH_USERNAME }}
|
|
export OWGW_AUTH_PASSWORD=${{ secrets.UCENTRALGW_AUTH_PASSWORD }}
|
|
export OWFMS_S3_SECRET=${{ secrets.UCENTRALFMS_S3_SECRET }}
|
|
export OWFMS_S3_KEY=${{ secrets.UCENTRALFMS_S3_KEY }}
|
|
export CERT_LOCATION=cert.pem
|
|
export KEY_LOCATION=key.pem
|
|
./deploy.sh
|
|
|
|
- name: Show resource state on deployment failure
|
|
if: failure()
|
|
run: |
|
|
kubectl get pods --namespace openwifi-deployment-$GITHUB_RUN_ID
|
|
kubectl get services --namespace openwifi-deployment-$GITHUB_RUN_ID
|
|
kubectl get persistentvolumeclaims --namespace openwifi-deployment-$GITHUB_RUN_ID
|
|
- name: Describe pods on deployment failure
|
|
if: failure()
|
|
run: |
|
|
kubectl describe pods --namespace openwifi-deployment-$GITHUB_RUN_ID
|
|
- name: Describe services on deployment failure
|
|
if: failure()
|
|
run: |
|
|
kubectl describe services --namespace openwifi-deployment-$GITHUB_RUN_ID
|
|
- name: Describe persistentvolumeclaims on deployment failure
|
|
if: failure()
|
|
run: |
|
|
kubectl describe persistentvolumeclaims --namespace openwifi-deployment-$GITHUB_RUN_ID
|
|
|
|
- name: Delete Cloud SDK
|
|
if: always()
|
|
run: |
|
|
kubectl delete namespace openwifi-deployment-$GITHUB_RUN_ID
|