How to setup Jenkins using Docker

Install Jenkins using Dockersudo docker run –restart always -p 8081:8080 –name=jenkins -d \ -v /var/www/html:/var/www/html \ –env JAVA_OPTS=”-Xmx4092m” –env JENKINS_OPTS=”–prefix=/jenkins” jenkins/jenkins Get password from tail logs command.docker logs –tail 100 -f <container_name> Install Jenkins Recommend plugin. Install ZTI’s Recommend plugin.Manage Jenkins > Plugin Manager > Available Tab Gitlab Deploy to container Maven Integration Publish over […]

Teerakorn Bounoy

October 22, 2022

Jenkins: Setup PHP project

First, you have to create and put code to GitLab. 1. Go to Jenkins URL: http://ztidev.com:8080/jenkins 2. Click ‘New Item’ -> Create ‘Freestyle’ project 3. In Source Code Management section, add Gitlab URL, usr&pwd 4. In Build section, add following command line: mkdir -p /var/www/html/<project_name>cp -rf * /var/www/html/<project_name> chmod -R 777 /var/www/html/<project_name> chmod -R 777 […]

Teerakorn Bounoy

September 29, 2021

Jenkins x Gitlab build trigger

เซท Jenkins ให้ build และ deploy app อัตโนมัติ หลังจาก push / merge code ไปที่ branch ‘master’ Reference: https://medium.com/@xthewiz/notify-jenkins-for-push-event-on-gitlab-18e2e4104827 GitLab project example: http://ztidev.com:8080/jenkins/job/OBEC-CC-API_DEV/configure Create GitLab project , (create Access Token in GitLab * you can skip this step) URL: http://gitlab.ztidev.com/profile/personal_access_tokens 2. Create Jenkins Project Add GitLab project URL / Add GitLab’s username and password (or use […]

Teerakorn Bounoy

September 23, 2021