forked from port-labs/cookiecutter-gha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.envrc
47 lines (46 loc) · 1.94 KB
/
.envrc
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
ORG_NAME=SonarSource
#INPUT_PORTCLIENTID=
#INPUT_PORTCLIENTSECRET
INPUT_TOKEN=$(gh auth token)
#INPUT_PORTRUNID
INPUT_REPOSITORYNAME=BUILD-4989
INPUT_REPOSITORYVISIBILITY=private
# shellcheck disable=SC2089
INPUT_PORTUSERINPUTS='{
"cookiecutter_repository_name": "repo_test",
"cookiecutter_repository_description": "test cookiecutter-sonar",
"cookiecutter_owner_team": "the_owner_team",
"cookiecutter_repository_visibility": "private",
"cookiecutter_use_cirrus_ci": "yes",
"cookiecutter_use_release": "yes",
"cookiecutter_use_pre_commit": "yes"
}'
INPUT_COOKIECUTTERTEMPLATE=https://github.com/SonarSource/cookiecutter-sonar
INPUT_ORGANIZATIONNAME=SonarSource
INPUT_CREATEPORTENTITY=false
#INPUT_BLUEPRINTIDENTIFIER=service
INPUT_GITHUBURL='https://api.github.com'
#INPUT_MONOREPOURL
#INPUT_SCAFFOLDDIRECTORY
#INPUT_TEMPLATEDIRECTORY
# shellcheck disable=SC2090
export ORG_NAME INPUT_TOKEN INPUT_REPOSITORYNAME INPUT_REPOSITORYVISIBILITY INPUT_PORTUSERINPUTS INPUT_COOKIECUTTERTEMPLATE \
INPUT_ORGANIZATIONNAME INPUT_CREATEPORTENTITY INPUT_GITHUBURL
port_client_id="$INPUT_PORTCLIENTID"
port_client_secret="$INPUT_PORTCLIENTSECRET"
port_run_id="$INPUT_PORTRUNID"
github_token="$INPUT_TOKEN"
blueprint_identifier="$INPUT_BLUEPRINTIDENTIFIER"
repository_name="$INPUT_REPOSITORYNAME"
repository_visibility="$INPUT_REPOSITORYVISIBILITY"
org_name="$INPUT_ORGANIZATIONNAME"
cookie_cutter_template="$INPUT_COOKIECUTTERTEMPLATE"
template_directory="$INPUT_TEMPLATEDIRECTORY"
port_user_inputs="$INPUT_PORTUSERINPUTS"
monorepo_url="$INPUT_MONOREPOURL"
scaffold_directory="$INPUT_SCAFFOLDDIRECTORY"
create_port_entity="$INPUT_CREATEPORTENTITY"
branch_name="port_$port_run_id"
git_url="$INPUT_GITHUBURL"
export port_client_id port_client_secret port_run_id github_token blueprint_identifier repository_name repository_visibility org_name \
cookie_cutter_template template_directory port_user_inputs monorepo_url scaffold_directory create_port_entity branch_name git_url