Skip to content

Commit 2b55c3d

Browse files
committed
fix: Install js modules
Signed-off-by: Helio Chissini de Castro <heliocastro@gmail.com>
1 parent 6ccdbfb commit 2b55c3d

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

Jenkinsfile

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,28 @@ metadata:
1212
name: hugo-pod
1313
spec:
1414
containers:
15-
- name: "jnlp"
16-
volumeMounts:
17-
- mountPath: /home/jenkins/.ssh
18-
name: volume-known-hosts
19-
env:
20-
- name: "HOME"
21-
value: "/home/jenkins"
22-
- name: hugo
23-
image: hugomods/hugo:exts-non-root
24-
command:
25-
- cat
26-
tty: true
15+
- name: "jnlp"
16+
volumeMounts:
17+
- mountPath: /home/jenkins/.ssh
18+
name: volume-known-hosts
19+
env:
20+
- name: "HOME"
21+
value: "/home/jenkins"
22+
- name: hugo
23+
image: hugomods/hugo:exts-non-root
24+
command:
25+
- cat
26+
tty: true
27+
env:
28+
- name: "HOME"
29+
value: "/home/jenkins"
30+
volumeMounts:
31+
- mountPath: "/home/jenkins"
32+
name: "jenkins-home"
33+
readOnly: false
2734
volumes:
35+
- name: "jenkins-home"
36+
emptyDir: {}
2837
- configMap:
2938
name: known-hosts
3039
name: volume-known-hosts
@@ -70,7 +79,11 @@ spec:
7079
dir('hugo') {
7180
sh 'mkdir -p themes/docsy'
7281
sh 'hugo version'
73-
sh 'hugo build --ignoreCache --gc --enableGitInfo --cleanDestinationDir --minify -b https://www.eclipse.org/sw360/'
82+
sh 'id'
83+
sh 'mkdir $HOME/.npm'
84+
sh 'npm config get prefix -g'
85+
sh 'npm install --loglevel=verbose '
86+
sh 'hugo build --cleanDestinationDir --minify -b https://www.eclipse.org/sw360/'
7487
}
7588
}
7689
}
@@ -85,6 +98,7 @@ spec:
8598
dir('hugo') {
8699
sh 'mkdir -p themes/docsy'
87100
sh 'hugo version'
101+
sh 'npm install --no-fund'
88102
sh 'hugo build --ignoreCache --gc --enableGitInfo --cleanDestinationDir --minify -b https://www.eclipse.org/${PROJECT_NAME}/'
89103
}
90104
}

0 commit comments

Comments
 (0)