Skip to content

Commit cdde0a2

Browse files
committed
2 parents 257252f + 9368f90 commit cdde0a2

File tree

3 files changed

+124
-16
lines changed

3 files changed

+124
-16
lines changed

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM --platform=linux/amd64 node:16-buster-slim
2+
3+
ARG UID=34251
4+
ARG GID=34251
5+
ARG USERNAME=ds
6+
ARG GROUPNAME=ds
7+
ARG USERSHELL=/bin/bash
8+
9+
RUN groupadd --system ${GROUPNAME} -g ${GID} && \
10+
useradd --create-home --shell ${USERSHELL} --system --no-log-init -g ${GROUPNAME} -u ${UID} ${USERNAME}
11+
12+
WORKDIR /home/${USERNAME}
13+
14+
COPY package.json package-lock.json ./
15+
RUN npm install
16+
17+
COPY . .
18+
19+
20+
RUN chown -R ${USERNAME}:${GROUPNAME} /home/${USERNAME}/
21+
USER ${USERNAME}
22+
23+
EXPOSE 3000
24+
25+
CMD ["npm", "start"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ Also, in order to select JSON Web Token authentication in the launcher, in confi
117117
1. When prompted, log in to your DocuSign developer account. If this is your first time using the app, select **ACCEPT** at the consent window.
118118
3. Select your desired code example.
119119

120-
## JWT grant remote signing project
121-
See [DocuSign Quickstart overview](https://developers.docusign.com/docs/esign-rest-api/quickstart/overview/) on the DocuSign Developer Center for more information on how to run the JWT grant remote signing project.
120+
## JWT grant remote signing and Authorization Code Grant embedded signing projects
121+
See [DocuSign Quickstart overview](https://developers.docusign.com/docs/esign-rest-api/quickstart/overview/) on the DocuSign Developer Center for more information on how to run the JWT grant remote signing project and the Authorization Code Grant embedded signing project.
122122

123123
## Payments code example
124124

azure-pipelines.yml

Lines changed: 97 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,112 @@
22
# Start with a minimal pipeline that you can customize to build and deploy your code.
33
# Add steps that build, run tests, deploy, and more:
44
# https://aka.ms/yaml
5+
resources:
6+
repositories:
7+
- repository: launcher-automation
8+
type: github
9+
name: docusign/launcher-automation
10+
ref: main
11+
endpoint: launcherAutomationServiceConnection
512

6-
trigger:
13+
pr:
714
- master
8-
9-
# pool:
10-
# vmImage: ubuntu-latest
15+
- releases/*
1116

1217
pool:
13-
name: defualt
18+
name: launcher-automation-pool
1419

1520
steps:
1621
- script: echo Hello, world!
1722
displayName: 'Run a one-line script'
23+
- checkout: self
24+
- checkout: launcher-automation
25+
26+
- script: dir $(Build.SourcesDirectory)
27+
28+
- task: DownloadSecureFile@1
29+
name: node_dockerfile
30+
displayName: 'download Dockerfile'
31+
inputs:
32+
secureFile: 'node.Dockerfile'
33+
34+
- script: |
35+
echo "place node.Dockerfile"
36+
echo $(node_dockerfile.secureFilePath)
37+
cp $(node_Dockerfile.secureFilePath) code-examples-node-private/Dockerfile
38+
displayName: 'place Dockerfile'
39+
40+
- script: |
41+
allure –-version
42+
java --version
43+
javac --version
44+
mvn --version
45+
docker --version
46+
47+
- task: DownloadSecureFile@1
48+
name: tests_config_properties
49+
displayName: 'download config.properties'
50+
inputs:
51+
secureFile: 'tests_config.properties'
52+
53+
54+
- script: |
55+
echo "place config.properties"
56+
echo $(tests_config_properties.secureFilePath)
57+
cp $(tests_config_properties.secureFilePath) launcher-automation/src/main/resources/config.properties
58+
displayName: 'place config.properties'
59+
60+
- task: DownloadSecureFile@1
61+
name: node_appsettings
62+
displayName: 'download appsettings.json'
63+
inputs:
64+
secureFile: 'node_appsettings.json'
65+
66+
67+
- script: |
68+
echo "place appsettings.json"
69+
cp $(node_appsettings.secureFilePath) code-examples-node-private/config/appsettings.json
70+
displayName: 'place appsettings.json'
71+
72+
73+
- task: DownloadSecureFile@1
74+
name: node_private_key
75+
displayName: 'download private.key'
76+
inputs:
77+
secureFile: 'private.key'
1878

19-
# - script: |
20-
# echo Add other tasks to build, test, and deploy your project.
21-
# echo See https://aka.ms/yaml
22-
# displayName: 'Run a multi-line script'
2379

2480
- script: |
25-
allure –-version
26-
java --version
27-
javac --version
28-
mvn --version
29-
docker --version
81+
echo "place private.key"
82+
cp $(node_private_key.secureFilePath) code-examples-node-private/config/private.key
83+
displayName: 'place private.key'
84+
85+
- script: dir $(Build.SourcesDirectory)
86+
87+
- script: dir $(Build.SourcesDirectory)/code-examples-node-private
88+
89+
- script: dir $(Build.SourcesDirectory)/code-examples-node-private/config
3090

91+
- task: Docker@2
92+
displayName: Build node image
93+
inputs:
94+
command: build
95+
repository: 'launcher-automation-node'
96+
dockerfile: '$(Build.SourcesDirectory)/code-examples-node-private/Dockerfile'
97+
buildContext: '$(Build.SourcesDirectory)/code-examples-node-private '
98+
tags: |
99+
latest
100+
101+
- script: |
102+
docker run -p 3000:3000 -d launcher-automation-node:latest
103+
displayName: 'start node app'
104+
105+
- script: |
106+
cd launcher-automation
107+
mvn clean test -DsuiteXmlFile="node_suite.xml"
108+
displayName: 'Node app tests'
109+
110+
- script: |
111+
docker stop $(docker ps -a -q)
112+
docker rm $(docker ps -a -q)
113+
displayName: 'stop node app'

0 commit comments

Comments
 (0)