-
Notifications
You must be signed in to change notification settings - Fork 16
116 lines (112 loc) · 3.52 KB
/
aws-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: "Deploy and Test AWS"
on:
workflow_dispatch:
inputs:
prefix:
description: "Prefix for the deployment"
required: false
default: "armonik-cicd"
bootstrap:
description: "Deploy the S3 for the tfstate"
type: boolean
required: false
default: true
core-version:
description: "Version of core to deploy"
required: false
default: ""
gui-version:
description: "Version of gui to deploy"
required: false
default: ""
ext-csharp-version:
description: "Version of Extension Csharp to deploy"
required: false
default: ""
jobs:
deploy:
name: "Deploy"
runs-on: ubuntu-latest
outputs:
terraform-output: ${{ steps.deploy.outputs.terraform-output }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
aws: true
terraform: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: eu-west-3
- if: ${{ inputs.bootstrap }}
id: bootstrap-deploy
name: Deploy Bootstrap
uses: aneoconsulting/ArmoniK.Action.Deploy/bootstrap-deploy@main
with:
type: aws
prefix: ${{ inputs.prefix }}
- id: deploy
name: Deploy
uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main
with:
type: aws
prefix: ${{ inputs.prefix }}
core-version: ${{ inputs.core-version }}
gui-version: ${{ inputs.gui-version }}
ext-csharp-version: ${{ inputs.ext-csharp-version }}
test:
name: "Test"
runs-on: ubuntu-latest
needs: deploy
env:
TERRAFORM_OUTPUT: ${{ needs.deploy.outputs.terraform-output }}
KUBE_CONFIG: ${{ needs.deploy.outputs.kube-config }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
aws: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: eu-west-3
- name: Terraform Output
run: |
echo "$TERRAFORM_OUTPUT"
- name: Kube Config
run: |
echo "$KUBE_CONFIG"
cleanup:
name: "Destroy"
runs-on: ubuntu-latest
needs:
- deploy
- test
if: "always()"
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
aws: true
terraform: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: eu-west-3
- id: destroy
name: Destroy deployment
uses: aneoconsulting/ArmoniK.Action.Deploy/destroy@main
with:
type: aws
prefix: ${{ inputs.prefix }}
- if: ${{ inputs.bootstrap }}
id: bootstrap-destroy
name: Destroy Bootstrap
uses: aneoconsulting/ArmoniK.Action.Deploy/bootstrap-destroy@main
with:
type: aws
prefix: ${{ inputs.prefix }}