Skip to content

(DOCSP-3904): Updated Evergreen Config. #3525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 107 additions & 45 deletions .mci.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,113 @@
pre:
- command: git.get_project
params:
directory: "docs-mongodb"
- command: git.apply_patch
params:
directory: "docs-mongodb"
- command: shell.exec
params:
working_dir: "docs-mongodb"
script: |
rm -rf ~/venv

virtualenv ~/venv
${venv}/pip install -r requirements.txt

# make the current branch always be master.
git branch -D master || true
git checkout -b master origin/master

---
buildvariants:
-
display_name: "Ubuntu 18.04"
expansions:
venv: ~/venv/bin
name: ubuntu1804
run_on:
- ubuntu1804-test
tasks:
-
name: build-docs
tasks:
- name: "build_manual"
-
commands:
- command: shell.exec
params:
working_dir: "docs-mongodb"
script: |
. ${venv}/activate
-
command: git.get_project
params:
directory: docs-mongodb
type: setup
-
command: shell.exec
params:
script: |

giza generate source
giza sphinx --builder publish --serial_sphinx
- command: shell.exec
params:
working_dir: "docs-mongodb"
script: |
. ${venv}/activate
# install_helper(name)
install_helper() {
if [ -z "$1" ]; then
echo "No helper given to install_helper"
exit 1
fi

giza env package --builder publish
giza packaging create --target push
printf '#!/bin/sh\n' > "~/venv/bin/$1"
printf '. ~/venv/bin/activate\n' >> "~/venv/bin/$1"
printf '~/venv/bin/%s $@\n' "$1" >> "~/venv/bin/$1"
chmod 755 "~/venv/bin/$1"
}

# TODO: deploy build/archive/* to s3
### Original Working Script Start ###

buildvariants:
- name: ubuntu1404-release
display_name: "Ubuntu 14.04"
run_on:
- ubuntu1404-test
expansions:
venv: "~/venv/bin"
tasks:
- name: "build_manual"
python -m pip install --user virtualenv

rm -rf ~/venv

virtualenv ~/venv
${venv}/pip install -r requirements.txt

### Original Working Script End ###

# Modified build for mut
${venv}/bin/activate

python3 -m pip install -qqq --upgrade pip || true

cd ~/venv
mkdir dev
cd dev
git clone --depth=1 https://github.com/mongodb/mut.git
cd mut && python3 -m pip install -r requirements.txt .

# install_helper mut
# install_helper mut-build
# install_helper mut-convert-redirects
# install_helper mut-images
# install_helper mut-index
# install_helper mut-intersphinx
# install_helper mut-lint
# install_helper mut-publish
# install_helper mut-redirects

PATH=$PATH:~/venv/bin

working_dir: docs-mongodb
-
command: shell.exec
params:
script: |
# remember that this script should be silent if it
# manipulates keys
mkdir ~/.config
touch ~/.config/giza-aws-authentication.conf
echo "[personal]"
echo "username=${github_author}"
echo "[authentication]" > ~/.config/giza-aws-authentication.conf
echo "accesskey=${aws_key}" >> ~/.config/giza-aws-authentication.conf
echo "secretkey=${aws_secret}" >> ~/.config/giza-aws-authentication.conf
chmod 600 ~/.config/giza-aws-authentication.conf

# as an alternative, you could pass the aws keys to the
# makefile directly if it supports that
shell: bash
silent: true
-
command: shell.exec
loggers:
task:
- type: evergreen
- type: file
params:
script: |
ls -al ~/.config
export USER=${github_author}

if [ "${is_patch}" != "true" ]; then
make publish
make deploy
else
make html
make stage
fi
shell: bash
working_dir: docs-mongodb
name: build-docs