Git Product home page Git Product logo

course-jenkins-getting-started's Introduction

Jenkins Getting Started

2nd Edition Examples [CURRENT EDITION]

2nd Edition docs/notes

See the docs folder for various additional notes I've left for you. Quite a bit of this is stuff not in the course that I wanted to share with you as you get started. Some of it is fodder for learning beyond the course.

FAQ

  • I am having an issue with building code in the jenkins2-... repository, how do I fix that
    • If you are watching the updated / 2nd Edition course (most likely). Use the updated repos too (see above).
    • If you want a challenge or are watching the 1st edition, try to adapt the 1st edition repos to work with the 2nd edition examples! A great learning opportunity!

1st Edition

  • The 2nd edition is an update to my original (1st edition) Getting Started with Jenkins 2 course.
    • You can follow this link to access the original course which is longer and has some content that wasn't included in the update given that we wanted to shrink the duration for placement into a jenkins learning path. And of course include relevant new features where applicable.
    • FYI the vast majority of content in the 1st edition is still relevant in the latest versions of Jenkins!
  • In the 2nd edition update, the 2 is dropped from the course title even though I'm still covering the latest version of Jenkins which is still 2.
    • Accordingly I have dropped the 2 from repos and instead use jgsu in many cases as a prefix.
    • jgsu = jenkins getting started update
    • jenkins2 was the prefix of many first edition repos.
  • 1st Edition Overview/Resources Gist (https://git.io/vKSVZ)
    • I share these mostly to avoid confusion with associated repos and examples that are and will continue to remain accessibly here on GitHub.
  • This Jenkinsfile highlights a complex pipeline with multiple nodes involved and parallelism, for a challenge try to get this up and running on your own. Or at least read through it and grok what you think is needed to get it working.

course-jenkins-getting-started's People

Contributors

g0t4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

course-jenkins-getting-started's Issues

Pipeline localhost:7080

Hi,

I set up the localhost 7080 but unfortunately i didn't save the initial password that the command line spat out for me and since then, every set up or even creation of the project from scratch is not giving me the new admin password. Is there a way to get the new one? The site is still showing me the dark theme though, it seems that it recognizes the port but no credentials are accepted.

Thank you
Jenkins pipeline

Version in "./docker-compose.yml" is unsupported.

Doing your course on Pluralsight. Love the course, BTW!

Tried running the docker compose version of Jenkins:

mark@linuxmint:compose$ pwd
/home/mark/workspace/github.com/g0t4/course-jenkins-getting-started/dockers/compose
mark@linuxmint:compose$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
mark@linuxmint:compose$ git pull
Already up to date.
mark@linuxmint:compose$ ll
total 4.0K
-rw-rw-r-- 1 mark mark 1.2K Dec 15 10:51 docker-compose.yml
mark@linuxmint:compose$ docker-compose up
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

I thought I had the latest docker installed.

mark@linuxmint:compose$ docker version
Client: Docker Engine - Community
 Version:           20.10.12
 API version:       1.41
 Go version:        go1.16.12
 Git commit:        e91ed57
 Built:             Mon Dec 13 11:45:27 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.12
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.12
  Git commit:       459d0df
  Built:            Mon Dec 13 11:43:36 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
mark@linuxmint:compose$ docker-compose version
docker-compose version 1.17.1, build unknown
docker-py version: 2.5.1
CPython version: 2.7.17
OpenSSL version: OpenSSL 1.1.1  11 Sep 2018

What am I missing?

Can not write to /var/jenkins_home/copy_reference_file.log

When using docker-compose up the running fails with

'''
~/Desktop/jenkinstest/course-jenkins-getting-started/dockers/compose$ docker-compose up
Starting compose_jenkins_1 ... done
Starting compose_mails_1 ... done
Attaching to compose_mails_1, compose_jenkins_1
mails_1 | 2022/03/18 14:41:48 Using in-memory storage
jenkins_1 | touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied
mails_1 | 2022/03/18 14:41:48 [SMTP] Binding to address: 0.0.0.0:1025
mails_1 | 2022/03/18 14:41:48 Serving under http://0.0.0.0:8025/
jenkins_1 | Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?
mails_1 | [HTTP] Binding to address: 0.0.0.0:8025
'''

and a bunch of

'''
jenkins_1 | touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied
jenkins_1 | Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?
'''

I have tried (for testing) to set the permissions of the folder to 777, not working either
'''
course-jenkins-getting-started/dockers/compose$ sudo chmod -R 755 jenkins_home_on_host
'''

NOT helping either:
course-jenkins-getting-started/dockers/compose$ sudo chown -R jenkins:jenkins jenkins_home_on_host

Seems a problem with the jenkins repo, but for using this tut/repo from g0t4, the tut here needs some additions described in the link below.

Details here: jenkinsci/docker#177 (comment)
... This does NOT help entirely either. Plugins will not load entirely.

Suggested work-around is to disable the folder binding in the docker-compose file and access the logs by entering the containers with "docker exec -it bla-bla".

'''
#volumes:
#- ./jenkins_home_on_host:/var/jenkins_home
'''

  • Which now after testing proves NOT to work either. Plugins will not load entirely.

Build Failure because of jacoco-maven-plugin

In the pom.xml file, there is the following code:
Screen Shot 2022-04-29 at 10 04 00 PM

This plugin appears to have issues when run. on Docker. The suggested fix in the class comments of adding ./mvnw clean verify before ./mvnw package does not prevent the following build failure:

[INFO] --- jacoco-maven-plugin:0.8.5:report (report) @ spring-petclinic ---
[INFO] Loading execution data file /var/jenkins_home/workspace/spring-petclinic/target/jacoco.exec
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:30 min
[INFO] Finished at: 2022-04-30T01:34:55Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.5:report (report) on project spring-petclinic: An error has occurred in JaCoCo report generation.: Error while creating report: null: EOFException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.