Skip to content

Commit

Permalink
Merge pull request #58 from cbcrg/fix_release
Browse files Browse the repository at this point in the history
Fix release process
  • Loading branch information
JoseEspinosa committed Jun 7, 2023
2 parents c5b624f + ad700d4 commit dbf6536
Show file tree
Hide file tree
Showing 33 changed files with 1,182 additions and 1,335 deletions.
212 changes: 139 additions & 73 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2
version: 2.1
jobs:
build:
machine:
Expand All @@ -22,76 +22,142 @@ jobs:
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 ec2-user@tcoffee.org:~/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
- persist_to_workspace:
root: /home/circleci
paths:
- publish
- tcoffee
# tests and publish test htmls
test:
machine:
image: ubuntu-2004:202201-02
steps:
- checkout
- attach_workspace:
at: /home/circleci
- 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 ec2-user@tcoffee.org:~/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
)
cd ~/ && docker save -o xcoffee.tar xcoffee
no_output_timeout: 30m
- persist_to_workspace:
root: /home/circleci
paths:
- xcoffee.tar

# 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 ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/$MODE/Latest;
## ssh ec2-user@tcoffee.org "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/* ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/$MODE/Latest;
aws s3 sync ~/publish/sandbox/distributions/$MODE/$version/ s3://tcoffee-packages/$MODE/Latest/ --delete;
aws s3 sync ~/publish/sandbox/distributions/$MODE/$version/ s3://tcoffee.org/Packages/$MODE/Latest/ --delete;
## 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;
#
#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;
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;
aws s3 cp ~/tcoffee/binaries/macosx/t_coffee s3://tcoffee.org/Binaries/tcoffee/macosx/t_coffee.$macosx_bversion; # only if launched from mac
aws s3 cp ~/tcoffee/binaries/linux/t_coffee s3://tcoffee.org/Packages/Binaries/tcoffee/linux/t_coffee.$linux_bversion;
aws s3 cp ~/tcoffee/binaries/macosx/t_coffee s3://tcoffee.org/Packages/Binaries/tcoffee/macosx/t_coffee.$macosx_bversion; # only if launched from mac
#
#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";
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
# publish artifacts
publish:
machine:
image: ubuntu-2004:202201-02
steps:
- attach_workspace:
at: /home/circleci
- 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 ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/$MODE/Latest;
## ssh ec2-user@tcoffee.org "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/* ec2-user@tcoffee.org:~/Dropbox/Public/public_html/Packages/$MODE/Latest;
aws s3 sync ~/publish/sandbox/distributions/$MODE/$version/ s3://tcoffee-packages/$MODE/Latest/ --delete;
aws s3 sync ~/publish/sandbox/distributions/$MODE/$version/ s3://tcoffee.org/Packages/$MODE/Latest/ --delete;
## 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;
#
#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;
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;
aws s3 cp ~/tcoffee/binaries/macosx/t_coffee s3://tcoffee.org/Binaries/tcoffee/macosx/t_coffee.$macosx_bversion; # only if launched from mac
aws s3 cp ~/tcoffee/binaries/linux/t_coffee s3://tcoffee.org/Packages/Binaries/tcoffee/linux/t_coffee.$linux_bversion;
aws s3 cp ~/tcoffee/binaries/macosx/t_coffee s3://tcoffee.org/Packages/Binaries/tcoffee/macosx/t_coffee.$macosx_bversion; # only if launched from mac
#
#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";
aws s3 cp s3://tcoffee-packages/$MODE/Latest/ s3://tcoffee-packages/Archives/ --recursive;
#
# tag and push docker latest
push_image:
machine:
image: ubuntu-2004:202201-02
steps:
- attach_workspace:
at: /home/circleci
- checkout
- run: |
docker load -i ~/xcoffee.tar
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
# Workflow declaration
# See here (https://stackoverflow.com/questions/66689847/executing-a-circleci-job-only-when-tag-matches-a-certain-pattern)
# Another example https://goreleaser.com/ci/circle/
workflows:
build_test_publish:
jobs:
- build:
filters:
tags:
only: /.*/
- test:
requires:
- build
filters:
tags:
only: /.*/
- publish:
requires:
- test
filters:
branches:
ignore: /.*/
tags:
only: /^V.*/
- push_image:
requires:
- publish
filters:
branches:
ignore: /.*/
tags:
only: /^V.*/
Binary file modified binaries/macosx/t_coffee
Binary file not shown.
Binary file modified docs/.html/.doctrees/doc2test.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.html/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/page-example.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_citations_references.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_contacts_adresses.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_faq.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_installation.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_license.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_main_documentation.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_quickstart.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_quickstart_regressive.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_release_guide.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_release_notes.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_technical_documentation.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_tutorials.doctree
Binary file not shown.
Binary file modified docs/.html/.doctrees/tcoffee_webserver.doctree
Binary file not shown.
59 changes: 27 additions & 32 deletions docs/.html/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -222,7 +222,7 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */

div.body {
min-width: 450px;
min-width: 360px;
max-width: 800px;
}

Expand All @@ -237,16 +237,6 @@ a.headerlink {
visibility: hidden;
}

a.brackets:before,
span.brackets > a:before{
content: "[";
}

a.brackets:after,
span.brackets > a:after {
content: "]";
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
Expand Down Expand Up @@ -334,13 +324,15 @@ aside.sidebar {
p.sidebar-title {
font-weight: bold;
}

nav.contents,
aside.topic,
div.admonition, div.topic, blockquote {
clear: left;
}

/* -- topics ---------------------------------------------------------------- */

nav.contents,
aside.topic,
div.topic {
border: 1px solid #ccc;
padding: 7px;
Expand Down Expand Up @@ -379,13 +371,17 @@ div.body p.centered {

div.sidebar > :last-child,
aside.sidebar > :last-child,
nav.contents > :last-child,
aside.topic > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}

div.sidebar::after,
aside.sidebar::after,
nav.contents::after,
aside.topic::after,
div.topic::after,
div.admonition::after,
blockquote::after {
Expand Down Expand Up @@ -428,10 +424,6 @@ table.docutils td, table.docutils th {
border-bottom: 1px solid #aaa;
}

table.footnote td, table.footnote th {
border: 0 !important;
}

th {
text-align: left;
padding-right: 5px;
Expand Down Expand Up @@ -614,20 +606,26 @@ ol.simple p,
ul.simple p {
margin-bottom: 0;
}

dl.footnote > dt,
dl.citation > dt {
aside.footnote > span,
div.citation > span {
float: left;
margin-right: 0.5em;
}

dl.footnote > dd,
dl.citation > dd {
aside.footnote > span:last-of-type,
div.citation > span:last-of-type {
padding-right: 0.5em;
}
aside.footnote > p {
margin-left: 2em;
}
div.citation > p {
margin-left: 4em;
}
aside.footnote > p:last-of-type,
div.citation > p:last-of-type {
margin-bottom: 0em;
}

dl.footnote > dd:after,
dl.citation > dd:after {
aside.footnote > p:last-of-type:after,
div.citation > p:last-of-type:after {
content: "";
clear: both;
}
Expand All @@ -644,10 +642,6 @@ dl.field-list > dt {
padding-right: 5px;
}

dl.field-list > dt:after {
content: ":";
}

dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
Expand Down Expand Up @@ -757,6 +751,7 @@ span.pre {
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
white-space: nowrap;
}

div[class*="highlight-"] {
Expand Down

0 comments on commit dbf6536

Please sign in to comment.