Skip to content

Commit

Permalink
Update CI to point to s3 bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseEspinosa committed Aug 9, 2022
1 parent 5f0bc30 commit 1510372
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
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
rsync -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/publish/sandbox/test-results/index.html ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/tests/test-results-linux-x64-$(date +"%Y-%m-%d-%H:%M").html
## Modified
## rsync -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/publish/sandbox/test-results/index.html ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/tests/test-results-linux-x64-$(date +"%Y-%m-%d-%H:%M").html
aws s3 cp ~/publish/sandbox/test-results/index.html s3://tcoffee-packages-tests/tests/test-results-linux-x64-$(date +"%Y-%m-%d-%H:%M").html
[[ "$test_status" != 0 ]] && exit $test_status || true
)
no_output_timeout: 30m
Expand All @@ -41,26 +43,34 @@ jobs:
- run: |
#
# This section will publish onto the websites the various elements produced by "make distribution"
# Note that since the distribution is usualy 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
# 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 enpty before deleting its content
rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/tcoffee/lib/version/version_number.version ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/$MODE/Latest;
ssh ec2-user@tcoffee.org "rm ~/Dropbox/Public/public_html/Packages/$MODE/Latest/*;";
rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/publish/sandbox/distributions/$MODE/$version/* ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/$MODE/Latest;
rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/tcoffee/docs/.html/* ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Projects/tcoffee/documentation/;
#Start publishing the latest release -- make sure the receiving directory is not empty before deleting its content
## Modified
## rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/tcoffee/lib/version/version_number.version ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/$MODE/Latest;
### aws s3 cp ~/tcoffee/lib/version/version_number.version s3://tcoffee-packages-tests/Packages/$MODE/Latest/;
## ssh ec2-user@tcoffee.org "rm ~/Dropbox/Public/public_html/Packages/$MODE/Latest/*;";
### aws s3 rm s3://tcoffee-packages-tests/Packages/Stable/Latest/ --recursive --exclude "";
## rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/publish/sandbox/distributions/$MODE/$version/* ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/$MODE/Latest;
aws s3 sync ~/publish/sandbox/distributions/$MODE/$version/ s3://tcoffee-packages-tests/$MODE/Latest/ --delete; ## tested
## rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/tcoffee/docs/.html/* ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Projects/tcoffee/documentation/;
aws s3 sync ~/tcoffee/docs/.html s3://tcoffee.org/Projects/tcoffee/documentation-tests; ##tested
#
#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 ec2-user@tcoffee.org:~/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 ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/Binaries/tcoffee/linux/t_coffee.$linux_bversion;
## rsync -avzr -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/tcoffee/binaries/macosx/t_coffee ec2-user@tcoffee.org:~/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 ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/Binaries/tcoffee/linux/t_coffee.$linux_bversion;
aws s3 cp ~/tcoffee/binaries/macosx/t_coffee s3://tcoffee-packages-tests/Binaries/tcoffee/macosx/t_coffee.$macosx_bversion; ##tested ## do not delete binaries kept
aws s3 cp ~/tcoffee/binaries/linux/t_coffee s3://tcoffee-packages-tests/Binaries/tcoffee/linux/t_coffee.$linux_bversion; ##tested ## do not delete binaries kept
#
#Publish the various distribution files into archives
ssh ec2-user@tcoffee.org "cp -r ~/Dropbox/Public/public_html/Packages/$MODE/Latest/* ~/Dropbox/Public/public_html/Packages/Archives";
## ssh ec2-user@tcoffee.org "cp -r ~/Dropbox/Public/public_html/Packages/$MODE/Latest/* ~/Dropbox/Public/public_html/Packages/Archives";
aws s3 cp s3://tcoffee-packages-tests/$MODE/Latest/ s3://tcoffee-packages-tests/Packages/Archives/ --recursive ## tested;
#
# tag and push latest
docker login -u $DOCKER_USER -p $DOCKER_PASS
Expand Down

0 comments on commit 1510372

Please sign in to comment.