forked from coveo/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
28 lines (24 loc) · 869 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
node('linux && docker') {
checkout scm
def releaseCommit
withDockerContainer(image: 'node:18', args: '-u=root') {
stage('Setup') {
// Fix dubious ownership error in Jenkins
sh "git config --global --add safe.directory ${WORKSPACE}"
sh 'npm ci --ignore-scripts'
}
stage('Download release assets') {
withCredentials([
string(credentialsId: ' github-coveobot_token', variable: 'GITHUB_CREDENTIALS')
]) {
sh 'node ./scripts/get-release-artifact-and-commit-sha.mjs'
releaseCommit = readFile 'latest-commit'
}
}
}
withDockerContainer(image: '458176070654.dkr.ecr.us-east-1.amazonaws.com/jenkins/deployment_package:v7') {
stage('Create package') {
sh "deployment-package package create --artifacts-location ./artifacts/ --with-deploy --changeset ${releaseCommit}"
}
}
}