Skip to content

Commit

Permalink
HEAT-227: updated pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
KalyanaVadlamani committed Apr 4, 2024
1 parent cc7617a commit a4d07fc
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 45 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,40 +42,40 @@ jobs:
with:
environment: ${{ inputs.environment }}

- name: Set Kubernetes Namespace secrets
id: set_namespace_secrets
run: |
if [[ "${{ inputs.environment }}" == "development" ]]; then
api=https://"{{ secrets.DEVELOPMENT_KUBE_CLUSTER }}"
cert="${{ secrets.DEVELOPMENT_KUBE_CERT }}"
cluster="${{ secrets.DEVELOPMENT_KUBE_CLUSTER }}"
namespace="${{ secrets.DEVELOPMENT_KUBE_NAMESPACE }}"
token="${{ secrets.DEVELOPMENT_KUBE_TOKEN }}"
bash ./.github/actions/cloud-platform-deploy
elif [[ "${{ inputs.environment }}" == "production" ]]; then
api=https://"{{ secrets.PRODUCTION_KUBE_CLUSTER }}"
cert="${{ secrets.PRODUCTION_KUBE_CERT }}"
cluster="${{ secrets.PRODUCTION_KUBE_CLUSTER }}"
namespace="${{ secrets.PRODUCTION_KUBE_NAMESPACE }}"
token="${{ secrets.PRODUCTION_KUBE_TOKEN }}"
else
echo "Invalid Github environment/namespace specified: ${{ inputs.environment }}"
exit 1
fi
- uses: ./.github/actions/cloud-platform-deploy
# - name: Set Kubernetes Namespace secrets
# id: set_namespace_secrets
# run: |
# if [[ "${{ inputs.environment }}" == "development" ]]; then
# api=https://"{{ secrets.DEVELOPMENT_KUBE_CLUSTER }}"
# cert="${{ secrets.DEVELOPMENT_KUBE_CERT }}"
# cluster="${{ secrets.DEVELOPMENT_KUBE_CLUSTER }}"
# namespace="${{ secrets.DEVELOPMENT_KUBE_NAMESPACE }}"
# token="${{ secrets.DEVELOPMENT_KUBE_TOKEN }}"
# bash ./.github/actions/cloud-platform-deploy
# elif [[ "${{ inputs.environment }}" == "production" ]]; then
# api=https://"{{ secrets.PRODUCTION_KUBE_CLUSTER }}"
# cert="${{ secrets.PRODUCTION_KUBE_CERT }}"
# cluster="${{ secrets.PRODUCTION_KUBE_CLUSTER }}"
# namespace="${{ secrets.PRODUCTION_KUBE_NAMESPACE }}"
# token="${{ secrets.PRODUCTION_KUBE_TOKEN }}"
# else
# echo "Invalid Github environment/namespace specified: ${{ inputs.environment }}"
# exit 1
# fi


# - name: Deploy to Platform
# # if: ${{ steps.check_files.outputs.files_exists == 'true' && steps.enabled.outputs.enabled == 'true' }}
# uses: ./.github/actions/cloud-platform-deploy
# with:
# environment: ${{ inputs.environment }}
# version: ${{ inputs.version }}
# api: https://${{ secrets.KUBE_CLUSTER }}
# cert: ${{ secrets.KUBE_CERT }}
# cluster: ${{ secrets.KUBE_CLUSTER }}
# namespace: ${{ secrets.KUBE_NAMESPACE }}
# token: ${{ secrets.KUBE_TOKEN }}

- name: Deploy to Platform
# if: ${{ steps.check_files.outputs.files_exists == 'true' && steps.enabled.outputs.enabled == 'true' }}
uses: ./.github/actions/cloud-platform-deploy
with:
environment: ${{ inputs.environment }}
version: ${{ inputs.version }}
api: https://${{ secrets.KUBE_CLUSTER }}
cert: ${{ secrets.KUBE_CERT }}
cluster: ${{ secrets.KUBE_CLUSTER }}
namespace: ${{ secrets.KUBE_NAMESPACE }}
token: ${{ secrets.KUBE_TOKEN }}

# - name: Deploy to Prod
# # if: ${{ steps.check_files.outputs.files_exists == 'true' && steps.enabled.outputs.enabled == 'true' }}
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ on:
# - main
- HEAT-227

workflow_dispatch:
inputs:
environment:
description: Environment
type: choice
required: true
options:
- development
- production
version:
description: Image version
type: string
required: true
# workflow_dispatch:
# inputs:
# environment:
# description: Environment
# type: choice
# required: true
# options:
# - development
# - production
# version:
# description: Image version
# type: string
# required: true

jobs:
build:
Expand Down

0 comments on commit a4d07fc

Please sign in to comment.