feat: Add scp plugin build
This commit is contained in:
parent
574418e870
commit
194ef1634c
3 changed files with 20 additions and 0 deletions
9
.woodpecker.yml
Normal file
9
.woodpecker.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
publish:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: git.merp.digital/${CI_REPO_OWNER}/woodpecker-scp
|
||||
registry: git.merp.digital
|
||||
tags: develop
|
||||
username: ${CI_REPO_OWNER}
|
||||
password:
|
||||
from_secret: cb_token
|
5
Dockerfile
Normal file
5
Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM alpine
|
||||
ADD plugin.sh /bin/
|
||||
RUN chmod +x /bin/plugin.sh
|
||||
RUN apk -Uuv add openssh
|
||||
ENTRYPOINT /bin/plugin.sh
|
6
plugin.sh
Normal file
6
plugin.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
mkdir -p /root/.ssh
|
||||
echo "${PLUGIN_SSH_KEY}" > "/root/.ssh/id_rsa"
|
||||
echo "${PLUGIN_SSH_KNOWN_HOSTS}" > "/root/.ssh/known_hosts"
|
||||
scp -B ${PLUGIN_EXTRA_FLAGS} ${PLUGIN_SOURCE} ${PLUGIN_DESTINATION}
|
Loading…
Reference in a new issue