mirror of
https://github.com/danielgormly/drone-plugin-kube.git
synced 2026-06-04 18:23:48 +08:00
Updated with service example, updated version number, build steps
This commit is contained in:
@@ -5,5 +5,6 @@ set -eou pipefail
|
|||||||
rm -rf build/kubano
|
rm -rf build/kubano
|
||||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o build/kubano
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o build/kubano
|
||||||
|
|
||||||
docker build -t danielgormly/drone-plugin-kube:0.1.0 build
|
docker build -t danielgormly/drone-plugin-kube:0.2.0 -t danielgormly/drone-plugin-kube:latest build
|
||||||
docker push danielgormly/drone-plugin-kube:0.1.0
|
docker push danielgormly/drone-plugin-kube:0.2.0
|
||||||
|
docker push danielgormly/drone-plugin-kube:latest
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ func main() {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
fmt.Printf(os.Getenv("PLUGIN_SKIP_TLS"))
|
fmt.Printf(os.Getenv("PLUGIN_SKIP_TLS"))
|
||||||
fmt.Println("danielgormly/drone-plugin-kube@0.1.0 https://github.com/danielgormly/drone-plugin-kube")
|
fmt.Println("danielgormly/drone-plugin-kube@0.2.0 https://github.com/danielgormly/drone-plugin-kube")
|
||||||
err := plugin.Exec()
|
err := plugin.Exec()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("⛔️ Fatal error: \n%s", err)
|
log.Fatalf("⛔️ Fatal error: \n%s", err)
|
||||||
|
|||||||
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export PLUGIN_TEMPLATE=test/service.template.yaml
|
||||||
|
export PLUGIN_NAME=drone-kube-test
|
||||||
|
export PLUGIN_NAMESPACE=default
|
||||||
|
|
||||||
|
go build -o build/kubano
|
||||||
|
export $(cat .env | xargs) && ./build/kubano
|
||||||
|
|
||||||
|
# docker run --env-file=.env drone-kubano
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: wiki-http
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
app: wiki
|
||||||
|
type: ClusterIP
|
||||||
Reference in New Issue
Block a user