forked from cbcrg/tcoffee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
93 lines (92 loc) · 6.07 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: 2
jobs:
build:
machine:
image: ubuntu-2004:202201-02
steps:
- checkout
# **do not edit: start
# Variable programmatically edited by /lib/perl/scripts/read_program_version.pl when changing release number
# /lib/perl/scripts/read_program_version.pl gets invoked by make beta|stable|major
- run: echo 'export RELEASE="0"' >> $BASH_ENV #UPDATE_RELEASE_STATUS
# **do not edit: end
- run: mv ~/project ~/tcoffee
- run: mkdir -p ~/repo
- run: docker pull cbcrg/tcoffee-build-box:1.2
- run: mkdir $HOME/publish
- run: |
docker run -e BUILD_NUMBER=$CIRCLE_BUILD_NUM -e RELEASE=${RELEASE:-0} \
-v $HOME/tcoffee:/root/tcoffee \
-v $HOME/repo:/root/repo \
-v $HOME/publish:/publish \
cbcrg/tcoffee-build-box:1.2 \
bash -c 'tcoffee/build/build.sh env tcoffee; mv /root/sandbox /publish'
- run: sudo chown -R $(id -u):$(id -g) ~/repo ~/publish
# tests and publish htmls
- run:
command: |
mv ~/publish/sandbox/build ~/tcoffee/docker/tcoffee
cd ~/tcoffee/docker/ && docker build -t xcoffee .
mkdir -p ~/publish/sandbox/test-results
(set +e
docker run -v ~/tcoffee:/root/tcoffee -v ~/publish/sandbox/test-results:/test-results xcoffee bash /root/tcoffee/docker/run-tests.sh
test_status=$?
set -x
## Modified
## rsync -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/publish/sandbox/test-results/index.html [email protected]:~/Dropbox/Public/public_html/Packages/tests/test-results-linux-x64-$(date +"%Y-%m-%d-%H:%M").html
## TODO seems like the path ~/publish/sandbox/test-results/index.html does not exists
aws s3 cp ~/publish/sandbox/test-results/index.html s3://tcoffee-packages/tests/test-results-linux-x64-$(date +"%Y-%m-%d-%H:%M").html
[[ "$test_status" != 0 ]] && exit $test_status || true
)
no_output_timeout: 30m
# publish artifacts
- run: |
#
# This section will publish onto the websites the various elements produced by "make distribution"
# Note that since the distribution is usually triggered by the "git push" in "make release", the basic elements (doc, source and binary of the machine in which make release was launched) should already be published
#
if [[ $RELEASE == 1 ]]; then MODE=Stable; else MODE=Beta; fi;
version=$(cat ~/publish/sandbox/.version);
macosx_bversion=$(cat ~/tcoffee/binaries/macosx/version_number.version);
linux_bversion=$(cat ~/tcoffee/binaries/linux/version_number.version);
cp ~/tcoffee/build/web-readme.txt ~/publish/sandbox/distributions/$MODE/$version/readme.txt
#
# Start publishing the latest release -- make sure the receiving directory is not empty before deleting its content
## rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/tcoffee/lib/version/version_number.version [email protected]:~/Dropbox/Public/public_html/Packages/$MODE/Latest;
## ssh [email protected] "rm ~/Dropbox/Public/public_html/Packages/$MODE/Latest/*;";
# Don't need to remove the content of the directory, sync --delete will do it
### aws s3 rm s3://tcoffee-packages/Stable/Latest/ --recursive --exclude "";
### aws s3 cp ~/tcoffee/lib/version/version_number.version s3://tcoffee-packages/$MODE/Latest/;
## rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/publish/sandbox/distributions/$MODE/$version/* [email protected]:~/Dropbox/Public/public_html/Packages/$MODE/Latest;
aws s3 sync ~/publish/sandbox/distributions/$MODE/$version/ s3://tcoffee-packages/$MODE/Latest/ --delete;
## rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/tcoffee/docs/.html/* [email protected]:~/Dropbox/Public/public_html/Projects/tcoffee/documentation/;
aws s3 sync ~/tcoffee/docs/.html s3://tcoffee.org/Projects/tcoffee/documentation;
#
#Published binaries into the binary dir -- in case the macosx is available, publish it as well -- This will be the case when the release is launched from a mac
## rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/tcoffee/binaries/macosx/t_coffee [email protected]:~/Dropbox/Public/public_html/Packages/Binaries/tcoffee/macosx/t_coffee.$macosx_bversion;
## rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/tcoffee/binaries/linux/t_coffee [email protected]:~/Dropbox/Public/public_html/Packages/Binaries/tcoffee/linux/t_coffee.$linux_bversion;
aws s3 cp ~/tcoffee/binaries/macosx/t_coffee s3://tcoffee-packages/Binaries/tcoffee/macosx/t_coffee.$macosx_bversion; # only if launched from mac
aws s3 cp ~/tcoffee/binaries/linux/t_coffee s3://tcoffee-packages/Binaries/tcoffee/linux/t_coffee.$linux_bversion;
#
#Publish the various distribution files into archives
## ssh [email protected] "cp -r ~/Dropbox/Public/public_html/Packages/$MODE/Latest/* ~/Dropbox/Public/public_html/Packages/Archives";
aws s3 cp s3://tcoffee-packages/$MODE/Latest/ s3://tcoffee-packages/Archives/ --recursive;
#
# tag and push latest
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag xcoffee cbcrg/tcoffee:latest;
docker push cbcrg/tcoffee:latest;
# push stable
if [[ $RELEASE == 1 ]]; then
docker tag xcoffee cbcrg/tcoffee:stable;
docker push cbcrg/tcoffee:stable;
fi
# tag versions
version=$(cat ~/publish/sandbox/.version);
docker tag xcoffee cbcrg/tcoffee:$version;
docker push cbcrg/tcoffee:$version;
if [[ $RELEASE == 1 ]]; then
version+='_stable'
docker tag xcoffee cbcrg/tcoffee:$version;
docker push cbcrg/tcoffee:$version;
fi