Add helper script
ci/woodpecker/push/build Pipeline was successful Details

This commit is contained in:
Rafal Kupiec 2023-01-17 16:18:17 +01:00
parent d2aa3b5ec0
commit 7cad8f3e32
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 16 additions and 1 deletions

View File

@ -5,7 +5,7 @@ MAINTAINER CodingWorkshop <constitutive@codingworkshop.eu.org>
RUN pacman -Syu --noconfirm --noprogressbar --quiet
# Install additional packages
RUN pacman -Syu --noconfirm --noprogressbar --quiet autoconf automake binutils bison cppcheck docker flex gcc git libedit libmd linux-headers mtools parted patch pkgconfig texinfo wget
RUN pacman -Syu --noconfirm --noprogressbar --quiet autoconf automake binutils bison cppcheck docker flex gcc git libedit libmd linux-headers mtools openssh parted patch pkgconfig texinfo wget
# Set locale
RUN echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && \
@ -33,6 +33,10 @@ RUN wget https://github.com/xt-sys/xtchain/releases/download/2.7/xtchain-2.7-lin
COPY files/github_publish /usr/local/bin/
RUN chmod a+x /usr/local/bin/github_publish
# Install artifacts publishing script
COPY files/artifact_publish /usr/local/bin/
RUN chmod a+x /usr/local/bin/artifact_publish
# Set system path
ENV PATH="/opt/xtchain:/opt/xtchain/bin:${PATH}"

11
files/artifact_publish Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
SOURCE="${1}"
DESTINATION="${2}"
echo "Publishing CI/CD artifacts for '${CI_COMMIT_REF}'"
echo "$OSCW_ARTIFACTS_USERKEY" | base64 -d > ~/artifacts.key
chmod 600 ~/artifacts.key
scp -o StrictHostKeyChecking=no -i ~/artifacts.key ${SOURCE} $OSCW_ARTIFACTS_USERNAME@$OSCW_ARTIFACTS_HOSTNAME:artifacts/${DESTINATION}/