Complete step-by-step guide to set up automated deployment pipeline.
- Windows 10/11 or Windows Server
- Admin access to your machine
- GitHub account
- Internet connection
- Visit: https://www.docker.com/products/docker-desktop
- Download Docker Desktop for Windows
- Run the installer (
Docker Desktop Installer.exe)
- Follow the installation wizard
- Check: "Use WSL 2 instead of Hyper-V" (recommended)
- Wait for installation to complete
- Restart your computer
Open PowerShell and run:
docker --version
docker-compose --versionYou should see version numbers.
docker run hello-worldIf you see "Hello from Docker!", it's working!
mkdir C:\jenkins_homedocker run -d \
--name jenkins \
--restart unless-stopped \
-p 8081:8080 \
-p 50000:50000 \
-v C:\jenkins_home:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
jenkins/jenkins:ltsNote: Jenkins will run on port 8081 (since your app uses 8080)
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPasswordCopy the password that appears.
- Open browser: http://localhost:8081
- Paste the initial admin password
- Click "Install suggested plugins"
- Wait for plugins to install
- Create your first admin user
- Click "Save and Continue"
- Click "Start using Jenkins"
- Go to: Manage Jenkins → Manage Plugins
- Click Available tab
- Search and install:
- GitHub Integration Plugin
- Docker Pipeline Plugin
- NodeJS Plugin
- Check "Restart Jenkins when installation is complete"
- Go to: Manage Jenkins → Global Tool Configuration
- Scroll to NodeJS section
- Click Add NodeJS
- Name:
NodeJS 18 - Version: Select
NodeJS 18.x
- Name:
- Click Save
- Go to: Manage Jenkins → Manage Credentials
- Click (global) → Add Credentials
- If you use Docker Hub:
- Kind: Username with password
- Username: Your Docker Hub username
- Password: Your Docker Hub password
- ID:
dockerhub
- Click Create
- Click New Item
- Enter name:
ByteDanceAiAgent-Pipeline - Select Pipeline
- Click OK
-
General section:
- ☑ GitHub project
- Project url:
https://github.com/Erica-cod/ByteDanceAiAgentProject
-
Build Triggers section:
- ☑ GitHub hook trigger for GITScm polling
-
Pipeline section:
- Definition: Pipeline script from SCM
- SCM: Git
- Repository URL:
https://github.com/Erica-cod/ByteDanceAiAgentProject.git - Branch:
*/main - Script Path:
Jenkinsfile
-
Click Save
- If running locally:
http://YOUR_PUBLIC_IP:8081/github-webhook/ - If you need public access, use ngrok (see Step 6)
- Go to: https://github.com/Erica-cod/ByteDanceAiAgentProject/settings/hooks
- Click Add webhook
- Fill in:
- Payload URL:
http://YOUR_JENKINS_URL:8081/github-webhook/ - Content type:
application/json - Which events: Select "Just the push event"
- ☑ Active
- Payload URL:
- Click Add webhook
If your Jenkins is not publicly accessible:
- Visit: https://ngrok.com/download
- Download and extract ngrok
- Sign up for free account
- Get your authtoken
ngrok config add-authtoken YOUR_AUTH_TOKENngrok http 8081Use the https://xxxxx.ngrok.io URL for GitHub webhook.
- Go to Jenkins: http://localhost:8081
- Click on your job:
ByteDanceAiAgent-Pipeline - Click Build Now
- Watch the build progress in Console Output
- Make a small change to your project
- Commit and push to
mainbranch:
git add .
git commit -m "test: trigger jenkins pipeline"
git push origin main- Jenkins should automatically start building!
docker psYou should see bytedance-ai-agent container running.
Open browser: http://localhost:8080
You should see your AI Agent application!
# Add Jenkins user to docker group
docker exec -u root jenkins usermod -aG docker jenkins
docker restart jenkins# Check what's using the port
netstat -ano | findstr :8080
# Kill the process or change port in docker-compose.yml- Check GitHub repository is public
- Or add GitHub credentials in Jenkins
- Check Console Output in Jenkins
- Verify
Jenkinsfileis in repository root - Check Docker is running
# View running containers
docker ps
# View logs
docker logs bytedance-ai-agent
# Stop container
docker stop bytedance-ai-agent
# Remove container
docker rm bytedance-ai-agent
# View images
docker images
# Remove image
docker rmi bytedance-ai-agent:latest# View Jenkins logs
docker logs jenkins
# Restart Jenkins
docker restart jenkins
# Stop Jenkins
docker stop jenkins
# Start Jenkins
docker start jenkins- ✅ Set up monitoring (e.g., Prometheus + Grafana)
- ✅ Add automated tests in pipeline
- ✅ Set up staging environment
- ✅ Configure SSL/HTTPS
- ✅ Add notification (Slack, Email)
GitHub (push)
↓
GitHub Webhook
↓
Jenkins (8081)
↓
Build & Test
↓
Build Docker Image
↓
Deploy Container (8080)
↓
Production App
- Don't expose Jenkins publicly without authentication
- Use HTTPS for production
- Store secrets in Jenkins credentials
- Regularly update Docker images
- Enable Docker Content Trust
If you encounter issues:
- Check Jenkins Console Output
- Check Docker logs:
docker logs <container> - Verify ports are not blocked by firewall
- Ensure Docker is running
🎉 Congratulations! Your CI/CD pipeline is ready!
Every push to main branch will automatically:
- Trigger Jenkins build
- Build Docker image
- Deploy to production
- Perform health check