Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
tekton-s5cmd
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
bcece5dd
authored
2022-02-23 15:42:50 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add task-s5cmd-upload.
1 parent
570a3a67
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
0 deletions
kustomization.yaml
scripts/upload-files.sh
task-s5cmd-upload.yaml
kustomization.yaml
View file @
bcece5d
...
...
@@ -3,6 +3,7 @@ kind: Kustomization
resources
:
-
./task-s5cmd-download.yaml
-
./task-s5cmd-upload.yaml
configMapGenerator
:
-
name
:
task-s5cmd-scripts
...
...
@@ -10,4 +11,5 @@ configMapGenerator:
disableNameSuffixHash
:
true
files
:
-
scripts/download-files.sh
-
scripts/upload-files.sh
---
...
...
scripts/upload-files.sh
0 → 100644
View file @
bcece5d
#!/bin/sh
set
-ex
had_error
=
0
if
[
$#
-eq 0
]
;
then
had_error
=
$((
$had_error
+
1
))
echo
"No files to upload!"
1>&2
fi
if
[
"z
$UPLOAD_INPUT
"
=
z
]
;
then
had_error
=
$((
$had_error
+
1
))
echo
"UPLOAD_INPUT variable not set!"
1>&2
fi
if
[
$had_error
-gt 0
]
;
then
exit
1
fi
echo
"Upload files:
$@
"
echo
" from:
$UPLOAD_INPUT
"
for
item
in
"
$@
"
;
do
target
=
"
${
item
%%
:
*
}
"
remote
=
"
${
item
#*
:
}
"
/s5cmd cp
"
$UPLOAD_INPUT
/
$target
"
"
$remote
"
done
task-s5cmd-upload.yaml
0 → 100644
View file @
bcece5d
---
apiVersion
:
tekton.dev/v1beta1
kind
:
Task
metadata
:
name
:
task-s5cmd-upload
spec
:
params
:
-
name
:
auth-config-map
type
:
string
default
:
foo
-
name
:
auth-secret
type
:
string
default
:
bar
-
name
:
items
type
:
array
-
name
:
s5cmd-image
type
:
string
default
:
peakcom/s5cmd
workspaces
:
-
name
:
files
volumes
:
-
name
:
task-s5cmd-scripts
configMap
:
name
:
task-s5cmd-scripts
defaultMode
:
0755
steps
:
-
name
:
upload-files
image
:
$(params.s5cmd-image)
command
:
[
"
/task-s5cmd-scripts/upload-files.sh"
]
args
:
[
"
$(params.items[*])"
]
env
:
-
name
:
UPLOAD_INPUT
value
:
$(workspaces.files.path)
envFrom
:
-
configMapRef
:
name
:
$(params.auth-config-map)
-
secretRef
:
name
:
$(params.auth-secret)
volumeMounts
:
-
name
:
task-s5cmd-scripts
mountPath
:
/task-s5cmd-scripts
---
Please
register
or
sign in
to post a comment