CI/CD Pipelines Advanced
Advanced CI/CD pipelines are automated processes that integrate code changes, test them, and deploy them across various environments. Properly configured CI/CD pipelines significantly accelerate development, reduce errors, and ensure reliable deployments.
- name: Push to registry
The command `echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin` logs into the Docker registry, and `docker push myapp:${{ github.sha }}` pushes the application image to the registry using its Git commit hash as a tag.
sh 'kubectl apply -f k8s/staging/'
The stage `Deploy to Production` uses the command `kubectl apply -f k8s/staging/` to deploy the application to the production environment, prompting for confirmation with the message 'Deploy to production?'.
Frequently asked questions
What is a blue-green deployment strategy?
A blue-green deployment strategy involves running two identical environments, one ‘blue’ (live) and one ‘green’ (staging), allowing for seamless switching between them with minimal downtime.
What operating system does the build runner use?
The build runner utilizes an Ubuntu Linux environment named 'ubuntu-latest' for its operations.
What is the name of the deployment task?
The deployment task is named ‘Deploy Blue version’ to clearly identify its function within the pipeline.
How do you apply the blue Kubernetes manifest?
You apply the blue Kubernetes manifest using the command `kubectl apply -f k8s/blue/` to deploy the application to the blue environment.
▶ Try it live
Everything above runs in your browser — open Hash Function Avalanche Visualizer and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.