Skip to content

Commit

Permalink
ubuntu 22 build test
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Przepiorowski committed Sep 18, 2024
1 parent b8ea43f commit b664a45
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,64 @@ jobs:
name: ubuntubuild
path: ${{ env.FILENAME }}


ubuntu22:
needs: [centos7]
runs-on: ubuntu-latest

steps:
- name: checkout dxtoolkit code
uses: actions/checkout@master

- name: add version
run: |
mkdir dxtoolkit2
chmod 777 dxtoolkit2
cd ./lib
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
grep "version" Toolkit_helpers.pm
- name: Set up a Perl container
#uses: pioro/dxtoolkit@develop
uses: docker://pioro/dxperlubuntu22:526
with:
ENCKEY: ${{ secrets.ENCKEY }}

- name: Get the version
id: get_version
run: |
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/tags/}
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/heads/}
else
exit 1
fi
FILENAME="dxtoolkit2-${SOURCE_TAG}-ubuntu2204-installer.tar.gz"
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
echo FILENAME=$FILENAME >> $GITHUB_ENV
- name: add examples
run: |
gzip -d dxtoolkit.tar.gz
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
gzip dxtoolkit.tar
- name: compress toolkit
run: |
mv dxtoolkit.tar.gz ${{ env.FILENAME }}
- name: Upload ubuntu
uses: actions/upload-artifact@v1
with:
name: ubuntu22build
path: ${{ env.FILENAME }}



centos6:
needs: [centos7]
runs-on: ubuntu-latest
Expand Down
37 changes: 37 additions & 0 deletions build/ubuntu22/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:22.04

RUN apt-get update \
&& apt-get install -y libpar-packer-perl \
&& apt-get install -y libjson-pp-perl \
&& apt-get install -y libdate-manip-perl \
&& apt-get install -y libdatetime-format-dateparse-perl \
&& apt-get install -y libcrypt-cbc-perl \
&& apt-get install -y libcrypt-blowfish-perl \
&& apt-get install -y libtext-csv-perl \
&& apt-get install -y libtry-tiny-perl \
&& apt-get install -y libparse-http-useragent-perl \
&& apt-get install -y libnet-ssleay-perl \
&& apt-get install -y libio-socket-ssl-perl \
&& apt-get install -y libfilter-perl \
&& apt-get install -y libterm-readkey-perl \
&& apt-get install -y cpanminus \
&& apt-get install -y make \
&& apt-get install -y gcc \
&& apt-get install -y libssl-dev \
&& apt-get install -y libwww-perl \
&& cpanm DateTime::Event::Cron::Quartz \
&& cpanm Log::Syslog::[email protected] \
&& cpanm Filter::Crypto::Decrypt

RUN mkdir -p /github/workspace
RUN mkdir -p /github/home
RUN mkdir -p /github/workflow
COPY entrypoint.sh /entrypoint.sh
WORKDIR /github/workspace
RUN chmod +x /entrypoint.sh


ENTRYPOINT ["/entrypoint.sh"]



45 changes: 45 additions & 0 deletions build/ubuntu22/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

export DELPHIX_OUTPUT=/github/workspace/dxtoolkit2
mkdir $DELPHIX_OUTPUT

cd /github/workspace/lib
mv dbutils.pm dbutils.orig.pm
cat dbutils.orig.pm | sed -e "s/put your encryption key here/${INPUT_ENCKEY}/" > dbutils.pm
ls -l dbutils*

cd /github/workspace/bin
pp -u -I /github/workspace/lib -l /usr/lib/x86_64-linux-gnu/libcrypto.so.3 -l /usr/lib/x86_64-linux-gnu/libssl.so.3 -M Text::CSV_PP -M List::MoreUtils::PP -M Crypt::Blowfish \
-F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DELPHIX_OUTPUT/runner `ls dx_*.pl | xargs`

cd $DELPHIX_OUTPUT

echo #!/bin/bash > install.sh
echo LIST_OF_SCRIPTS=\( >> install.sh

for i in /github/workspace/bin/dx_*.pl ; do
name=`basename -s .pl $i`;
echo $name >> install.sh
done

echo \) >> install.sh
echo >> install.sh
echo >> install.sh
echo for i in \"\$\{LIST_OF_SCRIPTS\[\@\]\}\" >> install.sh
echo do >> install.sh
echo echo \$i >> install.sh
echo ln -sf runner \$i >> install.sh
echo done >> install.sh

# for i in /github/workspace/bin/dx_*.pl ; do name=`basename -s .pl $i`; ln -s runner $name; done

cd /github/workspace
tar czvf /github/workspace/dxtoolkit.tar.gz dxtoolkit2/








0 comments on commit b664a45

Please sign in to comment.