MBN CI/CD¶
Access
We are now using github login. So you should be able to see jobs/tasks in Jenkins using your gitHub username.
If you need admin access let Edu or Mariana know so we can add you to the Admin List.
We are Using Jenkins in order to automate the following tasks:
-
PR Builds (using the
Jenkinsfile.testing
pipeline). This runs on the Jenkins “Master” agent.- Everytime we open a new PR, that PR code would be checked (
make code-test
) and built.
- Everytime we open a new PR, that PR code would be checked (
-
develop
branch build (using theJenkinsfile.testing
pipeline). This runs on the Jenkins “Master” agent.- Everytime that a PR is merged into
develop
branch, Jenkins will build that branch.
- Everytime that a PR is merged into
-
Acquia Dev env deployments. This runs on the SSH Agent “Daily” node.
- Jenkins will build
develop
> Create a tag > Deploy that tag > ‘checkout’ the tag for Dev env. So this will cover all the deployment tasks we were manually doing. We haven’t defined a time yet, but we think it could run everyday at… 7am. So we will always have a “fresh” Dev env.
- Jenkins will build
Nice to have tasks¶
Jenkins can be easily integrated with Jira, so a nice thing would be to configure the Jira integration in a way that makes sense for us. Jenkins is already integrated with github, so we could make use of that to properly “label” PRs
For example:
-
We could start using “releases” on Jira so Jenkins can properly tag all the tickets included in a deployment, with the release tag.
-
We could use github integration to properly label PRs once they get merged (not sure if doable actually, but would be great :P )
Server Details¶
- https://jenkins.mobomo.net
- Algo mรกs?
Stumped into some odd bugs in the road
¶
-
git Acquia repo requires git username/email
Apparently the’ve fixed this in blt version 10.x: https://github.com/acquia/blt/pull/35411 2 3 4 5 6 7 8 9 10 11 12 13
*** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for <(null)>) not allowed [ExecStack] Exit code 128 [error] Could not initialize new git repository.
As a workaround (since updating the blt version could very likely cause other issues I wanted to avoid) I’ve added a git config user.name and user.email in the agent Dockerfile…
-
git acquia repo key not found/trustedIn order to workaround this issue I had to run the
blt artifact:deploy
command manually from the jenkins agent repo and accept the connection:
Thanks so much Acquia!1 2 3 4
The authenticity of host 'svn-2398.enterprise-g1.hosting.acquia.com (54.208.34.237)' can't be established. RSA key fingerprint is SHA256:bV2a1i24wN1fKHPklmexouKYRnnp/TZtzV24Wd+fpoQ. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'svn-2398.enterprise-g1.hosting.acquia.com,54.208.34.237' (RSA) to the list of known hosts.
To fix this I’ve added the dev server host to the
/home/jenkins/.ssh/known_hosts
-
On
composer install
run by thevendor/bin/blt artifact:deploy
command (which is using robo)1 2 3 4
Generating optimized autoload files In AutoloadGenerator.php line 1054: fopen(/usr/share/php/Composer/Autoload/../../../doc/composer/copyright): failed to open stream: No such file or directory