Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added shared host path and tests #14

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Test

on:
push:

jobs:
testDeploys:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
ref: ${{ github.head_ref }}

- name: Install Dependencies
uses: ./dependencies
with:
docker: true
terraform: true
k3s: true
aws: true

- name: Checkout Infra
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
repository: aneoconsulting/ArmoniK
path: infra

- name: Deploy
uses: ./deploy
with:
working-directory: ${{ github.workspace }}/infra
type: localhost
shared-data-folder: "${{ github.workspace }}/infra/infrastructure/quick-deploy/localhost/all-in-one/data/"
tls: true

- name: Check deployment
run: |
set -e
mkdir -p /tmp/armonik_dep
kubectl get all -n armonik -o json > /tmp/armonik_dep/deployment.json

- name: Store deployment result
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
if: always()
with:
name: Logs Deployment
path: /tmp/armonik_dep/deployment.json
retention-days: 5

- name: Destroy
if: success() || failure()
uses: ./destroy
with:
working-directory: ${{ github.workspace }}/infra
type: localhost
9 changes: 9 additions & 0 deletions deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ inputs:
descriptiont: "Working directory (should be the ArmoniK repo root folder)"
required: false
default: ${{ github.workspace }}
shared-data-folder:
description: "Shared data folder to use with Extension Csharp"
required: false
default: ""
outputs:
terraform-output:
description: "Terraform output of the deployment"
Expand Down Expand Up @@ -81,6 +85,7 @@ runs:
MTLS: ${{ inputs.mtls }}
GENCERT: ${{ inputs.generate-client-cert }}
CUSTOM_CA: ${{ inputs.custom-client-ca }}
SHARED_HOST: ${{ inputs.shared-data-folder }}
run: |
set -ex
ingress() {
Expand All @@ -95,6 +100,10 @@ runs:
fi
}
ingress "$TLS" "$MTLS" "$GENCERT" "$CUSTOM_CA"
if [ -n "$SHARED_HOST" ]; then
jq --arg shared "$SHARED_HOST" '.shared_storage={host_path:$shared}' extra.tfvars.json > .extra.tfvars.json
mv .extra.tfvars.json extra.tfvars.json
fi
- id: apply
name: Apply
shell: bash
Expand Down
Loading