File tree Expand file tree Collapse file tree 5 files changed +62
-10
lines changed
Expand file tree Collapse file tree 5 files changed +62
-10
lines changed Original file line number Diff line number Diff line change 1+ name : Demo-Hello-Python
2+ on :
3+ push :
4+ tags :
5+ - ' *'
6+ jobs :
7+ demo-hello-python-version :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - run : echo "PetPortalHosts is at version ${{ steps.tagkit.outputs.tag }}"
11+ - uses : actions/checkout@v2
12+ - name : build
13+ env :
14+ TAG : ${GITHUB_SHA::8}
15+ REPO : rbroker/hello-py
16+ XLD_USER : ${{ secrets.XLD_USER }}
17+ XLD_PASSWD : ${{ secrets.XLD_PASSWD }}
18+ XLD_URL : " http://xld.rbroker.linkpc.net"
19+ GET_LOCAL : " N"
20+ run : ./build.sh
Original file line number Diff line number Diff line change 1- REPO ?= danberg /hello-py
1+ REPO ?= rbroker /hello-py
22TAG ?= $(shell git rev-parse --short HEAD)
33IMAGE := $(REPO ) :$(TAG )
44LATEST_IMAGE := $(REPO ) :latest
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ export CLI_VERSION=" 10.0.0"
4+ export REPO=" rbroker/hello-py"
5+ # export VERSION="3.1.1"
6+ if [ -z " ${TAG} " ]
7+ then
8+ echo " VERSION not set"
9+ exit -1
10+ fi
11+ echo " Version = ${TAG} "
12+ IMAGE=" ${REPO} :${TAG} "
13+
14+ echo " docker build ${IMAGE} -f Dockerfile ."
15+ docker build ${IMAGE} -f Dockerfile .
16+ echo " docker push ${IMAGE} "
17+ docker push ${IMAGE}
18+ sed " s/{{image_tag}}/${TAG} /g" kubernetes/deployment.yaml > kubernetes/hello-python.yaml
19+
20+ if [ -z " ${GET_LOCAL} " ]
21+ then
22+ xl apply --file dai-deploy/hello-python-deploy.yaml --values version=$TAG
23+ else
24+ curl -LO https://dist.xebialabs.com/public/xl-cli/$CLI_VERSION /linux-amd64/xl
25+ chmod +x xl
26+ ./xl apply --xl-deploy-url=$XLD_URL --xl-deploy-username=$XLD_USER --xl-deploy-password=$XLD_PASSWD --file dai-deploy/hello-python-deploy.yaml --values version=$VERSION
27+ rm xl
28+ fi
29+ # rm x.yaml
30+ rm kubernetes/hello-python.yaml
Original file line number Diff line number Diff line change 22apiVersion : xl-deploy/v1
33kind : Applications
44spec :
5- - name : Applications/HelloPy
5+ - name : Applications/Paycom/ HelloPy
66 type : udm.Application
77 children :
8- - name : d120bb2
8+ - name : !format Applications/Paycom/HelloPy/%version%
99 type : udm.DeploymentPackage
1010 deployables :
1111 - name : hello-py-deploy.yaml
1212 type : k8s.ResourcesFile
1313 placeholders :
14- - image_tag
14+ - image_tag
1515 - ingress_host
1616 fileEncodings :
1717 " .+\\.properties " : ISO-8859-1
2424 displayResourceOnLogs : " false"
2525 showContainerLogs : " false"
2626 bytesToReadFromContainerLogs : " 4000"
27- file : !file "../kubernetes/deployment .yaml"
27+ file : !file "../kubernetes/hello-python .yaml"
Original file line number Diff line number Diff line change 1010 port : 6000
1111 targetPort : 5000
1212 type : ClusterIP
13+
1314---
1415apiVersion : apps/v1
1516kind : Deployment
@@ -33,23 +34,24 @@ spec:
3334 app : hello-py
3435 spec :
3536 containers :
36- - image : " {{image_name}} :{{image_tag}}"
37+ - image : " rbroker/hello-py :{{image_tag}}"
3738 name : hello-py
3839 ports :
3940 - containerPort : 5000
41+
4042---
4143apiVersion : networking.k8s.io/v1
4244kind : Ingress
4345metadata :
4446 name : hello-py-ingress
45- annotations :
46- nginx.ingress.kubernetes.io/rewrite-target : /$2
47+ labels :
48+ app : hello-py
4749spec :
4850 rules :
49- - host : " {{ingress_host}}"
51+ - host : {{ingress_host}}
5052 http :
5153 paths :
52- - path : /hellopy(/|$)(.*)
54+ - path : /
5355 pathType : Prefix
5456 backend :
5557 service :
You can’t perform that action at this time.
0 commit comments