test
This commit is contained in:
35
dp_np.yaml
Normal file
35
dp_np.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: tekton-demo-deployment
|
||||||
|
namespace: tekton-demo
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: tekton-demo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: tekton-demo
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: tekton-demo
|
||||||
|
image: harbor.icurfer.com/open/tekton-demo:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: tekton-demo-service
|
||||||
|
namespace: tekton-demo
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
app: tekton-demo
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
57
index.html
57
index.html
@ -1,11 +1,62 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Tekton Demo</title>
|
<title>Tekton Demo</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Segoe UI', Tahoma, sans-serif;
|
||||||
|
background: linear-gradient(135deg, #e0f7fa, #e1f5fe);
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100vh;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
text-align: center;
|
||||||
|
background: white;
|
||||||
|
padding: 40px 60px;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
|
||||||
|
max-width: 500px;
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 2rem;
|
||||||
|
color: #007acc;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 12px 25px;
|
||||||
|
background-color: #007acc;
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
.btn:hover {
|
||||||
|
background-color: #005fa3;
|
||||||
|
}
|
||||||
|
.emoji {
|
||||||
|
font-size: 3rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<div class="emoji">🚀</div>
|
||||||
<h1>✅ Hello Tekton CI/CD!</h1>
|
<h1>✅ Hello Tekton CI/CD!</h1>
|
||||||
<p>This page is built automatically using Tekton Pipeline.</p>
|
<p>Your application has been successfully built and deployed using Tekton Pipeline.</p>
|
||||||
|
<a href="#" class="btn">Learn More</a>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@ -36,46 +36,8 @@ spec:
|
|||||||
git checkout $(params.git-revision)
|
git checkout $(params.git-revision)
|
||||||
echo "==== [INFO] Git checkout 완료 ===="
|
echo "==== [INFO] Git checkout 완료 ===="
|
||||||
|
|
||||||
# 2. Secret 파일 config.json 으로 변환
|
|
||||||
# - name: prepare-docker-config
|
|
||||||
# image: alpine
|
|
||||||
# script: |
|
|
||||||
# #!/bin/sh
|
|
||||||
# set -e
|
|
||||||
# echo "==== [INFO] Docker config 파일 준비 ===="
|
|
||||||
# ls -al /workspace/docker-config
|
|
||||||
# if [ -f /workspace/docker-config/.dockerconfigjson ]; then
|
|
||||||
# cat /workspace/docker-config/.dockerconfigjson
|
|
||||||
# else
|
|
||||||
# echo "[ERROR] Docker config 파일(.dockerconfigjson) 없음"
|
|
||||||
# fi
|
|
||||||
# - name: prepare-docker-config
|
|
||||||
# image: stedolan/jq
|
|
||||||
# script: |
|
|
||||||
# #!/bin/sh
|
|
||||||
# set -e
|
|
||||||
# echo "==== [INFO] Docker config 파일 준비 ===="
|
|
||||||
# ls -al /workspace/docker-config
|
|
||||||
|
|
||||||
# # 임시 쓰기 가능 경로 생성
|
# Kaniko Build & Push
|
||||||
# mkdir -p /workspace/tmp-config
|
|
||||||
|
|
||||||
# if [ -f /workspace/docker-config/.dockerconfigjson ]; then
|
|
||||||
# echo "[INFO] dockerconfigjson 내용 읽기"
|
|
||||||
# cat /workspace/docker-config/.dockerconfigjson | jq . > /workspace/tmp-config/config.json
|
|
||||||
# echo "[INFO] config.json 변환 완료"
|
|
||||||
# else
|
|
||||||
# echo "[ERROR] Docker config 파일(.dockerconfigjson) 없음"
|
|
||||||
# fi
|
|
||||||
# 3. Debugging - Check mounted secret before build
|
|
||||||
# - name: debug-sleep
|
|
||||||
# image: alpine
|
|
||||||
# script: |
|
|
||||||
# #!/bin/sh
|
|
||||||
# echo "==== [DEBUG] Pod에 접속 가능 상태로 대기 중... ===="
|
|
||||||
# sleep 180
|
|
||||||
|
|
||||||
# 4. Kaniko Build & Push
|
|
||||||
- name: build-and-push
|
- name: build-and-push
|
||||||
image: gcr.io/kaniko-project/executor:latest
|
image: gcr.io/kaniko-project/executor:latest
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
@ -83,9 +45,6 @@ spec:
|
|||||||
mountPath: /kaniko/.docker/config.json
|
mountPath: /kaniko/.docker/config.json
|
||||||
subPath: .dockerconfigjson
|
subPath: .dockerconfigjson
|
||||||
readOnly: true
|
readOnly: true
|
||||||
# env:
|
|
||||||
# - name: DOCKER_CONFIG
|
|
||||||
# value: /workspace/docker-config
|
|
||||||
args:
|
args:
|
||||||
- --dockerfile=/workspace/source/Dockerfile
|
- --dockerfile=/workspace/source/Dockerfile
|
||||||
- --context=/workspace/source
|
- --context=/workspace/source
|
||||||
|
Reference in New Issue
Block a user