Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
workflow:
name: "Test CI/CD pipeline"

stages:
- build
- test
- docker
- deploy

build_job:
stage: build
script:
- echo "Building the application..."
# Add your build commands here
tags:
- docker

test_job:
stage: test
script:
- echo "Running tests..."
# Add your test commands here
tags:
- docker

docker_build_job:
stage: docker
script:
- echo "Building Docker image..."
# Add your Docker build commands here
tags:
- docker
docker_test_job:
stage: docker
needs: [docker_build_job]
script:
- echo "Testing Docker image..."
# Add your Docker test commands here
tags:
- docker
docker_push_job:
stage: docker
needs: [docker_test_job]
script:
- echo "Pushing Docker image to registry..."
# Add your Docker push commands here
tags:
- docker

deploy_job:
stage: deploy
script:
- echo "Deploying the application..."
# Add your deployment commands here
tags:
- docker


13 changes: 13 additions & 0 deletions pods/nginx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Pod
metadata:
name: my-pod
labels:
app: nginx
env: production
spec:
containers:
- name: nginx-container
image: nginx:latest
ports:
- containerPort: 80
10 changes: 10 additions & 0 deletions pods/pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
containers:
- name: my-container
image: my-image:latest
ports:
- containerPort: 80
21 changes: 21 additions & 0 deletions replicasets/replicaset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: app/v1
kind: ReplicaSet
metadata:
name: my-replicaset
spec:
replicas: 3
selector:
matchLabels:
app: nginx
env: production
template:
metadata:
labels:
app: nginx
env: production
spec:
containers:
- name: nginx-container
image: nginx:latest
ports:
- containerPort: 80