Commit 10f65ea0 authored by Bo-Chun Chen's avatar Bo-Chun Chen

Add Jenkins post-installation steps

parent e9dd1068
......@@ -151,3 +151,62 @@ ansible-playbook jenkins.yaml -v -b
Once the playbook is done, your Jenkins should be running. You can go to Web Interface to continue post-installation steps.
### Post-installation
After Jenkins is installed, you have to go to web interface to continue the post-installation steps. If the floating ip of your instance is 192.168.16.222, go to http://164.111.161.222:8080 The Web interface will ask you for admin password. You can get it by running this:
```shell
docker logs jenkins-blueocean
```
Follow the setup wizard, then you will have a Jenkins server you can use.
### Gitlab support
#### Configure GitLab Plugin
- Install Plugin
Go to Manage Jenkins -> Manage Plugins, search for `GitLab` and install it.
- Configuration
Go to Manage Jenkins -> Configure System, and find the Gitlab section.
- Enable authentication for /project end-point
Checked.
- Name
Whatever you like.
- gitlab host URL
Put `https://gitlab.rc.uab.edu`
- Credentials
First go to (https://gitlab.rc.uab.edu/profile/personal_access_tokens) create one Personal Access Token with `api` scope.
Click Add -> Jenkins and select `GitLab API token` kind, and paste the token you got from gitlab.
You should be able to test connection with gitlab now.
#### Setup Jenkins project
Select New Item and select Pipeline.
- Connection
Select the gitlab connection you just created.
- Build Trigger
Check `Build when a change is pushed to GitLab...`. Click `Accepted Merge Request Events` and `Closed Merge Request Events`.
- Pipeline
If you have Jenkinsfile in a repo, you can select `Pipeline script from SCM`.
Use the URL you use for cloning repo. And setup the credential for that either using username and password or ssh and private key. In `Branches to build` change it to `*/*` so it can work with different branches.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment