-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommit-bitmap
More file actions
46 lines (43 loc) · 1.02 KB
/
commit-bitmap
File metadata and controls
46 lines (43 loc) · 1.02 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
pipeline {
agent {
docker {
image 'bitsrc/stable:latest'
args '-u root --privileged'
}
}
environment {
GIT_USER_NAME = 'git_user_name'
GIT_USER_EMAIL = 'git_user_email'
BIT_CONFIG_USER_TOKEN = 'bit_config_access_token'
}
stages {
stage('Build') {
steps {
script {
sh '''
# added from bit-init.sh
cd "my-workspace-directory"
bit install
# added from commit-bitmap.sh
git config --global user.name "${GIT_USER_NAME}"
git config --global user.email "${GIT_USER_EMAIL}"
git add .bitmap pnpm-lock.yaml
# try to commit the changes
git commit -m "update .bitmap with new component versions (automated). [skip-ci]" &> /dev/null
if [ $? -ne 0 ]; then
echo "Error while committing changes"
fi
git push
'''
}
}
}
}
post {
always {
script {
cleanWs()
}
}
}
}