-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest-deprovision-environment.yml
More file actions
52 lines (46 loc) · 2.05 KB
/
test-deprovision-environment.yml
File metadata and controls
52 lines (46 loc) · 2.05 KB
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
name: Test Deprovision Environment
on:
workflow_dispatch:
inputs:
server:
type: string
description: The url of the Octopus Instance. Will default to repository variable TEST_INSTANCE_URL if not supplied.
service_account_id:
type: string
description: The id of the service account to login for. Will default to repository variable TEST_INSTANCE_SERVICE_ACCOUNT_ID if not supplied.
space:
description: 'The name of the space containing the ephemeral environment. Will default to repository variable TEST_SPACE_NAME if not supplied.'
# project:
# description: 'The name of the project in which to create and remove the EE. Will default to repository variable TEST_PROJECT_NAME if not supplied.'
name:
description: 'The name of the ephemeral environment to deprovision.'
required: true
jobs:
deprovision-environment:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
runs-on: ubuntu-latest
name: Test Ephemeral Environment Deprovisioning
steps:
- uses: actions/checkout@v3
- name: Login to Octopus Deploy
uses: OctopusDeploy/login@v1
with:
server: ${{ inputs.server || vars.TEST_INSTANCE_URL }}
service_account_id: ${{ inputs.service_account_id || vars.TEST_INSTANCE_SERVICE_ACCOUNT_ID }}
## TBC once the create action is published
# - name: Create Ephemeral Environment
# uses: OctopusDeploy/create-ephemeral-environment@v1
# with:
# name: ${{ inputs.name }}
# project: ${{ inputs.project || vars.TEST_PROJECT_NAME}}
# space: ${{ inputs.space || vars.TEST_SPACE_NAME}}
- name: Deprovision Ephemeral Environment
id: self_test
uses: ./
with:
name: ${{ inputs.name }}
space: ${{ inputs.space || vars.TEST_SPACE_NAME}}
- name: Show test action output
run: echo "${{ steps.self_test.outputs.deprovisioning_runbook_runs }}"