Presentation is loading. Please wait.

Presentation is loading. Please wait.

Oded Lachish Room: Mal 405 Visiting Hours: Wednesday 17:00 to 20:00 Module URL:

Similar presentations

Presentation on theme: "Oded Lachish Room: Mal 405 Visiting Hours: Wednesday 17:00 to 20:00 Module URL:"— Presentation transcript:

1 Oded Lachish Room: Mal 405 Visiting Hours: Wednesday 17:00 to 20:00 Email: Module URL: Introduction to Software Engineering: Tools and Environments Session 10 1

2 Last time 1.Documentation tools Doxygen and eUML2 2.Code generation tools – eUML2 3.Ant revisited 2

3 Tools Side Dish EnvironmentVariables 3

4 Environment Variables 4 How did eclipse know where to find java Scan the directory structure (bad idea, why?) Environment variables Probably all operation systems have environment variables. Environment variables can be accessed by running processes Environment variables are also play a significant role in the operation of the OS

5 Important - Environment Variables 1.PATH – list of directories to look for executables 2.JAVA_PATH – location of the Java related files 3.ANT_PATH – location of the Ant related files 5

6 Setting - Environment Variables Windows Right click 6 Left click

7 Environment Variables - 7 Left click

8 Environment Variables - 8 Left click

9 Environment Variables - 9 You can add new system variables and edit existing ones

10 Installing Ant and Setting Environment Variables URL to download from Download: Store contents in C:\ So C:\apache-ant-1.8.2 exists 10

11 Setting Ant Environment Variables Set ANT_HOME to 11 First left click

12 Add Ant to Path Environment Variables 12 First left click Semi colon separates directories in list, add ; C:\apache-ant-1.8.2\bin at the end of the list

13 Java Server and Servlets 13

14 Why do we need Javaserver and Servlets 14 1.We are going to install Jenkins 2.Jenkins is used through a browser 3.Jenkins uses dynamic page generation 4.The standard browser does supply a sufficient environment for this goal 5.Jenkins requires a Javaserver for this goal 6.We shall use Tomcat as our Javaserver and run Jenkins a java servelet (an extension to Tomcat)

15 Download Tomcat 15 URL to download from Download: 32-bit/64-bit Windows Service Installer Execute (select all components)

16 Tomcat Installation – User Name and Password 16 Fill-in Make sure you remember this we will need it

17 Tomcat Installation – Java Virtual Machine 17 Make sure correct

18 Tomcat Destination 18 Remember, will be useful

19 Apache Tomcat 19 Left click

20 Apache Tomcat – Server Status 20 Left click

21 21 This shouldnt be there at this stage

22 Next Stage 22

23 Until now We have covered many SDLC tools from a single developer s point of view. 23 Local Individual Developer Integration Collected work of Individual Developers Testing QA team Environment Project point of view (large project) From here on

24 Single Developers Tools 1. light weight 2.Easy to learn 3.Integrated with IDE 4.Trivial to install and set 5.Massive number of available tools 24 Project Scale Tools HEAVY 1.HEAVY 2.Easy to learn? 3.Require their own server 4.Installation may require significant effort 5.Relatively small variety of tools

25 Continuous Integration 25

26 Integration Where all the code goes to (and also the unit tests) When things go wrong here the price is high This is the reason the focus is on minimizing the damage when things go wrong 26

27 Continuous Integration Integrate code as soon as possible. Why? Each time only a small portion of code is added or changed. Why? Problems are detected earlier Easier to find the problem 27

28 Jenkins 28

29 What is Jenkins A crucial element in continuous integration has two main goals: 1.Continuously build and test software projects 2.Monitor externally run jobs 29

30 Work Flow with Jenkins A team member/ members commit code to source control repository 30 Jenkins detects that new code has been committed Jenkins uses Build Tools to build the project and Test tools to test the project Jenkins uses the resulting files to generate reports Jenkins send notification if anything went wrong (build, test failed etc.)

31 Jenkins as Part of the Big Picture Easy installation: java -jar jenkins.war, or deploy it in a servlet container. No additional install, no database. Easy configuration: can be configured entirely from its friendly web GUI with extensive on-the-fly error checks and inline help. There's no need to tweak XML manually anymore, although if you'd like to do so, you can do that, too. Change set support: can generate a list of changes made into the build from Subversion/CVS. This is also done in a fairly efficient fashion, to reduce the load on the repository. 31

32 Jenkins as Part of the Big Picture Permanent links: Jenkins gives you clean readable URLs for most of its pages, including some permalinks like "latest build"/"latest successful build", so that they can be easily linked from elsewhere. RSS/E-mail/IM Integration: Monitor build results by RSS or e-mail to get real-time notifications on failures. JUnit/TestNG test reporting: JUnit test reports can be tabulated, summarized, and displayed with history information, such as when it started breaking, etc. History trend is plotted into a graph. 32

33 Jenkins as Part of the Big Picture Distributed builds: Jenkins can distribute build/test loads to multiple computers. This lets you get the most out of those idle workstations sitting beneath developers' desks. File fingerprinting: Jenkins can keep track of which build produced which jars, and which build is using which version of jars, and so on. This works even for jars that are produced outside Jenkins, and is ideal for projects to track dependency. Plugin Support: Jenkins can be extended via 3rd party plugins. You can write plugins to make Jenkins support tools/processes that your team uses.3rd party plugins 33

34 Jenkins as Part of the Big Picture An easy to configure tool that is responsible for the following: 1.Make sure that everything that should be executed is executed when and as soon as possible 2.Collect all the information and process it into coherent reports (imagine have 10 different tools each with its own report) 34

35 Jenkins Leg Work 35

36 36 Jenkins –.war file jenkins.war

37 37 What to do with the.war file

38 Jenkins – Nice to Meat You 38 Left click

39 Jenkins – Plug-ins 39 Left click

40 Jenkins Plugin manager 40 Left click

41 Jenkins Git Plugin Installation Success 41

42 Jenkins Leg Work New Project 42

43 Jenkins new project 1.Write a new Java project 2.Add an Ant build script to the project 3.Store the project in a Git repository 43

44 Jenkins New Job 44 Left click

45 Jenkins New Job 2 45 Fill in Select

46 Jenkins New Job Top 46 Fill inSelect

47 Jenkins New Job Middle 47 Select Update to your git repository

48 Jenkins New Job 48 Left click Update

49 Jenkins New Job (actually after) 49 Left click

50 Jenkins Build Page 50 Left click

51 Jenkins Console Output 51 Left click

52 Jenkins Git Build Data 52

53 What Happened After First Build? 53 1.Jenkins Cloned the Project 2.Jenkins used the Ant script to build the project

54 Other Things we Could have Done 54

55 Jenkins Leg Work Triggering a Build 55

56 Jenkins – When to Build? 56 1.Can be done manually (as we already did) 2.Can be done in fixed intervals – in general this is not recommended 3.Polling – build when the project changed

57 Jenkins – Triggering a Build (project configure) 57 I think this should get it to poll every minute Check it out

58 Jenkins – Git Polling Log 58

59 Jenkins – Build History 59

60 Jenkins Leg Work Other Features 60

61 Jenkins – RSS 61 You can use RSS to get updated Left click

62 Manage Jenkins 62

63 Configure Jenkins 63

64 Can execute concurrent builds guess where? Configure Jenkins – e-mail notification 64 You can use e-mail notification to get updated You can change the URL

Download ppt "Oded Lachish Room: Mal 405 Visiting Hours: Wednesday 17:00 to 20:00 Module URL:"

Similar presentations

Ads by Google