-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
108 lines (107 loc) · 4.02 KB
/
action.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
name: "gh-action_releasability"
description: "gh-action client for ops-releasability checks"
author: "RE Team"
inputs:
ignore-failure:
description: Optional, do not fail the gh-action in case of failure in releasability checks
required: false
default: "false"
organization:
description: GitHub organization name
required: true
repository:
description: GitHub repository name
required: true
branch:
description: Branch name
required: true
version:
description: The version to check
required: true
commit-sha:
description: The GitHub commit SHA to use
required: true
releasabily-env:
description: For development purposes, the environment to use (prod, staging or dev). Defaults to production.
required: false
default: prod
outputs:
status:
description: Provide the exit code returned by the releasability checks
value: ${{ steps.checks.outputs.status }}
logs:
description: Logs from releasability checks
value: ${{ steps.checks.outputs.logs }}
releasabilityCheckDependencies:
description: Result from releasability check CheckDependencies
value: ${{ steps.checks.outputs.releasabilityCheckDependencies }}
releasabilityQA:
description: Result from releasability check QA
value: ${{ steps.checks.outputs.releasabilityQA }}
releasabilityJira:
description: Result from releasability check Jira
value: ${{ steps.checks.outputs.releasabilityJira }}
releasabilityWhiteSource:
description: Result from releasability check WhiteSource
value: ${{ steps.checks.outputs.releasabilityWhiteSource }}
releasabilityCheckPeacheeLanguagesStatistics:
description: Result from releasability check CheckPeacheeLanguagesStatistics
value: ${{ steps.checks.outputs.releasabilityCheckPeacheeLanguagesStatistics }}
releasabilityQualityGate:
description: Result from releasability check QualityGate
value: ${{ steps.checks.outputs.releasabilityQualityGate }}
releasabilityParentPOM:
description: Result from releasability check ParentPOM
value: ${{ steps.checks.outputs.releasabilityParentPOM }}
releasabilityGitHub:
description: Result from releasability check GitHub
value: ${{ steps.checks.outputs.releasabilityGitHub }}
releasabilityCheckManifestValues:
description: Result from releasability check CheckManifestValues
value: ${{ steps.checks.outputs.releasabilityCheckManifestValues }}
runs:
using: "composite"
steps:
- id: setup_python
name: Setup python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.10"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
env:
prod: "064493320159"
staging: "308147251410"
dev: "597611216173"
with:
aws-region: eu-central-1
role-to-assume: "arn:aws:iam::${{ env[inputs.releasabily-env] }}:role/ReleasbilityChecksCICDRole"
- name: Install requirements
run: |
pip install pipenv
pipenv install
shell: bash
working-directory: ${{ github.action_path }}
- name: Trigger releasability checks
id: checks
shell: bash
working-directory: ${{ github.action_path }}
run: pipenv run releasability
env:
INPUT_ORGANIZATION: ${{ inputs.organization }}
INPUT_REPOSITORY: ${{ inputs.repository }}
INPUT_BRANCH: ${{ inputs.branch }}
INPUT_VERSION: ${{ inputs.version }}
INPUT_COMMIT_SHA: ${{ inputs.commit-sha}}
PYTHONUNBUFFERED: "1" # that way logs are printed live
- name: Print execution
run: |
echo "${{ steps.checks.outputs.logs }}"
echo "Exit code: ${{ steps.checks.outputs.status }}"
shell: bash
- name: Check status and fail if necessary
if: ${{ inputs.ignore-failure == 'false' && steps.checks.outputs.status != 0 }}
run: |
echo "::error:: Releasability checks reported some errors."
exit 1
shell: bash