- Log into your cloud9 development environment
Create a Dockerfile for the app located in server.js
- The listening port is 80
- The main script is server.js
Build this dockerfile
- The name of the built image must be login/epitech-ci-training
Instanciate the image
- This container must be started as a daemon
server.js became app.js
- build the dockerfile in the entrypoint directory
- You are not allowed to create or edit the Dockerfile
- Launch the image to test if it's working
hint 1: entrypoint and cmd
hint 2: the OPS that created the Dockerfile could have made mistakes
Figure it out
https://www.npmjs.com/package/jest https://www.npmjs.com/package/supertest Sample unit and integration tests can be found in the tests folder
Theory: docker-compose
Edit the docker-compose.yml file located in the docker-compose directory in order to make it build our app
Use the mysql package to create a connection to mysql in a new method contained in your app Write a jest test for this method https://www.npmjs.com/package/mysql#introduction
Theory: CPHP presentation
the trainer will create a public repository for our class
the trainer will assist you in the creation of your personal pipeline
create a script, ran into a test activity, that will build your app and execute the unit tests
remember we are already inside our container
Theory: Git flow
The trainer will create the branch and restrictions needed for your git flow usage
Random tasks will be assigned to you
Theory: Integration testing
The trainer will add a mysql container to your pipeline
Create a simple bash script, connecting to this mysql container after the execution of your unit tests