Skip to content

Commit

Permalink
updated base build config for smartsheets & an optional rowId link in… (
Browse files Browse the repository at this point in the history
#139)

* updated base build config for smartsheets & an optional rowId link in the event log as an enhancement

* build yml update

* added library upgrade and another dependency to base build for the smartsheets integration

* use of '--no-cache-dir' in pip install commands for base build
  • Loading branch information
matallen authored Apr 24, 2021
1 parent 47f9758 commit 8508134
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .openshift/params/ninja-board-deployment
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ github_api_token: ""
trello_api_token: ""
trello_api_key: ""
gitlab_api_token: ""
smartsheets_api_token: ""
gd_credentials: ''
xgraphs_proxy: ""
users_ldap_provider: ""

# Alternatively, use environment speicfic variables
# Alternatively, use environment specific variables

## Development
#dev_github_api_token: ""
Expand All @@ -26,4 +27,4 @@ users_ldap_provider: ""
#prod_gitlab_api_token: ""
#prod_gd_credentials: ''
#prod_xgraphs_proxy: ""
#prod_users_ldap_provider: ""
#prod_users_ldap_provider: ""
10 changes: 7 additions & 3 deletions .openshift/templates/ninja-board-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ objects:
FROM openshift3/jboss-webserver31-tomcat7-openshift:latest
USER 0
RUN yum clean all && \
INSTALL_PKGS="python-requests pytz" && \
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
INSTALL_PKGS="python2-pip python-requests pytz" && \
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
yum clean all
yum clean all && \
pip install --no-cache-dir enum smartsheet-python-sdk
pip install --no-cache-dir urllib3 --upgrade && \
pip install --no-cache-dir enum34
USER 185
type: Dockerfile
strategy:
Expand Down Expand Up @@ -152,4 +156,4 @@ parameters:
required: true
- description: Name of the Production Namespace
name: PROD_NAMESPACE
required: true
required: true
7 changes: 6 additions & 1 deletion .openshift/templates/ninja-board-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ objects:
value: ${TRELLO_API_KEY}
- name: GITLAB_API_TOKEN
value: ${GITLAB_API_TOKEN}
- name: SMARTSHEETS_API_TOKEN
value: ${SMARTSHEETS_API_TOKEN}
- name: GD_CREDENTIALS
value: ${GD_CREDENTIALS}
- name: XGRAPHS_PROXY
Expand Down Expand Up @@ -160,6 +162,9 @@ parameters:
- description: Token for the Gitlab API.
name: GITLAB_API_TOKEN
required: true
- description: Token for the Smartsheets API.
name: SMARTSHEETS_API_TOKEN
required: true
- description: Google Drive credentials.
name: GD_CREDENTIALS
required: true
Expand All @@ -168,4 +173,4 @@ parameters:
required: true
- description: LDAP Provider address.
name: USERS_LDAP_PROVIDER
required: true
required: true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export TRELLO_API_TOKEN=<your token>
export TRELLO_API_KEY=<your token>
export GITHUB_API_TOKEN=<your token>
export GITLAB_API_TOKEN=<your token>
export SMARTSHEETS_API_TOKEN=<your token>
export GD_CREDENTIALS=<contents of you google drive credentials.json file (escaped & in quotes)>
export GRAPHS_PROXY=<optional: url to an external proxy storage app>
export USERS_LDAP_PROVIDER=<optional: ldap url for user lookup>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/redhat/sso/ninja/Database2.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static String buildLinkMarkdown(Map<String,String> params){
return "<https://github.com/"+params.get("org")+"/"+params.get("board")+"/issues/"+params.get("linkId")+">";
}
}else if (params.get("id").startsWith("SS")){ // smartsheets
return "[Smartsheets: "+params.get("linkId")+"](https://app.smartsheet.com/sheets/"+params.get("board")+")";
return "[Smartsheets: "+params.get("linkId")+"](https://app.smartsheet.com/sheets/"+params.get("board")+(null!=params.get("rowId")?"?rowId="+params.get("rowId"):"")+")";
}
return "";
}
Expand Down

0 comments on commit 8508134

Please sign in to comment.