Hi all,
I failed the task twice, on the other hand the pipeline is successful and the build of the image as well as the push of the image successfully
where exactly is the problem
thanks
Hi all,
I failed the task twice, on the other hand the pipeline is successful and the build of the image as well as the push of the image successfully
where exactly is the problem
thanks
i have the same problem
Hello, Probleme résolved
must be used Scripted pipelines instead of Declarative pipelines, because in the description of the task it insists on being a single stage
on the other hand, the declarative pipeline uses steps.
thanks
no matter what I try the task gets failed.
logs:
Started from command line by admin
[Pipeline] Start of Pipeline
[Pipeline] node
Running on app01 in /home/tony/workspace/nginx-container
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] git
The recommended git tool is: NONE
No credentials specified
Fetching changes from the remote Git repository
git rev-parse --resolve-git-dir /home/tony/workspace/nginx-container/.git # timeout=10
git config remote.origin.url http://git.stratos.xfusioncorp.com/sarah/web.git # timeout=10
Fetching upstream changes from http://git.stratos.xfusioncorp.com/sarah/web.git
git --version # timeout=10
git --version # ‘git version 2.39.3’
git fetch --tags --force --progress – http://git.stratos.xfusioncorp.com/sarah/web.git +refs/heads/:refs/remotes/origin/ # timeout=10
Checking out Revision e05c55c17c6f80be95970137272dd4937fe5ee5e (refs/remotes/origin/master)
Commit message: “Added dockerfile”
git rev-parse refs/remotes/origin/master^{commit} # timeout=10
git config core.sparsecheckout # timeout=10
git checkout -f e05c55c17c6f80be95970137272dd4937fe5ee5e # timeout=10
git branch -a -v --no-abbrev # timeout=10
git branch -D master # timeout=10
git checkout -b master e05c55c17c6f80be95970137272dd4937fe5ee5e # timeout=10
git rev-list --no-walk e05c55c17c6f80be95970137272dd4937fe5ee5e # timeout=10
[Pipeline] sh
Step 1/2 : FROM nginx:stable-alpine3.17-slim
—> 517cf77e51a3
Step 2/2 : COPY index.html /usr/share/nginx/html/
—> ea693497474d
Successfully built ea693497474d
Successfully tagged stregi01.stratos.xfusioncorp.com:5000/nginx:latest
[Pipeline] sh
Pipeline script:
Please suggest what can be done?
Try to install SSH Build Agents, git, Docker Pipeline, Pipeline: Job , Pipeline,Pipeline: API plugins.
And make declarative pipline:
pipeline {
agent {
label 'stapp1'
}
stages {
stage('Build') {
steps {
script {
git credentialsId: 'git', url: 'http://git.stratos.xfusioncorp.com/sarah/web.git'
def dockerImage = docker.build('stregi01.stratos.xfusioncorp.com:5000/nginx:latest')
dockerImage.push()
}
}
}
}
}
Dont forget to make ‘git’ credentials for git repo.
Hi @awantika-kodekloud, @Tej-Singh-Rana,
I got issue with Jenkins Level3 - task Jenkins Build Images lab, same as described here, but for another lab: Level-4 "Jenkins MR Jobs" --- Validation Issue
Each time I try to build a docker image I get error:
#6 [2/2] COPY index.html /usr/share/nginx/html/
#6 ERROR: using mount program fuse-overlayfs: unknown argument ignored: lazytime
/proc seems to be mounted as readonly, it can lead to unexpected failuresfuse: device not found, try 'modprobe fuse' first
fuse-overlayfs: cannot mount: No such file or directory
: exit status 1
------
> [2/2] COPY index.html /usr/share/nginx/html/:
------
Dockerfile:2
--------------------
1 | FROM nginx:stable-alpine3.17-slim
2 | >>> COPY index.html /usr/share/nginx/html/
--------------------
ERROR: failed to solve: using mount program fuse-overlayfs: unknown argument ignored: lazytime
/proc seems to be mounted as readonly, it can lead to unexpected failuresfuse: device not found, try 'modprobe fuse' first
fuse-overlayfs: cannot mount: No such file or directory
: exit status 1
My pipeline script:
pipeline {
agent {
label 'stapp03'
}
stages {
stage('Build') {
steps {
script {
git credentialsId: 'gitea', url: 'http://git.stratos.xfusioncorp.com/sarah/web.git'
def dockerImage = docker.build('stregi01.stratos.xfusioncorp.com:5000/nginx:latest')
dockerImage.push()
}
}
}
}
}
Please note, that I got same error if I try to build directly on the server
[root@stapp03 web]# docker build -t stregi01.stratos.xfusioncorp.com:5000/nginx:latest .
[+] Building 0.5s (6/6) FINISHED docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 109B 0.0s
=> [internal] load metadata for docker.io/library/nginx:stable-alpine3.17-slim 0.3s
=> [internal] load build context 0.0s
=> => transferring context: 57B 0.0s
=> CACHED [1/2] FROM docker.io/library/nginx:stable-alpine3.17-slim@sha256:fc1a9aa333462a071dfa 0.0s
=> ERROR [2/2] COPY index.html /usr/share/nginx/html/ 0.1s
------
> [2/2] COPY index.html /usr/share/nginx/html/:
------
Dockerfile:2
--------------------
1 | FROM nginx:stable-alpine3.17-slim
2 | >>> COPY index.html /usr/share/nginx/html/
--------------------
ERROR: failed to solve: using mount program fuse-overlayfs: unknown argument ignored: lazytime
/proc seems to be mounted as readonly, it can lead to unexpected failuresfuse: device not found, try 'modprobe fuse' first
fuse-overlayfs: cannot mount: No such file or directory
: exit status 1
[root@stapp03 web]# modprobe fuse
modprobe: FATAL: Module fuse not found in directory /lib/modules/5.4.0-1106-gcp
[root@stapp03 web]#
Hi @sarhipov,
Thanks for reaching out to us. I have forwarded your concern to the KKE lab team. They will look into this. Please be patience and give us some time.
Regards,
Hi,
To avoid the issue of docker image build
ERROR: using mount program fuse-overlayfs: unknown argument ignored: lazytime
fuse: device not found, try 'modprobe fuse' first
fuse-overlayfs: cannot mount: No such file or directory
=> don’t do any update for yum on target server
=> the command yum update
change docker version and modify the Storage Driver from vfs to fuse-overlayfs
Hi,
I am facing the same issue, I tried multiple declarative pipeline however it keeps on failing.
Pipelines used:
pipeline {
agent {
label ‘stapp02’
}
stages {
stage(‘Build’) {
steps {
script {
git credentialsId: ‘git’, url: ‘http://git.stratos.xfusioncorp.com/sarah/web.git’
def dockerImage = docker.build(‘stregi01.stratos.xfusioncorp.com:5000/nginx:latest’)
dockerImage.push()
}
}
}
}
}
and
pipeline {
agent {
label ‘stapp02’
}
stages {
stage('Build') {
steps {
git branch: "master",
url: "http://git.stratos.xfusioncorp.com/sarah/web.git"
sh 'docker build -t stregi01.stratos.xfusioncorp.com:5000/nginx:latest .'
sh 'docker push stregi01.stratos.xfusioncorp.com:5000/nginx:latest'
}
}
}
}