Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit e57a087

Browse files
committed
更新 .gitignore,添加 Terraform 状态文件的忽略规则;调整 terraform.tf 中数据卷大小为 100;新增 CI/CD 流水线配置
1 parent 2bf1378 commit e57a087

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

.github/workflows/web.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v3
18+
19+
- name: Log in to Docker Hub
20+
run: docker login -u ${{ secrets.PROJECT }}@${{ secrets.SWR_AK }} -p ${{ secrets.SWR_SK }} swr.eu-de.otc.t-systems.com
21+
22+
- name: Build and push pg image
23+
run: |
24+
docker build -t swr.eu-de.otc.t-systems.com/testtesttest/pg:latest -f Dockerfile.pg .
25+
docker push swr.eu-de.otc.t-systems.com/testtesttest/pg:latest
26+
27+
- name: Build and push web image
28+
run: |
29+
docker build -t swr.eu-de.otc.t-systems.com/testtesttest/web:latest -f Dockerfile.web .
30+
docker push swr.eu-de.otc.t-systems.com/testtesttest/web:latest
31+
32+
- name: Apply Kubernetes configuration
33+
uses: actions-hub/kubectl@master
34+
env:
35+
KUBE_CONFIG: ${{ secrets.KUBECONFIG }}
36+
with:
37+
args: apply -f k8s.yaml

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ next-env.d.ts
3838
.terraform
3939
*.hcl
4040
provider.tf
41+
*.tfstate
42+
*.tfstate.backup

terraform.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ resource "opentelekomcloud_cce_node_v3" "node" {
6565
}
6666

6767
data_volumes {
68-
size = 40
68+
size = 100
6969
volumetype = "SATA"
7070
}
7171
}

0 commit comments

Comments
 (0)