Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/upgrade docusign library #4055

Merged
merged 11 commits into from
Jul 21, 2023
3 changes: 2 additions & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ jobs:
- name: Python Setup
working-directory: cla-backend
run: |
pip install --platform manylinux2014_x86_64 --only-binary=:all: --target=/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages cryptography -r requirements-docusign.txt
pip install -r requirements.txt

- name: Python Lint
working-directory: cla-backend
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ jobs:
- name: Python Setup
working-directory: cla-backend
run: |
pip install --platform manylinux2014_x86_64 --only-binary=:all: --target=/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages cryptography -r requirements-docusign.txt
pip install -r requirements.txt

- name: Python Lint
working-directory: cla-backend
run: |
Expand Down
5 changes: 2 additions & 3 deletions cla-backend-go/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,8 @@ provider:
SF_USERNAME: ${file(./env.json):sf-username, ssm:/cla-sf-username-${opt:stage}}
SF_PASSWORD: ${file(./env.json):sf-password, ssm:/cla-sf-password-${opt:stage}}
DOCRAPTOR_API_KEY: ${file(./env.json):doc-raptor-api-key, ssm:/cla-doc-raptor-api-key-${opt:stage}}
DOCUSIGN_ROOT_URL: ${file(./env.json):docusign-root-url, ssm:/cla-docusign-root-url-${opt:stage}}
DOCUSIGN_USERNAME: ${file(./env.json):docusign-username, ssm:/cla-docusign-username-${opt:stage}}
DOCUSIGN_PASSWORD: ${file(./env.json):docusign-password, ssm:/cla-docusign-password-${opt:stage}}
DOCUSIGN_AUTH_SERVER: ${file(./env.json):docusign-auth-server, ssm:/cla-docusign-auth-server-${sls:stage}}
DOCUSIGN_USER_ID: ${file(./env.json):docusign-user-id, ssm:/cla-docusign-user-id-${sls:stage}}
DOCUSIGN_INTEGRATOR_KEY: ${file(./env.json):docusign-integrator-key, ssm:/cla-docusign-integrator-key-${opt:stage}}
CLA_API_BASE: ${file(./env.json):cla-api-base, ssm:/cla-api-base-${opt:stage}}
CLA_CONTRIBUTOR_BASE: ${file(./env.json):cla-contributor-base, ssm:/cla-contributor-base-${opt:stage}}
Expand Down
2 changes: 2 additions & 0 deletions cla-backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ setup:
pip3 install virtualenv;
virtualenv -p python3 ~/.env/lf-cla;
source ~/.env/lf-cla/bin/activate; \
pip3 install --platform manylinux2014_x86_64 --only-binary=:all: --target=/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages cryptography -r requirements-docusign.txt; \
pip3 install -r requirements.txt; \

.PHONY: setup_circle
setup_circle:
npm install; \
sudo pip install --platform manylinux2014_x86_64 --only-binary=:all: --target=/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages cryptography -r requirements-docusign.txt; \
sudo pip install -r requirements.txt; \

# username: LFID username
Expand Down
427 changes: 266 additions & 161 deletions cla-backend/cla/models/docusign_models.py

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion cla-backend/cla/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ def get_signing_service(conf=None, initialize=True):
raise Exception('Invalid signing service selected in configuration: %s' % signing_service)
signing_service_instance = signing()
if initialize:
signing_service_instance.initialize(conf)
resp = signing_service_instance.initialize(conf)
if resp != None:
raise Exception('docusign authentication error : %s' % resp["errors"])
return signing_service_instance


Expand Down
3 changes: 3 additions & 0 deletions cla-backend/requirements-docusign.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright The Linux Foundation and each contributor to CommunityBridge.
# SPDX-License-Identifier: MIT
docusign-esign==3.22.0
1 change: 0 additions & 1 deletion cla-backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ packaging==20.5
pluggy==0.13.1
py==1.10.0
pyasn1==0.4.8
pydocusign==2.2
PyGithub==1.55
PyJWT==2.7.0
pylint==1.5.2
Expand Down
5 changes: 2 additions & 3 deletions cla-backend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,8 @@ provider:
SF_USERNAME: ${file(./env.json):sf-username, ssm:/cla-sf-username-${sls:stage}}
SF_PASSWORD: ${file(./env.json):sf-password, ssm:/cla-sf-password-${sls:stage}}
DOCRAPTOR_API_KEY: ${file(./env.json):doc-raptor-api-key, ssm:/cla-doc-raptor-api-key-${sls:stage}}
DOCUSIGN_ROOT_URL: ${file(./env.json):docusign-root-url, ssm:/cla-docusign-root-url-${sls:stage}}
DOCUSIGN_USERNAME: ${file(./env.json):docusign-username, ssm:/cla-docusign-username-${sls:stage}}
DOCUSIGN_PASSWORD: ${file(./env.json):docusign-password, ssm:/cla-docusign-password-${sls:stage}}
DOCUSIGN_AUTH_SERVER: ${file(./env.json):docusign-auth-server, ssm:/cla-docusign-auth-server-${sls:stage}}
DOCUSIGN_USER_ID: ${file(./env.json):docusign-user-id, ssm:/cla-docusign-user-id-${sls:stage}}
DOCUSIGN_INTEGRATOR_KEY: ${file(./env.json):docusign-integrator-key, ssm:/cla-docusign-integrator-key-${sls:stage}}
CLA_API_BASE: ${file(./env.json):cla-api-base, ssm:/cla-api-base-${sls:stage}}
CLA_CONTRIBUTOR_BASE: ${file(./env.json):cla-contributor-base, ssm:/cla-contributor-base-${sls:stage}}
Expand Down
Loading