Skip to content

Commit

Permalink
Add githubActionFile
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Nov 14, 2023
1 parent 1bebb85 commit 66b708f
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/myworkflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Kompose Convert on Main Branch

on:
push:
branches:
- develop

jobs:
kompose-convert:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Docker build & push to docker repo
run: |
docker login docku.ddns.net -u kluster -p Klusterjoa18!
docker build -t dockertest13:latest -f Dockerfile .
docker tag dockertest13:latest docku.ddns.net/library/gurwls0122_dockertest13:latest
docker push docku.ddns.net/library/gurwls0122_dockertest13:latest
# Add additional steps here to deploy the generated Kubernetes resources.
- name: CI Completed
run: |
curl -H "Content-Type: application/json" -d '{ "repositoryName": "dockertest13", "githubUsername": "gurwls0122"}' -X POST https://kuploy.ddns.net/server/github/action-completed
8 changes: 8 additions & 0 deletions gurwls0122-namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: gurwls0122
namespace: gurwls0122
spec: {}
status: {}
22 changes: 22 additions & 0 deletions mysql-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose -f docker-compose.yml --namespace=gurwls0122 --controller statefulset convert
kompose.version: 1.31.0 (a04ecdb9e)
creationTimestamp: null
labels:
io.kompose.service: mysql
name: mysql
namespace: gurwls0122
spec:
clusterIP: None
ports:
- name: "3306"
port: 3306
targetPort: 3306
selector:
io.kompose.service: mysql
type: ClusterIP
status:
loadBalancer: {}
42 changes: 42 additions & 0 deletions mysql-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations:
kompose.cmd: kompose -f docker-compose.yml --namespace=gurwls0122 --controller statefulset convert
kompose.version: 1.31.0 (a04ecdb9e)
creationTimestamp: null
labels:
io.kompose.service: mysql
name: mysql
namespace: gurwls0122
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: mysql
serviceName: mysql
template:
metadata:
creationTimestamp: null
labels:
io.kompose.network/dockertest13-default: "true"
io.kompose.service: mysql
spec:
containers:
- env:
- name: MYSQL_DATABASE
value: kluster
- name: MYSQL_ROOT_PASSWORD
value: "1234"
image: mysql:latest
name: mysql
ports:
- containerPort: 3306
hostPort: 3306
protocol: TCP
resources: {}
restartPolicy: Always
updateStrategy: {}
status:
availableReplicas: 0
replicas: 0
22 changes: 22 additions & 0 deletions spring-app-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose -f docker-compose.yml --namespace=gurwls0122 --controller statefulset convert
kompose.version: 1.31.0 (a04ecdb9e)
creationTimestamp: null
labels:
io.kompose.service: spring-app
name: spring-app
namespace: gurwls0122
spec:
clusterIP: None
ports:
- name: "80"
port: 80
targetPort: 8080
selector:
io.kompose.service: spring-app
type: ClusterIP
status:
loadBalancer: {}
40 changes: 40 additions & 0 deletions spring-app-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations:
kompose.cmd: kompose -f docker-compose.yml --namespace=gurwls0122 --controller statefulset convert
kompose.version: 1.31.0 (a04ecdb9e)
creationTimestamp: null
labels:
io.kompose.service: spring-app
name: spring-app
namespace: gurwls0122
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: spring-app
serviceName: spring-app
template:
metadata:
creationTimestamp: null
labels:
io.kompose.network/dockertest13-default: "true"
io.kompose.service: spring-app
spec:
containers:
- env:
- name: SPRING_DATASOURCE_URL
value: jdbc:mysql://mysql:3306/kluster
image: gurwls0122/dockertest13
name: spring-app
ports:
- containerPort: 8080
hostPort: 80
protocol: TCP
resources: {}
restartPolicy: Always
updateStrategy: {}
status:
availableReplicas: 0
replicas: 0

0 comments on commit 66b708f

Please sign in to comment.