Skip to content

Instantly share code, notes, and snippets.

Avatar

Luận Trần luandevpro

View GitHub Profile
View result.text
jobs: is the base component of a workflow run
build: is the identifier we're attaching to this job
name: is the name of the job, this is displayed on GitHub when the workflow is running
steps: the linear sequence of operations that make up a job
uses: actions/checkout@v1 uses a community action called checkout to allow the workflow to access the contents of the repository
uses: ./action-a provides the relative path the action we've created in the action-a directory of the repository
with: is used to specify the input variables that will be available to your action in the runtime environment. In this case, the input variable is MY_NAME, and it is currently initialized to "Mona".
View node.js.yml
name: Deploy application
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
View node.js.yml
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
View Terminal
kubectl apply -f deployment-green.yaml
View deployment-green.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: green
spec:
minReadySeconds: 10
replicas: 3
selector:
matchLabels:
View Terminal
minikube service entry-point
View Terminal
kubectl apply -f service-blue-green.yaml
View service-blue-green.yaml
apiVersion: v1
kind: Service
metadata:
name: entry-point
spec:
ports:
- port: 80
targetPort: 8080
type: NodePort
selector:
View Terminal
kubectl apply -f deployment-blue.yaml
View deployment-blue.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: blue
spec:
minReadySeconds: 10
replicas: 3
selector:
matchLabels: