forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinput-artifact-git.yaml
59 lines (59 loc) · 2.6 KB
/
input-artifact-git.yaml
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
# This example demonstrates the use of a git repo as a hard-wired input artifact.
# The argo repo is cloned to its target destination at '/src' for the main container to consume.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: input-artifact-git-
spec:
entrypoint: git-clone
templates:
- name: git-clone
inputs:
artifacts:
- name: argo-source
path: /src
git:
repo: https://github.com/argoproj/argo-workflows.git
revision: "v2.1.1"
# For private repositories, create a k8s secret containing the git credentials and
# reference the secret keys in the secret selectors: usernameSecret, passwordSecret,
# or sshPrivateKeySecret.
# NOTE: when authenticating via sshPrivateKeySecret, the repo URL should supplied in its
# SSH format (e.g. [email protected]:argoproj/argo-workflows.git). Similarly, when authenticating via
# basic auth, the URL should be in its HTTP form (e.g. https://github.com/argoproj/argo-workflows.git)
# usernameSecret:
# name: github-creds
# key: username
# passwordSecret:
# name: github-creds
# key: password
# sshPrivateKeySecret:
# name: github-creds
# key: ssh-private-key
#
# insecureIgnoreHostKey disables SSH strict host key checking during the git clone
# NOTE: this is unnecessary for the well-known public SSH keys from the major git
# providers (github, bitbucket, gitlab, azure) as these keys are already baked into
# the executor image which performs the clone.
# insecureIgnoreHostKey: true
#
# Shallow clones/fetches can be performed by providing a `depth`.
# depth: 1
#
# Additional ref specs to fetch down prior to checkout can be
# provided with `fetch`. This may be necessary if `revision` is a
# non-branch/-tag ref and thus not covered by git's default fetch.
# See https://git-scm.com/book/en/v2/Git-Internals-The-Refspec for
# the refspec format.
# fetch: refs/meta/*
# fetch: refs/changes/*
#
# Single branch mode can be specified by providing a `singleBranch` and `branch` This mode
# is faster than passing in a revision, as it will only fetch the references to the given branch.
# singleBranch: true
# branch: my-branch
container:
image: golang:1.10
command: [sh, -c]
args: ["git status && ls && cat VERSION"]
workingDir: /src