Updating the application manually
Now that the application is up and running in a Kubernetes cluster, it is time to change the code base and update this application with the new version. Doing this update by hand will help you identify the parts that you can automate.
First, make a change in a file. Change the response to the "/"
route in server.js
to return a different response:
app.get("/", (req, res) => { res.send({ message: "Hello", change: "changed" }).status(200); });
Commit that change and push it to your code repository:
$ git commit -am "Change a server response" $ git push origin main
Run the tests and linting to ensure that everything passes:
$ npm run test $ npm run lint
Build a new image and push it to your registry:
$ docker build –t <YOUR_USERNAME>/tekton-lab-app . $ docker push <YOUR_USERNAME...