Skip to content

Commit f2e37db

Browse files
authored
Merge pull request #80 from visenze/develop
[ES-10159] Release 4.1.3
2 parents 439628a + 148c627 commit f2e37db

7 files changed

Lines changed: 1132 additions & 1235 deletions

File tree

Jenkinsfile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ def getVersion() {
77
return version
88
}
99

10+
def runDockerCmd(cmd, envVars = "") {
11+
return "docker run --rm -v ${WORKSPACE}:${WORKSPACE} ${envVars} -w ${WORKSPACE} node:16-bullseye-slim ${cmd}"
12+
}
13+
1014
pipeline {
1115
agent {
12-
label "${params.AGENT_LABEL ?: 'build-amd64'}"
16+
label "${params.AGENT_LABEL ?: 'build-arm64'}"
1317
}
1418

1519
environment {
@@ -20,23 +24,23 @@ pipeline {
2024
ENDPOINT = "https://search-dev.visenze.com"
2125
}
2226

23-
tools {
24-
nodejs('NodeJS16')
25-
}
26-
2727
stages {
2828
stage('Test') {
2929
steps {
3030
script {
31-
sh 'npm ci'
32-
sh 'npm run write-version'
33-
sh 'npx tsc'
31+
sh runDockerCmd('npm ci')
32+
sh runDockerCmd('npm run write-version')
33+
sh runDockerCmd('npx tsc')
3434
withCredentials([
3535
string(credentialsId: 'search.sg.app-1823.staging', variable: 'SEARCH_APP_KEY'),
3636
string(credentialsId: 'rec.sg.app-2967.staging', variable: 'REC_APP_KEY'),
3737
]) {
38+
def envVars = "-e SEARCH_PLACEMENT_ID=${SEARCH_PLACEMENT_ID} -e SEARCH_IM_URL=${SEARCH_IM_URL} \
39+
-e REC_PLACEMENT_ID=${REC_PLACEMENT_ID} -e REC_PID=${REC_PID} \
40+
-e SEARCH_APP_KEY=${SEARCH_APP_KEY} -e REC_APP_KEY=${REC_APP_KEY} \
41+
-e ENDPOINT=${ENDPOINT}"
3842
codeclimate.testWithCoverage({
39-
sh 'npm run test-with-coverage'
43+
sh runDockerCmd('npm run test-with-coverage', envVars)
4044
})
4145
}
4246
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ npm install visearch-javascript-sdk
9595

9696
```html
9797
<script type="text/javascript">
98-
!function(e,t,r,s,a){if(Array.isArray(a))for(var n=0;n<a.length;n++)o(e,t,r,s,a[n]);else o(e,t,r,s,a);function o(e,t,r,s,a){var n=e[a]||{};e[a]=n,n.q=n.q||[],n.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);return t.unshift(e),n.q.push(t),n}},n.methods=["set","setKeys","sendEvent","sendEvents","productMultisearch","productMultisearchAutocomplete","productSearchByImage","productSearchById","productRecommendations","productSearchByIdByPost","productRecommendationsByPost","setUid","getUid","getSid","getLastQueryId","getSessionTimeRemaining","getDefaultTrackingParams","resetSession","resizeImage","generateUuid",];for(var o=0;o<n.methods.length;o++){var i=n.methods[o];n[i]=n.factory(i)}if(e.viInit)viInit(e,a);else{var c,d,u,f,g,m=(c=t,d=r,u=s,(f=c.createElement(d)).type="text/javascript",f.async=!0,f.src=u,(g=c.getElementsByTagName(d)[0]).parentNode.insertBefore(f,g),f);m.onload=function(){viInit(e,a)},m.onerror=function(){console.log("ViSearch Javascript SDK load fails")}}}}(window,document,"script","https://cdn.visenze.com/visearch/dist/js/visearch-4.1.2.min.js","visearch");
98+
!function(e,t,r,s,a){if(Array.isArray(a))for(var n=0;n<a.length;n++)o(e,t,r,s,a[n]);else o(e,t,r,s,a);function o(e,t,r,s,a){var n=e[a]||{};e[a]=n,n.q=n.q||[],n.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);return t.unshift(e),n.q.push(t),n}},n.methods=["set","setKeys","sendEvent","sendEvents","productMultisearch","productMultisearchAutocomplete","productSearchByImage","productSearchById","productRecommendations","productSearchByIdByPost","productRecommendationsByPost","setUid","getUid","getSid","getLastQueryId","getSessionTimeRemaining","getDefaultTrackingParams","resetSession","resizeImage","generateUuid",];for(var o=0;o<n.methods.length;o++){var i=n.methods[o];n[i]=n.factory(i)}if(e.viInit)viInit(e,a);else{var c,d,u,f,g,m=(c=t,d=r,u=s,(f=c.createElement(d)).type="text/javascript",f.async=!0,f.src=u,(g=c.getElementsByTagName(d)[0]).parentNode.insertBefore(f,g),f);m.onload=function(){viInit(e,a)},m.onerror=function(){console.log("ViSearch Javascript SDK load fails")}}}}(window,document,"script","https://cdn.visenze.com/visearch/dist/js/visearch-4.1.3.min.js","visearch");
9999
</script>
100100
```
101101

0 commit comments

Comments
 (0)