Replies: 1 comment 1 reply
|
I solved this using an additional step. Not beautiful but works. The reason why e.g. subpath doesn't work is that the method is not implemented. apiVersion: argoproj.io/v1alpha1
kind: Workflow
spec:
entrypoint: main
templates:
- name: get-manifest
inputs:
artifacts:
- name: git
path: /git
container:
image: alpine:latest
command: ["/bin/sh", "-c"]
args: ["echo 'Useless step.'"]
outputs:
artifacts:
- name: manifest
path: "/git/manifest.yaml"
- name: apply-manifest
inputs:
artifacts:
- name: manifest
path: /manifest.yaml
resource:
action: create
manifestFrom:
artifact:
name: manifest
- name: main
inputs:
artifacts:
- name: "git"
git:
repo: "https://github.com/foo/bar.git"
revision: "somerev"
usernameSecret:
name: git-secret
key: username
passwordSecret:
name: git-secret
key: password
steps:
- - name: get-manifest
template: get-manifest
arguments:
artifacts:
- name: git
from: "{{inputs.artifacts.git}}"
- - name: apply-manifest
template: apply-manifest
arguments:
artifacts:
- name: manifest
from: "{{steps.get-manifest.outputs.artifacts.manifest}}"
- name: git
from: "{{inputs.artifacts.git}}" |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I'm looking to have a workflow pull a single file from a private git repository then apply it to the Kubernetes cluster, however git artifacts appear to only be able to pull the entire git repo, and the resource template step only allows a single artifact name as input.
I have tried something like the following but keep getting an error that the templates.main.inputs.artifacts.manifest was not supplied when trying to create the workflow.
All reactions