-
Notifications
You must be signed in to change notification settings - Fork 1
Jenkins Guide
Go here: http://r99acm.device.mst.edu:8081/
This is where the Visualizer’s Continuous Build System, Jenkins. This puts out compiled Windows and Linux binaries for people to use.
A Continuous Build System.
Every time you push updates to the Visualizer core repository, or to one of the plugins, Jenkins should build binaries (like a .exe file on Windows) for people to download and use our visualizer! If someone pushes code that can’t be compiled, Jenkins will email them (if they set up their email in git).
Log with info, this needs more info
Once logged in you should be able to see the status of private projects. Older MegaMinerAI competitions such as Space and Chess should be public, but the current MegaMinerAI should be hidden.
- At the homepage click “New Job” in the top left.
- For “Job name” call it “
GAME_NAME-Visualizer-Windows", withGAME_NAMEbeing the new plugin’s game name - Click the "Copy existing Job" radio button.
- For "Copy from" under "Copy existing Job" start typing the previous MegaMinerAIs game name, which we will refer to as
PREV_GAME_NAMEin this guide. You should see some of the existing projects pop up. You will want "PREV_GAME_NAME-Visualizer-Windows”. - Click “OK”. Everything should be copied from
PREV_GAME_NAME, but we still need to weak a few things: - Under description correct the MegaMinerAI number and game’s name
- Under “Advanced Project Options” Click the “Advanced…” Button to see more options. Fill in “Display Name” with “
GAME_NAMEVisualizer (Windows)”. - Make sure “Enable project-based security” is not checked so the public cannot see it
- Under “Source Code Management” we need to correct the repository. So instead of using the previous MegaMinerAI repo, update the number to the current MegaMinerAI in “Repository URL” (so, from MegaMinerAI 9 to 10 just change the “9” to a “10” in the URL)
- Under “Build” in the “Execute shell command” search through the entire code. everywhere you see
PREV_GAME_NAMEupdate it to the currentGAME_NAME. Folder and filenames need to be updated. - Under “[ArtifactDeployer] - Deploy artifacts from workspace to remote directories”’s “Remote directory” field update the
PREV_GAME_NAMEtoGAME_NAME - Under “Execute shell command” update all the
PREV_GAME_NAMEstrings toGAME_NAME, just as we have been doing everywhere else. - Also, still under “Execute shell command” the last line should be something like
cp GAME_NAME.zip _etc_, comment that out by placing a “#” infront of it so that line is commented out. - That should be everything, hit the “Save” button
- On the left Click the “Build Now” Link to see if it works!
- If for some reason it does not (ever really) click on the build that failed, and on that page lick “Console output” on the left to read the console output for why it broke.
- If everything worked, and the build succeeded, devs should be able to get the latest version of the windows visualizer from
/srv/pftp/jenkins/GAME_NAME/GAME_NAME.zip. Put a link to that in each project on redmine for simplicity, but remove it before making that MegaMinerAI public.
After a MegaMinerAI starts the game is public, so it should be time shortly there-after to make the builds public. To do this go to the project (windows version) and click “Configure” on the left. Here you need to edit two things.
- Click “Enable project-based security”. A table should appear with the Anonymous’s rights. Click the box “Read” under “Job” So they have the ability to read this project, as it is not public.
- Near the bottom under “Execute shell” scroll to the bottom and you should see a comment saying “uncomment the following line to make this plugin publicly available”, so do just that. That way the zipped up windows visualizer is put in our FTP for everyone.
- Now, SSH our server (r99acm.device.mst.edu:2222). You will need sudo access so if you don’t have it ask the president or vice president for help there. now do the following:
# Replace `GAME_NAME` with the game’s name! This creates a symbolic link in a better place for competitors to get to.
sudo ln -s /srv/ftp/jenkins/GAME_NAME-windows-visualizer.zip /srv/ftp/GAME_NAME/GAME_NAME-windows-visualizer.zip
4. Back in Jenkin’s webpage hit save. Then go to the homepage and click “Schedule a build” icon (it looks like a clock with a green play arrow). This tells Jenkins you want to build the visualizer now, so it will build it publicly!
5. Done! If anyone goes to ftp://r99acm.device.mst.edu:2121 they should see a GAME_NAME directory with the Windows visualizer in
it!