Дженкинс не смог запустить скрипт оболочки.Я установил Jenkins на свой кластер kubernetes.Вот часть вывода консоли сборки:
Start building Frontend and Backend Docker images
[Pipeline] }
[Pipeline] container
[Pipeline] {
[Pipeline] container
[Pipeline] {
[Pipeline] echo
Building Bmf Frontend Image
[Pipeline] sh
[Pipeline] echo
Buildinging Bmf Backend Images
[Pipeline] sh
+ chmod +x build.sh
[Pipeline] // stage
[Pipeline] }
[Pipeline] sh
+ chmod +x build.sh
[Pipeline] sh
+ ./build.sh --build_bmf_frontend
build.sh - Script for building the Web Application, Docker image and Helm chart
Usage: ./build.sh <options>
--build_bmf_frontend : [optional] Build Bmf Frontend image
--build_bmf_backend : [optional] Build Bmf Backend image
--push_bmf_frontend : [optional] Push Bmf Frontend image
--push_bmf_backend : [optional] Push Bmf Backend image
--delete_frontend : [optional] Delete Bmf Frontend image
--delete_backend : [optional] Delete Bmf Backend image
--deploy_stage : [optional] Deploy to Stage Server
--deploy_production : [optional] Deploy to Production Server
--registry reg : [optional] A custom docker registry
--docker_usr user : [optional] Docker registry username
--docker_psw pass : [optional] Docker registry password
--tag tag : [optional] A custom app version
-h | --help : Show this usage
[Pipeline] }
[Pipeline] // container
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
Задание выполняется на работнике kubernetes, подготовленном из шаблона Kubernetes Pod Template.
Вот моя команда Jenkinsfile:
stage('Build BMF Frontend') {
steps {
container('jnlp') {
echo 'Building Bmf Frontend Image'
sh "chmod +x build.sh"
sh "./build.sh --build_bmf_frontend"
}
}
}
Ниже приведен скриншот моего рабочего пространства Jenkins;