Skip to content

Commit

Permalink
update helpdesk logic to use Jira personal access tokens (#712)
Browse files Browse the repository at this point in the history
bonus:
- improved error handling to reduce crashes in other areas (captcha, eslint clients)
- heaps of logging (including debug mode #rejoice)
- add ‘@/‘ to absolute paths to match current community/industry practices.
  • Loading branch information
justincorrigible committed Jan 24, 2024
1 parent 32dc68c commit 966fcc5
Show file tree
Hide file tree
Showing 19 changed files with 1,425 additions and 1,239 deletions.
31 changes: 17 additions & 14 deletions .schema.env → .env.schema
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PORT=9000
ADVERTISED_HOST=http://localhost:9000
DEBUG_LOGGING=false # turns on `debug` level logging in production

# elasticsearch
ELASTICSEARCH_HOST=http://localhost:9200
Expand Down Expand Up @@ -60,28 +61,30 @@ DONOR_AGGREGATOR_API_ROOT=
DATA_CENTER_REGISTRY_API_ROOT=

# Jira Helpdesk
JIRA_ADMIN_VAULT_CREDENTIALS_PATH =
JIRA_REST_URI =
JIRA_SERVICEDESK_ID = 9

# For local testing only, fallback values if USE_VAULT = FALSE
JIRA_ADMIN_EMAIL=
JIRA_ADMIN_PASS=

# Optional
JIRA_ORGANIZATION_ID=
JIRA_ADMIN_VAULT_CREDENTIALS_PATH=
JIRA_REST_URI=
JIRA_SERVICEDESK_ID= 9
JIRA_PERSONAL_ACCESS_TOKEN= # PAT is used only when USE_VAULT is false
JIRA_ORGANIZATION_ID= # Optional

# feature flags
FEATURE_ARRANGER_SCHEMA_ENABLED=false
FEATURE_METADATA_ACCESS_CONTROL=false
FEATURE_HELP_DESK_ENABLED=false

# recaptcha configs
## set this to true for local development if you don't want to use real recaptcha client
DEV_RECAPTCHA_DISABLED=false
DEV_RECAPTCHA_DISABLED=false # set true for stub/dev recaptcha client
RECAPTCHA_SECRET_KEY=
RECAPTCHA_VAULT_SECRET_PATH=

# system alerts
## use a JSON string. [{title:'',message:'',dismissable:true|false,id:'unique-string',alert:'warning'|'error'|'info'}]
SYSTEM_ALERTS=
## use a JSON string wrapped in backticks. [{title:"",message:"",dismissable:true|false,id:"unique-string",alert:"warning"|"error"|"info"}]
SYSTEM_ALERTS=`[
{
"dismissable":false,
"id":"20240101-example",
"level":"info",
"message":"Lorem ipsum dolor sit amet",
"title":"Example Banner"
}
]`
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
parserOptions: {
ecmaVersion: 'latest',
extraFileExtensions: ['.json'],
project: ['./tsconfig.json'],
project: ['./tsconfig.json', './tsconfig.eslint.json'],
},
plugins: ['@typescript-eslint', 'prettier'],
root: true,
Expand Down Expand Up @@ -47,10 +47,10 @@ module.exports = {
'prettier/prettier': [
'error',
{
printWidth: 100,
trailingComma: 'all',
printWidth: 120,
semi: true,
singleQuote: true,
trailingComma: 'all',
useTabs: true,
},
],
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ typings/
.yarn-integrity

# dotenv environment variables file
.env
# only .env will actually be loaded
*.env*
!**/.env.schema

# next.js build output
.next
Expand Down
56 changes: 28 additions & 28 deletions Jenkinsfile.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -194,34 +194,34 @@ spec:
}
}

stage('Deploy to argo-dev') {
when {
anyOf {
branch 'develop'
expression { return params.DEPLOY_TO_DEV }
}
}
steps {
build(job: '/ARGO/provision/gateway', parameters: [
string(name: 'AP_ARGO_ENV', value: 'dev'),
string(name: 'AP_ARGS_LINE', value: "--set-string image.tag=${commit}"),
])
}
}

stage('Deploy to argo-qa') {
when {
anyOf {
branch 'main'
}
}
steps {
build(job: '/ARGO/provision/gateway', parameters: [
string(name: 'AP_ARGO_ENV', value: 'qa'),
string(name: 'AP_ARGS_LINE', value: "--set-string image.tag=${version}"),
])
}
}
// stage('Deploy to argo-dev') {
// when {
// anyOf {
// branch 'develop'
// expression { return params.DEPLOY_TO_DEV }
// }
// }
// steps {
// build(job: '/ARGO/provision/gateway', parameters: [
// string(name: 'AP_ARGO_ENV', value: 'dev'),
// string(name: 'AP_ARGS_LINE', value: "--set-string image.tag=${commit}"),
// ])
// }
// }

// stage('Deploy to argo-qa') {
// when {
// anyOf {
// branch 'main'
// }
// }
// steps {
// build(job: '/ARGO/provision/gateway', parameters: [
// string(name: 'AP_ARGO_ENV', value: 'qa'),
// string(name: 'AP_ARGS_LINE', value: "--set-string image.tag=${version}"),
// ])
// }
// }
}

post {
Expand Down
Loading

0 comments on commit 966fcc5

Please sign in to comment.