-
Notifications
You must be signed in to change notification settings - Fork 46
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
Uat v2 #558
base: master
Are you sure you want to change the base?
Uat v2 #558
Changes from all commits
7f72372
15c2241
cfd3649
7d69d2b
03a2802
f4f4dc8
ff28f98
1dc1c9f
4948bf0
a64c4e1
12feac5
6961931
bd3c824
07efdea
d3b1d1b
4d89300
ffcbe59
418b1ac
f205551
8d77797
873c3d8
2dbae4c
1dcd134
3626b53
7d2738b
6b9b778
8b5ffb9
4af2d86
9820f84
f251971
ec38745
d5502b8
07b2354
6007178
47573ae
fde8a53
7a9ec8d
cf54a0a
1bebaf9
71b1975
b72c89d
c441a17
0104066
3db473f
2e3486e
2ba9aae
88fd3fc
85b31bd
64eb755
6933246
3488fd8
1497584
1994c5e
9113294
8e2776d
0c45a15
e91a7fe
0e95667
bddaa96
914a868
e3fc75b
8e87975
f308ae1
6b5f4de
070dfd2
747418e
ad2b4d7
b453140
00a8cda
e36ddc9
3d94da3
884fc32
74a2a65
42052af
83526dc
83204fb
6173125
216fabb
5e8b0b5
c965ec3
f3ed306
8cea941
39f866b
bbdb7df
74b39ab
2fc0813
a83f0f0
83b8957
0acc3a6
08b8407
b54e01c
e5d64a4
f516e99
88cf344
c02381c
7e7bc61
621684e
e92e53e
71f398c
413c02f
0304043
178dd89
f1c69da
c3da7d7
2412524
d6ecc92
3c54825
0a64631
7b0f63c
9f0d0bc
01a6821
ab0a319
d72918d
3391cd5
c5c530e
084e468
8583cc4
726b12f
531ff91
c920add
5f05c19
0266b42
cf2e471
a3e967e
c3506dd
2e07d74
8aded13
9908847
dd7809e
fae3b2c
639ee01
e0b6b84
e8a942d
a147bd2
2aeb293
de467f7
c4d49b0
6439274
437b035
d0d00ce
e78d770
74b796c
9cd195d
a857f2a
5aecee3
bbdcadf
a33cb78
8008fa6
4c5953b
eb14a82
75aee7c
e90ebae
343b9cc
33a5778
6c7308d
e987263
79c0fba
6e3e1f2
f72d589
071fabb
754701b
59e227d
cbb5d73
4d9c3dd
00afddb
a39ed4b
5529240
3b1225f
c50c852
c5163b7
bbfeec6
f064c67
f935bdd
447da69
12366c7
5abd7c8
acde17a
b6e966f
152c28c
580c7d5
83ba13d
bc5fca7
97ce3f0
2aee043
cd26193
3ecfb58
3f9e5e5
bb7bba7
1024f1a
84e914a
6463ef3
3188e51
358d902
e12ab8d
391ca6d
aeaf0ce
9e3dbf9
4c3ec66
57afe87
649851d
64943d2
0cf3f4b
fc133c0
f01c227
78eff7c
7fdb794
0f54193
ba1594b
a592a2c
653c0fa
da87cad
b1dce91
a2576ff
8003502
b69430d
faf7756
3df65c8
fed01ac
46e9fb4
631eac6
7056e43
1358def
c5ccc23
e28c576
240931d
6a46010
b6ec97d
c4de68d
60ecfca
6f3bb3f
7c39adf
ab088fd
afa34e7
bb7bee8
e3f02be
93b5c15
7d7eeb7
67f918a
8357977
58a2eef
a48904b
6545bcc
04e0565
dfe1925
60f8d64
414fa22
3556c2c
3a6ebb3
c016cf4
36c7ce1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,3 @@ | ||
def app = ""; | ||
def commit_id=""; | ||
def module_name = "${env.JOB_NAME}".split("/")[-2]; | ||
def service_name = "${env.JOB_BASE_NAME}"; | ||
def path = "${module_name}/${service_name}" | ||
def build_wkflo; | ||
def ci_image = "egovio/ci:0.0.4" | ||
def notifier = ""; | ||
library 'ci-libs' | ||
|
||
try { | ||
node("slave"){ | ||
checkout scm | ||
sh "git rev-parse --short HEAD > .git/commit-id".trim() | ||
commit_id = readFile('.git/commit-id') | ||
|
||
def docker_file_exists = fileExists("${path}/Dockerfile") | ||
|
||
code_builder = load("jenkins/code_builder.groovy") | ||
notifier = load("jenkins/notifier.groovy") | ||
currentBuild.displayName = "${BUILD_ID}-${commit_id}" | ||
|
||
if (!docker_file_exists) { | ||
code_builder.build(path, ci_image) | ||
} | ||
else { | ||
archiver = load("jenkins/archiver.groovy") | ||
image_builder = load("jenkins/image_builder.groovy") | ||
code_builder.build(path, ci_image) | ||
archiver.archiveArtifacts(["${path}/target/*.jar", "${path}/target/*.html"]) | ||
image_builder.build(module_name, service_name, commit_id) | ||
image_builder.publish(service_name, commit_id) | ||
image_builder.clean(service_name, commit_id) | ||
} | ||
} | ||
} catch (e) { | ||
node{ | ||
echo | ||
notifier.notifyBuild("FAILED") | ||
throw e | ||
} | ||
} | ||
buildPipeline(configFile: './build/build-config.yml') |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# | ||
# config: | ||
# - name: < Name of the job, foo/bar would create job named bar inside folder foo > | ||
# build: | ||
# - work-dir: < Working directory of the app to be built > | ||
# dockerfile: < Path to the dockerfile, optional, assumes dockerfile in working directory if not provided > | ||
# image-name: < Docker image name > | ||
# - | ||
# - | ||
config: | ||
- name: "builds/punjab-rainmaker-customization/rainmaker-custom-service" | ||
build: | ||
- work-dir: "rainmaker-custom-service" | ||
image-name: "rainmaker-custom-service" | ||
dockerfile: "rainmaker-custom-service/Dockerfile" |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,9 @@ | ||||||||||
FROM node:8.12-alpine | ||||||||||
RUN npm install -g yarn | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Installing Yarn globally as root can pose security risks. Consider using a non-root user for running the application and its dependencies. + RUN adduser -D appuser
+ USER appuser Committable suggestion
Suggested change
|
||||||||||
RUN mkdir /opt/app | ||||||||||
COPY package.json yarn.lock /opt/app/ | ||||||||||
WORKDIR /opt/app | ||||||||||
RUN yarn install | ||||||||||
COPY . /opt/app | ||||||||||
Comment on lines
+4
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that only necessary files are copied to the Docker image to avoid bloating the image. Consider using a |
||||||||||
CMD ["node", "index.js"] | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,11 @@ | ||||||
#!/bin/sh | ||||||
|
||||||
if [[ -z "${JAVA_OPTS}" ]];then | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of - if [[ -z "${JAVA_OPTS}" ]];then
+ if [ -z "${JAVA_OPTS}" ]; then Committable suggestion
Suggested change
|
||||||
export JAVA_OPTS="-Xmx64m -Xms64m" | ||||||
fi | ||||||
|
||||||
if [ x"${JAVA_ENABLE_DEBUG}" != x ] && [ "${JAVA_ENABLE_DEBUG}" != "false" ]; then | ||||||
java_debug_args="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${JAVA_DEBUG_PORT:-5005}" | ||||||
fi | ||||||
|
||||||
exec java ${java_debug_args} ${JAVA_OPTS} ${JAVA_ARGS} -jar /opt/egov/*.jar |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>egov-dss-dashboards</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
</buildSpec> | ||
<natures> | ||
</natures> | ||
</projectDescription> |
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using an older version of Node.js (
node:8.12-alpine
) might introduce security vulnerabilities and compatibility issues. Consider updating to a more recent LTS version of Node.js.Committable suggestion