-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsimple-git-clone.yaml
More file actions
62 lines (62 loc) · 1.66 KB
/
simple-git-clone.yaml
File metadata and controls
62 lines (62 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: git-clone-
spec:
# invoke the whalesay template with
# "hello world" as the argument
# to the message parameter
entrypoint: ci-pipeline
arguments:
parameters:
- name: git_url
value: https://github.com/Coit-IO/coit-simple-microservice.git
- name: maven_command
value: install
- name: yaml_file_name
value: resource-manifests/coit-frontend-deployment.yaml
templates:
- name: checkout-the-code
inputs:
parameters:
- name: git_url
container:
image: alpine/git
command: ["git", "clone"]
args: ["{{inputs.parameters.git_url}}"]
- name: build-with-maven
inputs:
parameters:
- name: maven_command
container:
image: maven
command: ["mvn"]
args: ["{{inputs.parameters.maven_command}}"]
- name: deploy-with-kubectl
inputs:
parameters:
- name: yaml_file_name
container:
image: maven
command: ["kubectl", "apply"]
args: ["{{inputs.parameters.yaml_file_name}}"]
- name: ci-pipeline
steps:
- - name: git-clone
template: checkout-the-code
arguments:
parameters:
- name: git_url
value: https://github.com/Coit-IO/coit-home-commerce.git
- - name: maven-install
template: build-with-maven
arguments:
parameters:
- name: maven_command
value: install
- - name: deploy-to-kubernetes
template: deploy-with-kubectl
arguments:
parameters:
- name: yaml_file_name
value: resource-manifests/coit-frontend-deployment.yaml