Skip to content

Commit b664a45

Browse files
author
Marcin Przepiorowski
committed
ubuntu 22 build test
1 parent b8ea43f commit b664a45

File tree

3 files changed

+140
-0
lines changed

3 files changed

+140
-0
lines changed

.github/workflows/develop.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,64 @@ jobs:
157157
name: ubuntubuild
158158
path: ${{ env.FILENAME }}
159159

160+
161+
ubuntu22:
162+
needs: [centos7]
163+
runs-on: ubuntu-latest
164+
165+
steps:
166+
- name: checkout dxtoolkit code
167+
uses: actions/checkout@master
168+
169+
- name: add version
170+
run: |
171+
mkdir dxtoolkit2
172+
chmod 777 dxtoolkit2
173+
cd ./lib
174+
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
175+
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
176+
grep "version" Toolkit_helpers.pm
177+
178+
- name: Set up a Perl container
179+
#uses: pioro/dxtoolkit@develop
180+
uses: docker://pioro/dxperlubuntu22:526
181+
with:
182+
ENCKEY: ${{ secrets.ENCKEY }}
183+
184+
- name: Get the version
185+
id: get_version
186+
run: |
187+
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
188+
SOURCE_TAG=${GITHUB_REF#refs/tags/}
189+
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
190+
SOURCE_TAG=${GITHUB_REF#refs/heads/}
191+
else
192+
exit 1
193+
fi
194+
FILENAME="dxtoolkit2-${SOURCE_TAG}-ubuntu2204-installer.tar.gz"
195+
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
196+
echo FILENAME=$FILENAME >> $GITHUB_ENV
197+
198+
- name: add examples
199+
run: |
200+
gzip -d dxtoolkit.tar.gz
201+
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
202+
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
203+
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
204+
gzip dxtoolkit.tar
205+
206+
- name: compress toolkit
207+
run: |
208+
mv dxtoolkit.tar.gz ${{ env.FILENAME }}
209+
210+
- name: Upload ubuntu
211+
uses: actions/upload-artifact@v1
212+
with:
213+
name: ubuntu22build
214+
path: ${{ env.FILENAME }}
215+
216+
217+
160218
centos6:
161219
needs: [centos7]
162220
runs-on: ubuntu-latest

build/ubuntu22/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM ubuntu:22.04
2+
3+
RUN apt-get update \
4+
&& apt-get install -y libpar-packer-perl \
5+
&& apt-get install -y libjson-pp-perl \
6+
&& apt-get install -y libdate-manip-perl \
7+
&& apt-get install -y libdatetime-format-dateparse-perl \
8+
&& apt-get install -y libcrypt-cbc-perl \
9+
&& apt-get install -y libcrypt-blowfish-perl \
10+
&& apt-get install -y libtext-csv-perl \
11+
&& apt-get install -y libtry-tiny-perl \
12+
&& apt-get install -y libparse-http-useragent-perl \
13+
&& apt-get install -y libnet-ssleay-perl \
14+
&& apt-get install -y libio-socket-ssl-perl \
15+
&& apt-get install -y libfilter-perl \
16+
&& apt-get install -y libterm-readkey-perl \
17+
&& apt-get install -y cpanminus \
18+
&& apt-get install -y make \
19+
&& apt-get install -y gcc \
20+
&& apt-get install -y libssl-dev \
21+
&& apt-get install -y libwww-perl \
22+
&& cpanm DateTime::Event::Cron::Quartz \
23+
&& cpanm Log::Syslog::[email protected] \
24+
&& cpanm Filter::Crypto::Decrypt
25+
26+
RUN mkdir -p /github/workspace
27+
RUN mkdir -p /github/home
28+
RUN mkdir -p /github/workflow
29+
COPY entrypoint.sh /entrypoint.sh
30+
WORKDIR /github/workspace
31+
RUN chmod +x /entrypoint.sh
32+
33+
34+
ENTRYPOINT ["/entrypoint.sh"]
35+
36+
37+

build/ubuntu22/entrypoint.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
3+
export DELPHIX_OUTPUT=/github/workspace/dxtoolkit2
4+
mkdir $DELPHIX_OUTPUT
5+
6+
cd /github/workspace/lib
7+
mv dbutils.pm dbutils.orig.pm
8+
cat dbutils.orig.pm | sed -e "s/put your encryption key here/${INPUT_ENCKEY}/" > dbutils.pm
9+
ls -l dbutils*
10+
11+
cd /github/workspace/bin
12+
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 \
13+
-F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DELPHIX_OUTPUT/runner `ls dx_*.pl | xargs`
14+
15+
cd $DELPHIX_OUTPUT
16+
17+
echo #!/bin/bash > install.sh
18+
echo LIST_OF_SCRIPTS=\( >> install.sh
19+
20+
for i in /github/workspace/bin/dx_*.pl ; do
21+
name=`basename -s .pl $i`;
22+
echo $name >> install.sh
23+
done
24+
25+
echo \) >> install.sh
26+
echo >> install.sh
27+
echo >> install.sh
28+
echo for i in \"\$\{LIST_OF_SCRIPTS\[\@\]\}\" >> install.sh
29+
echo do >> install.sh
30+
echo echo \$i >> install.sh
31+
echo ln -sf runner \$i >> install.sh
32+
echo done >> install.sh
33+
34+
# for i in /github/workspace/bin/dx_*.pl ; do name=`basename -s .pl $i`; ln -s runner $name; done
35+
36+
cd /github/workspace
37+
tar czvf /github/workspace/dxtoolkit.tar.gz dxtoolkit2/
38+
39+
40+
41+
42+
43+
44+
45+

0 commit comments

Comments
 (0)