|
@@ -1,3 +1,4 @@
|
|
|
|
+--- # ---
|
|
# apiVersion: argoproj.io/v1alpha1
|
|
# apiVersion: argoproj.io/v1alpha1
|
|
# kind: WorkflowTemplate
|
|
# kind: WorkflowTemplate
|
|
# metadata:
|
|
# metadata:
|
|
@@ -77,7 +78,6 @@
|
|
# volumeMounts:
|
|
# volumeMounts:
|
|
# - name: workdir
|
|
# - name: workdir
|
|
# mountPath: /go
|
|
# mountPath: /go
|
|
-# ---
|
|
|
|
apiVersion: argoproj.io/v1alpha1
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: Sensor
|
|
kind: Sensor
|
|
metadata:
|
|
metadata:
|
|
@@ -102,7 +102,7 @@ spec:
|
|
operation: create
|
|
operation: create
|
|
source:
|
|
source:
|
|
resource:
|
|
resource:
|
|
-#-------------------------------------------
|
|
|
|
|
|
+ #-------------------------------------------
|
|
apiVersion: argoproj.io/v1alpha1
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: Workflow
|
|
kind: Workflow
|
|
metadata:
|
|
metadata:
|
|
@@ -113,79 +113,85 @@ spec:
|
|
# directory for this workflow. This volume is passed around
|
|
# directory for this workflow. This volume is passed around
|
|
# from step to step.
|
|
# from step to step.
|
|
volumeClaimTemplates:
|
|
volumeClaimTemplates:
|
|
- - metadata:
|
|
|
|
- name: workdir
|
|
|
|
- spec:
|
|
|
|
- storageClassName: local-storage
|
|
|
|
- accessModes: [ "ReadWriteOnce" ]
|
|
|
|
- resources:
|
|
|
|
- requests:
|
|
|
|
- storage: 1Gi
|
|
|
|
|
|
+ - metadata:
|
|
|
|
+ name: workdir
|
|
|
|
+ spec:
|
|
|
|
+ storageClassName: local-storage
|
|
|
|
+ accessModes: ["ReadWriteOnce"]
|
|
|
|
+ # selector:
|
|
|
|
+ # matchLabels:
|
|
|
|
+ # name: models-1-0-0
|
|
|
|
+ resources:
|
|
|
|
+ requests:
|
|
|
|
+ storage: 1Gi
|
|
|
|
|
|
templates:
|
|
templates:
|
|
- - name: ci-example
|
|
|
|
- steps:
|
|
|
|
- - - name: build
|
|
|
|
- template: build-golang-example
|
|
|
|
- # the test step expands into three parallel steps running
|
|
|
|
- # different operating system images. each mounts the workdir
|
|
|
|
- # and runs the compiled binary from the build step.
|
|
|
|
- - - name: test
|
|
|
|
- template: run-hello
|
|
|
|
- arguments:
|
|
|
|
- parameters:
|
|
|
|
- - name: os-image
|
|
|
|
- value: "{{item.image}}:{{item.tag}}"
|
|
|
|
- withItems:
|
|
|
|
- - { image: 'debian', tag: '9.1' }
|
|
|
|
- - { image: 'alpine', tag: '3.6' }
|
|
|
|
- - { image: 'ubuntu', tag: '17.10' }
|
|
|
|
- - - name: release
|
|
|
|
- template: release-artifact
|
|
|
|
-
|
|
|
|
|
|
+ - name: ci-example
|
|
|
|
+ steps:
|
|
|
|
+ - - name: build
|
|
|
|
+ template: build-golang-example
|
|
|
|
+ # the test step expands into three parallel steps running
|
|
|
|
+ # different operating system images. each mounts the workdir
|
|
|
|
+ # and runs the compiled binary from the build step.
|
|
|
|
+ - - name: test
|
|
|
|
+ template: run-hello
|
|
|
|
+ arguments:
|
|
|
|
+ parameters:
|
|
|
|
+ - name: os-image
|
|
|
|
+ value: "{{item.image}}:{{item.tag}}"
|
|
|
|
+ withItems:
|
|
|
|
+ - { image: "debian", tag: "9.1" }
|
|
|
|
+ - { image: "alpine", tag: "3.6" }
|
|
|
|
+ - { image: "ubuntu", tag: "17.10" }
|
|
|
|
+ - - name: release
|
|
|
|
+ template: release-artifact
|
|
|
|
|
|
- - name: build-golang-example
|
|
|
|
- inputs:
|
|
|
|
- artifacts:
|
|
|
|
- - name: code
|
|
|
|
- path: /go/src/github.com/golang/example
|
|
|
|
- git:
|
|
|
|
- repo: https://github.com/golang/example.git
|
|
|
|
- container:
|
|
|
|
- image: golang:1.8
|
|
|
|
- command: [sh, -c]
|
|
|
|
- args: ["
|
|
|
|
- cd /go/src/github.com/golang/example/hello &&
|
|
|
|
- go build -v .
|
|
|
|
- "]
|
|
|
|
- volumeMounts:
|
|
|
|
- - name: workdir
|
|
|
|
- mountPath: /go
|
|
|
|
- - name: run-hello
|
|
|
|
- inputs:
|
|
|
|
- parameters:
|
|
|
|
- - name: os-image
|
|
|
|
- container:
|
|
|
|
- image: "{{inputs.parameters.os-image}}"
|
|
|
|
- command: [sh, -c]
|
|
|
|
- args: ["
|
|
|
|
- uname -a ;
|
|
|
|
- cat /etc/os-release ;
|
|
|
|
- /go/src/github.com/golang/example/hello/hello
|
|
|
|
- "]
|
|
|
|
- volumeMounts:
|
|
|
|
- - name: workdir
|
|
|
|
- mountPath: /go
|
|
|
|
- - name: release-artifact
|
|
|
|
- container:
|
|
|
|
- image: alpine:3.8
|
|
|
|
- volumeMounts:
|
|
|
|
- - name: workdir
|
|
|
|
- mountPath: /go
|
|
|
|
- outputs:
|
|
|
|
- artifacts:
|
|
|
|
- - name: release
|
|
|
|
- path: /go
|
|
|
|
|
|
+ - name: build-golang-example
|
|
|
|
+ inputs:
|
|
|
|
+ artifacts:
|
|
|
|
+ - name: code
|
|
|
|
+ path: /go/src/github.com/golang/example
|
|
|
|
+ git:
|
|
|
|
+ repo: https://github.com/golang/example.git
|
|
|
|
+ container:
|
|
|
|
+ image: golang:1.8
|
|
|
|
+ command: [sh, -c]
|
|
|
|
+ args: [
|
|
|
|
+ "
|
|
|
|
+ cd /go/src/github.com/golang/example/hello &&
|
|
|
|
+ go build -v .
|
|
|
|
+ ",
|
|
|
|
+ ]
|
|
|
|
+ volumeMounts:
|
|
|
|
+ - name: workdir
|
|
|
|
+ mountPath: /go
|
|
|
|
+ - name: run-hello
|
|
|
|
+ inputs:
|
|
|
|
+ parameters:
|
|
|
|
+ - name: os-image
|
|
|
|
+ container:
|
|
|
|
+ image: "{{inputs.parameters.os-image}}"
|
|
|
|
+ command: [sh, -c]
|
|
|
|
+ args: [
|
|
|
|
+ "
|
|
|
|
+ uname -a ;
|
|
|
|
+ cat /etc/os-release ;
|
|
|
|
+ /go/src/github.com/golang/example/hello/hello
|
|
|
|
+ ",
|
|
|
|
+ ]
|
|
|
|
+ volumeMounts:
|
|
|
|
+ - name: workdir
|
|
|
|
+ mountPath: /go
|
|
|
|
+ - name: release-artifact
|
|
|
|
+ container:
|
|
|
|
+ image: alpine:3.8
|
|
|
|
+ volumeMounts:
|
|
|
|
+ - name: workdir
|
|
|
|
+ mountPath: /go
|
|
|
|
+ outputs:
|
|
|
|
+ artifacts:
|
|
|
|
+ - name: release
|
|
|
|
+ path: /go
|
|
# apiVersion: argoproj.io/v1alpha1
|
|
# apiVersion: argoproj.io/v1alpha1
|
|
# kind: Workflow
|
|
# kind: Workflow
|
|
# metadata:
|
|
# metadata:
|
|
@@ -215,47 +221,41 @@ spec:
|
|
# - src:
|
|
# - src:
|
|
# dependencyName: test-dep
|
|
# dependencyName: test-dep
|
|
# dest: spec.arguments.parameters.0.value
|
|
# dest: spec.arguments.parameters.0.value
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-#-------------------------------------------
|
|
|
|
- # - template:
|
|
|
|
- # name: github-workflow-trigger
|
|
|
|
- # k8s:
|
|
|
|
- # group: argoproj.io
|
|
|
|
- # version: v1alpha1
|
|
|
|
- # resource: workflows
|
|
|
|
- # operation: create
|
|
|
|
- # source:
|
|
|
|
- # resource:
|
|
|
|
- # apiVersion: argoproj.io/v1alpha1
|
|
|
|
- # kind: Workflow
|
|
|
|
- # metadata:
|
|
|
|
- # generateName: github-
|
|
|
|
- # spec:
|
|
|
|
- # serviceAccountName: workflow
|
|
|
|
- # entrypoint: whalesay
|
|
|
|
- # arguments:
|
|
|
|
- # parameters:
|
|
|
|
- # - name: message
|
|
|
|
- # # value will get overridden by the event payload
|
|
|
|
- # value: hello world
|
|
|
|
- # templates:
|
|
|
|
- # - name: whalesay
|
|
|
|
- # inputs:
|
|
|
|
- # parameters:
|
|
|
|
- # - name: message
|
|
|
|
- # container:
|
|
|
|
- # image: docker/whalesay:latest
|
|
|
|
- # command: [cowsay]
|
|
|
|
- # args: ["{{inputs.parameters.message}}"]
|
|
|
|
- # parameters:
|
|
|
|
- # - src:
|
|
|
|
- # dependencyName: test-dep
|
|
|
|
- # dest: spec.arguments.parameters.0.value
|
|
|
|
-
|
|
|
|
|
|
+#-------------------------------------------
|
|
|
|
+# - template:
|
|
|
|
+# name: github-workflow-trigger
|
|
|
|
+# k8s:
|
|
|
|
+# group: argoproj.io
|
|
|
|
+# version: v1alpha1
|
|
|
|
+# resource: workflows
|
|
|
|
+# operation: create
|
|
|
|
+# source:
|
|
|
|
+# resource:
|
|
|
|
+# apiVersion: argoproj.io/v1alpha1
|
|
|
|
+# kind: Workflow
|
|
|
|
+# metadata:
|
|
|
|
+# generateName: github-
|
|
|
|
+# spec:
|
|
|
|
+# serviceAccountName: workflow
|
|
|
|
+# entrypoint: whalesay
|
|
|
|
+# arguments:
|
|
|
|
+# parameters:
|
|
|
|
+# - name: message
|
|
|
|
+# # value will get overridden by the event payload
|
|
|
|
+# value: hello world
|
|
|
|
+# templates:
|
|
|
|
+# - name: whalesay
|
|
|
|
+# inputs:
|
|
|
|
+# parameters:
|
|
|
|
+# - name: message
|
|
|
|
+# container:
|
|
|
|
+# image: docker/whalesay:latest
|
|
|
|
+# command: [cowsay]
|
|
|
|
+# args: ["{{inputs.parameters.message}}"]
|
|
|
|
+# parameters:
|
|
|
|
+# - src:
|
|
|
|
+# dependencyName: test-dep
|
|
|
|
+# dest: spec.arguments.parameters.0.value
|
|
|
|
|
|
# --- daqui pra baixo
|
|
# --- daqui pra baixo
|
|
# apiVersion: argoproj.io/v1alpha1
|
|
# apiVersion: argoproj.io/v1alpha1
|