diff --git a/docker/python3/resolute/v1/Dockerfile b/docker/python3/resolute/v1/Dockerfile new file mode 100644 index 0000000..309a18f --- /dev/null +++ b/docker/python3/resolute/v1/Dockerfile @@ -0,0 +1,136 @@ +FROM ubuntu:resolute +LABEL maintainer="samuel.d.darwin@gmail.com" + +WORKDIR /root +RUN mkdir -p /tmp/build +COPY requirements.txt /tmp/build/requirements.txt +COPY Gemfile /tmp/build/Gemfile +COPY Gemfile.lock /tmp/build/Gemfile.lock +ARG GH_CLI_VERSION=2.93.0 +ARG RCLONE_VERSION=1.74.3 +ARG DOXYGEN_VERSION=1_14_0 + +RUN set -xe \ + && apt-get update \ + && DEBIAN_FRONTEND="noninteractive" apt-get install -y tzdata \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y locales \ + && apt-get install -y \ + apt-transport-https \ + bison \ + ca-certificates \ + clang \ + cmake \ + curl \ + default-jre-headless \ + docbook \ + docbook-xml \ + docbook-xsl \ + docutils-common \ + docutils-doc \ + dos2unix \ + flex \ + ghostscript \ + git \ + graphviz \ + jq \ + lbzip2 \ + libsaxonhe-java \ + openssh-client \ + openssl libssl-dev \ + pbzip2 \ + pigz \ + p7zip-full \ + python-is-python3 \ + python3-pip \ + python3-venv \ + rsync \ + ruby \ + ruby-dev \ + software-properties-common \ + sshpass \ + sudo \ + texlive \ + texlive-latex-extra \ + unzip \ + vim \ + wget \ + xsltproc \ + && sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ + && dpkg-reconfigure --frontend=noninteractive locales \ + && update-locale LANG=en_US.UTF-8 \ + && python3 -m venv /opt/venvboostdocs \ + && export PATH=/opt/venvboostdocs/bin:$PATH \ + && mkdir /tmp/aws_cli_install && cd /tmp/aws_cli_install && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install && cd /root && rm -rf /tmp/aws_cli_install \ + && mkdir /tmp/rclone_install && cd /tmp/rclone_install && wget https://downloads.rclone.org/v${RCLONE_VERSION}/rclone-v${RCLONE_VERSION}-linux-amd64.deb && dpkg -i rclone-v${RCLONE_VERSION}-linux-amd64.deb && cd /root && rm -rf /tmp/rclone_install \ + && curl -s -S --retry 10 -L -o gh_${GH_CLI_VERSION}_linux_amd64.deb https://github.com/cli/cli/releases/download/v${GH_CLI_VERSION}/gh_${GH_CLI_VERSION}_linux_amd64.deb \ + && dpkg -i gh_${GH_CLI_VERSION}_linux_amd64.deb \ + && echo "starting doxygen" \ + && git clone -b "Release_${DOXYGEN_VERSION}" --depth 1 https://github.com/doxygen/doxygen.git \ + && cd doxygen \ + && cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release \ + && cd build \ + && make install \ + && cd && rm -rf doxygen* \ + && echo "finished doxygen" \ + && curl -s -S --retry 10 -L -o saxonhe.zip https://sourceforge.net/projects/saxon/files/Saxon-HE/9.9/SaxonHE9-9-1-4J.zip/download \ + && unzip saxonhe.zip \ + && rm /usr/share/java/Saxon-HE.jar \ + && cp saxon9he.jar /usr/share/java/Saxon-HE.jar \ + && rm -r * \ + && mkdir -p build && cd build \ + && gem install bundler \ + && pip3 install -r /tmp/build/requirements.txt \ + && bundle install --gemfile=/tmp/build/Gemfile \ + && curl -s -S --retry 10 -L -o rapidxml.zip http://sourceforge.net/projects/rapidxml/files/latest/download \ + && unzip -n -d rapidxml rapidxml.zip \ + && curl -s -S --retry 10 -L -o docbook-xml.zip http://archive.docbook.org/xml/4.5/docbook-xml-4.5.zip \ + && unzip -n -d docbook-xml docbook-xml.zip \ + && curl -s -S --retry 10 -L -o docbook-xsl.zip https://sourceforge.net/projects/docbook/files/docbook-xsl/1.79.1/docbook-xsl-1.79.1.zip/download \ + && unzip -n -d docbook-xsl docbook-xsl.zip \ + && chmod -R 777 /opt/venvboostdocs \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean -y + +ENV PATH /opt/venvboostdocs/bin:$PATH +# Shared nvm folder: +RUN groupadd -g 151 nvm +RUN usermod -aG nvm root +RUN mkdir /opt/nvm +RUN chown -R root:nvm /opt/nvm +RUN chmod -R g+ws /opt/nvm +ENV NODE_VERSION=18.18.1 +# Previous location: ENV NVM_DIR=/root/.nvm +ENV NVM_DIR=/opt/nvm +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash +RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} +RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} +RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} +ENV PATH="${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}" +RUN node --version +RUN npm --version +RUN npm install -g gulp-cli@2.3.0 +RUN npm install -g @mermaid-js/mermaid-cli@10.5.1 +RUN mkdir -p /opt/nvm/.cache /opt/nvm/versions /opt/nvm/alias +# RUN chmod -R g+ws /opt/nvm/.cache /opt/nvm/versions /opt/nvm/alias +# Why not the whole NVM_DIR instead? +RUN chown -R root:nvm $NVM_DIR +RUN chmod -R g+ws $NVM_DIR +# For other CI jobs: +RUN groupadd -g 150 jenkins +RUN useradd jenkins -u 150 -g 150 -m -s /bin/bash +RUN echo "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/all +RUN usermod -aG nvm jenkins +RUN echo "requirements.txt contents:" +RUN pip list --format=freeze || true +RUN echo "Gemfile.lock contents:" +RUN cat /tmp/build/Gemfile.lock || true +ENV LC_ALL en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 + +# && git clone -b "Release_${DOXYGEN_VERSION}" --depth 1 https://github.com/doxygen/doxygen.git \ +# && cd doxygen \ +# && cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release \ +# && cd build \ +# && make install \ +# && cd && rm -rf doxygen* \ diff --git a/docker/python3/resolute/v1/Gemfile b/docker/python3/resolute/v1/Gemfile new file mode 100644 index 0000000..99a5d52 --- /dev/null +++ b/docker/python3/resolute/v1/Gemfile @@ -0,0 +1,7 @@ +source 'http://rubygems.org' + +gem 'asciidoctor' +gem 'asciidoctor-diagram' +gem 'asciidoctor-multipage' +gem 'rouge' +gem 'pygments.rb' diff --git a/docker/python3/resolute/v1/Gemfile.lock b/docker/python3/resolute/v1/Gemfile.lock new file mode 100644 index 0000000..c7f1ef1 --- /dev/null +++ b/docker/python3/resolute/v1/Gemfile.lock @@ -0,0 +1,38 @@ +GEM + remote: http://rubygems.org/ + specs: + asciidoctor (2.0.26) + asciidoctor-diagram (3.2.1) + asciidoctor (>= 1.5.7, < 3.x) + rexml + asciidoctor-multipage (0.0.19) + asciidoctor (>= 2.0.11, < 2.1) + pygments.rb (4.0.0) + rexml (3.4.4) + rouge (5.0.0) + strscan (~> 3.1) + strscan (3.1.8) + +PLATFORMS + ruby + x86_64-linux-gnu + +DEPENDENCIES + asciidoctor + asciidoctor-diagram + asciidoctor-multipage + pygments.rb + rouge + +CHECKSUMS + asciidoctor (2.0.26) sha256=16e3accf1fc206bbd6335848649d7fd65f31d2daa60d85af13d47a8ee4b071c1 + asciidoctor-diagram (3.2.1) sha256=e432d051f2a627f7846a22b7beb1f6c8bb392f49ee07e2cb73be2611242a6684 + asciidoctor-multipage (0.0.19) sha256=f1c0e91f9e0b4f7b1b9f64bf7e6b8fb0e653b43863a17a4800bd66bc62c458c2 + bundler (4.0.14) sha256=d09a0a965cf772266a7e49e83610be7c2f4e49e61134c42a56804bb383cc24b8 + pygments.rb (4.0.0) sha256=f48bb03a28cf5eaa56e8d3d5a49b76a978199a51bd8643cc4b32fbb7ffecee57 + rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142 + rouge (5.0.0) sha256=e2de9bba2f9cb88f8a73bca3643b560b2b398f32f91bf716f584477bc0175ebc + strscan (3.1.8) sha256=aae2db611a225559f21ffbb71765c9a4e60fd262534a9ea84f4f11c7f32f679e + +BUNDLED WITH + 4.0.14 diff --git a/docker/python3/resolute/v1/README.md b/docker/python3/resolute/v1/README.md new file mode 100644 index 0000000..7cd7a71 --- /dev/null +++ b/docker/python3/resolute/v1/README.md @@ -0,0 +1,24 @@ + +Refer to the README.md in the docker/ folder. + +Upgrade process: + +PIP + +Remove version constraints: +``` +sed -i 's/[=<>!~].*//' requirements.txt +``` + +After docker build, it will output the versions, copy them back into requirements.txt + +GEMS + +It would be possible to remove version constraints from the Gemfile +``` +sed -i -E "s/^([[:space:]]*gem '[^']+').*/\1/" Gemfile +``` + +After the docker build, adjust the file again. +However what we will try it to copy the output of Gemfile.lock back to Gemfile.lock, and leave versions unspecified in Gemfile.a +To upgrade, remove the contents from Gemfile.lock. Or run "bundle update". Need to experiment. diff --git a/docker/python3/resolute/v1/buildimage.sh b/docker/python3/resolute/v1/buildimage.sh new file mode 100755 index 0000000..c63a41b --- /dev/null +++ b/docker/python3/resolute/v1/buildimage.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# update the image name as necessary. +imagename="cppalliance/boost_superproject_build:26.04-v1" +# docker build --progress=plain -t $imagename . 2>&1 | tee /tmp/output.txt +time docker build -t $imagename . 2>&1 | tee /tmp/output2.txt diff --git a/docker/python3/resolute/v1/buildrelease.sh b/docker/python3/resolute/v1/buildrelease.sh new file mode 100755 index 0000000..a648711 --- /dev/null +++ b/docker/python3/resolute/v1/buildrelease.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Run this inside the container + +set -ex + +cd $HOME + +boostbranch=develop +if [ ! -d project ]; then + git clone https://github.com/boostorg/boost project + cd project + # "git checkout" can also checkout commits + git checkout $boostbranch + cd .. +fi + +export CIRCLECI=true +export CIRCLE_BRANCH=develop +export CIRCLE_WORKING_DIRECTORY=~/project + +wget "https://raw.githubusercontent.com/boostorg/release-tools/master/ci_boost_common.py" -P ${HOME} +wget "https://raw.githubusercontent.com/boostorg/release-tools/master/ci_boost_release.py" -P ${HOME} + +python3 ${HOME}/ci_boost_release.py checkout_post +EOL=LF python3 ${HOME}/ci_boost_release.py test_override diff --git a/docker/python3/resolute/v1/requirements.txt b/docker/python3/resolute/v1/requirements.txt new file mode 100644 index 0000000..aaf4138 --- /dev/null +++ b/docker/python3/resolute/v1/requirements.txt @@ -0,0 +1,12 @@ +Jinja2==3.1.6 +MarkupSafe==3.0.3 +Pygments==2.20.0 +Sphinx==9.1.0 +docutils==0.22.4 +future==1.0.0 +git+https://github.com/pfultz2/sphinx-boost@8ad7d424c6b613864976546d801439c34a27e3f6 +https://github.com/bfgroup/jam_pygments/archive/master.zip +myst-parser==5.1.0 +setuptools==82.0.1 +six==1.17.0 + diff --git a/docs/README.md b/docs/README.md index f2ff289..118903c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -18,6 +18,8 @@ cd ${HOME} export CIRCLECI=true export CIRCLE_BRANCH=develop export CIRCLE_WORKING_DIRECTORY=~/project +# This affects github edit page: +export CI=true git clone -b develop https://github.com/boostorg/boost project wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_common.py" -P ${HOME} wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_release.py" -P ${HOME}