CI/CD with Jenkins using Pipelines and Docker
This is the course material for the Jenkins Course on Udemy (Learn DevOps: CI/CD with Jenkins using Pipelines and Docker)
This is the repository with all the resources for the Jenkins training on Udemy
CI/CD with Jenkins using Pipelines and Docker
This is the course material for the Jenkins Course on Udemy (Learn DevOps: CI/CD with Jenkins using Pipelines and Docker)
I try to use scripts for Debian os but when I run the script it gives me an Error, like below:
E: Unable to locate package docker-ce
Failed to enable unit: File docker.service: No such file or directory
Failed to start docker.service: Unit docker.service not found.
install_jenkins_debian.sh: line 20: docker: command not found
Note: I am running it in mac os
any clue?
i have copied the Jenkinsfile for email-notification, but i have doubt that where did you mentioned email address "[email protected]"
in your mail declaration section u have provided below,
def to = emailextrecipients([
[$class: 'CulpritsRecipientProvider'],
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider']
])
I have created an account in mailtrap and after that , when i build the pipeline the email doesnt arrived in my mailtrap inbox.
I have already added the username and password in , " Configure System " section
i am running the docker-compose up but when i do docker ps -a
i can see the jenkins container is exited as soon as it started
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7fbed63e466e jenkins-docker:latest "/sbin/tini -- /usr/ā¦" 6 seconds ago Exited (1) 5 seconds ago jenkins_jenkins_1
fe2b4cb03592 sonarqube:lts "./bin/run.sh" 23 minutes ago Up 23 minutes 0.0.0.0:9000->9000/tcp, 0.0.0.0:9092->9092/tcp jenkins_sonarqube_1
8d1e7bc8602c postgres:9.6 "docker-entrypoint.sā¦" 23 minutes ago Up 23 minutes 5432/tcp jenkins_postgres_1
When I try to use the cloudbees plugin to build and publish a docker image I get the following error:
denied: requested access to the resource is denied
Build step 'Docker Build and Publish' marked build as failure
I have configured the correct registry credentials and use the same example as you have. I also created a repository on dockerhub. I also tried to add an execute shell buildscript before the build and publish with the following command 'docker login -u USERNAME -p PASSWORD and then it worked without problem. But obviously I can't leave my password in plaintext in the configuration. Anybody else having this issue?
Full error in Jenkins:
Started by user svc_tmserver
[EnvInject] - Loading node environment variables.
Building in workspace /var/jenkins_home/jobs/hello-world/workspace
using credential 871b61e0-113b-43b4-95b8-fcc823fe3ca5
git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
git config remote.origin.url https://gitlab.com/RuneHanssens/hello-world-2.git # timeout=10
Fetching upstream changes from https://gitlab.com/RuneHanssens/hello-world-2.git
git --version # timeout=10
using GIT_ASKPASS to set credentials
git fetch --tags --progress https://gitlab.com/RuneHanssens/hello-world-2.git +refs/heads/:refs/remotes/origin/
git rev-parse refs/remotes/origin/master^{commit} # timeout=10
git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision c09d3c94944d9cef36549e918d036824e601bd37 (refs/remotes/origin/master)
git config core.sparsecheckout # timeout=10
git checkout -f c09d3c94944d9cef36549e918d036824e601bd37
Commit message: "added dockerfile"
git rev-list --no-walk c09d3c94944d9cef36549e918d036824e601bd37 # timeout=10
[workspace] $ /bin/sh -xe /tmp/jenkins7585591487026862113.sh
[workspace] $ docker build -t runehanssens/hello-world --pull=true /var/jenkins_home/jobs/hello-world/workspace
Sending build context to Docker daemon 80.38kB
Step 1/6 : FROM node:alpine
alpine: Pulling from library/node
Digest: sha256:a93cc66176b000e09f7011622c9f2f0faa982fe7e01c961b2506e14b07834175
Status: Image is up to date for node:alpine
---> 4c6406de22fd
Step 2/6 : WORKDIR /app
---> Using cache
---> bf0dcad1057d
Step 3/6 : ADD . /app
---> Using cache
---> f62193498aca
Step 4/6 : RUN npm install
---> Using cache
---> cf049611a897
Step 5/6 : EXPOSE 3001
---> Using cache
---> 94368feeec01
Step 6/6 : CMD npm start
---> Using cache
---> 394875cc21de
Successfully built 394875cc21de
Successfully tagged runehanssens/hello-world:latest
[workspace] $ docker inspect 394875cc21de
[workspace] $ docker push runehanssens/hello-world
The push refers to repository [docker.io/runehanssens/hello-world]
bb6c028492f7: Preparing
81902eb9f4ba: Preparing
87f557d84778: Preparing
8977df70d24f: Preparing
a2228fbe95fa: Preparing
fe1f3c52b497: Preparing
f1b5933fe4b5: Preparing
fe1f3c52b497: Waiting
f1b5933fe4b5: Waiting
denied: requested access to the resource is denied
Build step 'Docker Build and Publish' marked build as failure
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Finished: FAILURE
A declarative, efficient, and flexible JavaScript library for building user interfaces.
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ššš
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ā¤ļø Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.