Currently building bahmni-connect through CI docker env requires a fair amount of manual steps like
1. Build Stage - trigger the pipeline and identifying the GoCD elastic agent, going onto the worker node, and executing certain scripts so that GoCD assigns the right container for the task execution
2. once the agent container starts running, editing Gruntfile within the container, so that the build passes
3. RunTests Stage - attach container manually like in build stage.
The entire process should be automated.
*1. Automate GoAgent task allocation: *
like other pipelines, we can follow the same techniques. For example https://ci-server.mybahmni.org/go/admin/templates/OpenERP-Centos7/stages/runFunctionalTestsStage/job/docker-exec/tasks
We can similarly execute the “docker-exec-connect.sh”, which runs a specific script from within the container to work with GoCD server.
*2. Stop manual editing of files within container: *On CI, run with a different Gruntfile. We can create and copy contents of the same Gruntfile to another file (Gruntfile_ci.js) where we remove remove the tasks ('karma:chrome', 'coverage', 'karma:android', 'coverage')