Templates and examples for Github-CI
examples/jenkins/.github/workflows/deploy-ENV.yaml
: Github Actions to build Jenkins jobdeploy-ENV
- Copy and paste the
.github
folder insideexamples/jenkins
to your repository and create thedev
andproduction
branches if they do not exist. - In your github repo, access
Action secrets
(Secrets) in Settings, and create 5 new repository secrets:JENKINS_USER
,JENKINS_TOKEN
,JENKINS_HOST
,JENKINS_JOB_DEV
andJENKINS_JOB_STG
- To generate a
JENKINS_TOKEN
follow these instructions: https://www.jenkins.io/blog/2018/07/02/new-api-token-system/ - The value of
JENKINS_USER
must be the same as the user who generated theJENKINS_TOKEN
JENKINS_HOST
is the host of the Jenkins instance where the jobs will be builtJENKINS_JOB_ENV
is the Jenkins route to the job