Skip to content

Commit

Permalink
feat(deploy-app.yaml): add pulumi state storage input and module to G…
Browse files Browse the repository at this point in the history
…itHub Actions

This change introduces a new input parameter `pulumi_state_storage` for the GitHub Actions workflow, which specifies the location of the pulumi state. It also adds the `PULUMI_MODULE` environment variable to manage pulumi operations. This allows the deployment process to integrate pulumi for infrastructure management, making the deployment process more robust and flexible by leveraging pulumi's capabilities for state management. The default state storage is set to a Google Cloud Storage bucket, ensuring that the state is stored securely and is accessible across different deployment runs.
  • Loading branch information
cybersiddhu committed Jun 30, 2024
1 parent 514881a commit 8abfeed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/deploy-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ on:
required: true
type: string
description: "location of cluster state"
pulumi_state_storage:
type: string
description: "location of pulumi state"
default: "gs://dictycr-pulumi-state"

env:
ACTION_BIN_PATH: /tmp/github_actions/bin
Expand All @@ -39,6 +43,7 @@ env:
KUBECTL_CONFIG: /tmp/config/dictycr.yaml
IMAGE_MODULE: github.com/dictybase-docker/dagger-of-dcr/container-image@main
KOPS_MODULE: github.com/dictybase-docker/dagger-of-dcr/kops@main
PULUMI_MODULE: github.com/dictybase-docker/dagger-of-dcr/pulumi-ops@main

jobs:
deploy:
Expand Down Expand Up @@ -114,3 +119,5 @@ jobs:
dagger call -m $KOPS_MODULE with-kops with-kubectl with-cluster --name=${{ inputs.cluster }} with-credentials --credentials=${{ steps.gcp_authentication.outputs.credentials_file_path }} with-state-storage --storage=${{ inputs.cluster_state_storage }} export-kubectl --output=$KUBECTL_CONFIG
- name: test kubectl
run: kubectl --kubeconfig $KUBECTL_CONFIG get nodes
- name: test pulumi login
run: dagger call -m $PULUMI_MODULE with-backend --backend ${{ inputs.pulumi_state_storage }} with-credentials --credentials=${{ steps.gcp_authentication.outputs.credentials_file_path }} with-pulumi login

0 comments on commit 8abfeed

Please sign in to comment.