Update Jenkinsfile
Some checks failed
eCommerce-backend/pipeline/head There was a failure building this commit
Some checks failed
eCommerce-backend/pipeline/head There was a failure building this commit
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -22,8 +22,8 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
// Force nerdctl to use the socket by creating the directory it expects
|
// Force nerdctl to use the socket by creating the directory it expects
|
||||||
sh """
|
sh """
|
||||||
sudo mkdir -p /run/buildkit-default
|
mkdir -p /run/buildkit-default
|
||||||
sudo mkdir -p /run/buildkit
|
mkdir -p /run/buildkit
|
||||||
|
|
||||||
# Search for the buildkit socket in the entire /run directory
|
# Search for the buildkit socket in the entire /run directory
|
||||||
# and symlink it to the default location nerdctl wants
|
# and symlink it to the default location nerdctl wants
|
||||||
@@ -31,11 +31,11 @@ pipeline {
|
|||||||
|
|
||||||
if [ -n "\$BK_SOCKET" ]; then
|
if [ -n "\$BK_SOCKET" ]; then
|
||||||
echo "Found BuildKit socket at \$BK_SOCKET. Linking..."
|
echo "Found BuildKit socket at \$BK_SOCKET. Linking..."
|
||||||
sudo ln -sf \$BK_SOCKET /run/buildkit/buildkitd.sock
|
ln -sf \$BK_SOCKET /run/buildkit/buildkitd.sock
|
||||||
sudo ln -sf \$BK_SOCKET /run/buildkit-default/buildkitd.sock
|
ln -sf \$BK_SOCKET /run/buildkit-default/buildkitd.sock
|
||||||
else
|
else
|
||||||
echo "BuildKit socket not found. Attempting to start it locally..."
|
echo "BuildKit socket not found. Attempting to start it locally..."
|
||||||
sudo nohup buildkitd --addr unix:///run/buildkit/buildkitd.sock > /tmp/buildkitd.log 2>&1 &
|
nohup buildkitd --addr unix:///run/buildkit/buildkitd.sock > /tmp/buildkitd.log 2>&1 &
|
||||||
sleep 10
|
sleep 10
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user