AWS Aligned Jenkins for use with Planet 9 [P9 AWS Pipeline] (aws-pipeline-v2)
-
docker build -t planet9/jenkins .
ordocker build --no-cache -t planet9/jenkins .
-
Build lightweight devel image
docker build -t planet9/jenkins --file ./DockerfileLite .
docker run -d --env GIT_REPO=<to create an initial build job, pass a repo with a Jenkinsfile> \ --env GITHUB_APP_CLIENT_ID=<git client id> \ --env GITHUB_APP_CLIENT_SECRET=<git app secret> \ --env AWS_ACCOUNT_ID = <aws #> \ --env JENKINS_IP= <jenkis url for this, is sent to slaves> \ --env AWS_REGION= \ --env ECS_CLUSTER= <name of ecs cluster hosting jenkins/slave farm> \ -p 18080:8080 -p 50000:50000 planet9/jenkins \
Install python etc locally - or use a docker image to not pollute your local env
apt install -y python3-pip && /usr/bin/pip3 install --upgrade pip && /usr/bin/pip3 install pytest
python3 -m pytest spec
Leave
- GITHUB_APP_CLIENT_ID &&
- GITHUB_APP_CLIENT_SECRET blank for local access, using admin/admin
GITHUB_APP_CLIENT_ID
Use this for guithub authenticationGITHUB_APP_CLIENT_SECRET
See aboveECS_CLUSTER
The name of the ECS Cluster used for SlavesAWS_ACCOUNT_ID
So we can build the cluster nameJENKINS_IP
IP for Slave->Master connectionAWS_REGION
defaults to "eu-west-1";