-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request pyne#1086 from bam241/ci_deploy
Deploy the new version of the website
- Loading branch information
Showing
4 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
PyNE-CI Documentation | ||
===================== | ||
|
||
|
||
PyNE Circle-CI use CIrcle_CI version 2.1 and is composed of 4 main sections: | ||
`executors`, `commands`, `jobs` and `workflow`. | ||
|
||
Executors | ||
--------- | ||
The `executors` define aliases to the environment to run the different jobs. In our case these are | ||
different docker images containing different combinations of the optional | ||
dependencies of PyNE (`MOAB`, `pyMOAB`, `DAGMC`) in one of the two supported | ||
Python versions (Python 2.7 or Python 3.6). | ||
|
||
|
||
Commands | ||
--------- | ||
The `commands` section provides the definitions of macro commands with arguments to be used | ||
in the different jobs. | ||
|
||
`news_check`: checks the presence of a new news file in the news folder | ||
|
||
|
||
`save_container`: saves the status of a container to be reloaded in an | ||
other job. | ||
|
||
- `arguments`: | ||
- `build` (string): build configuration parameters, used to identify a | ||
build configuration | ||
|
||
|
||
`pull_container`: pulls a previously saved (using the `save_container` command) status of container. | ||
|
||
- `arguments`: | ||
- `build` (string): build configuration parameters (has to match the build | ||
argument used to save the container) | ||
|
||
|
||
`checkout_build`: checks out PyNE branch to be tested, builds it and saves it | ||
using the `save_container` command. | ||
|
||
- `arguments`: | ||
- `build` (string): used to identify a configuration | ||
- `flags` (string): flags to be use when building PyNE | ||
|
||
|
||
`run_test`: pulls a previous container using `pull_container` command, then runs the PyNE | ||
nosetests using the provided `flag`. | ||
|
||
- `arguments`: | ||
- `build` (string): used to identify a configuration | ||
- `flags` (string): flags to be use when running the PyNE nosetests | ||
|
||
|
||
`website_build_push`: pull the Python 2.7 build with all the PyNE optional | ||
depedencies `python2_dagmc_pymoab` saved image (using `pull_container` command), | ||
build the website, and push it to the `pyne.github.com` repo. | ||
|
||
- `arguments`: | ||
- `push_option` (string: `test` or `root`): | ||
- `test` option will push the newly built website to `website_preview` | ||
branch of the repo allowing reviews. | ||
- `root` option will push the website on the `master` branch of the repo, | ||
deploying a new version of the website in `pyne.io` | ||
|
||
|
||
Jobs | ||
---- | ||
The `jobs` section defines all the different jobs used in the different | ||
workflows. For each built configuration two jobs have been defined, one to build | ||
PyNE, and one to run the `nosetests`. In addition to the build and test | ||
jobs, two additional jobs have been created to build and push the website, one | ||
to the `website_test` branch of the `pyne.github.com` repo, and one to the | ||
`master` branch. | ||
|
||
|
||
Workflow | ||
-------- | ||
The `workflow` section defines independent workflow triggers the different | ||
jobs (with triggers). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,6 +104,30 @@ commands: | |
cd ~/repo/tests | ||
./travis-run-tests.sh << parameters.flags >> | ||
# Build and push PyNE website | ||
website_build_push: | ||
description: "build PyNE website and push it either on the test branch (default) or on the deployed branch" | ||
parameters: | ||
push_option: | ||
type: string | ||
default: "test" | ||
steps: | ||
- pull_container: | ||
build: "python2_dagmc_pymoab" | ||
- add_ssh_keys: | ||
fingerprints: | ||
- $PYNE_KEY_FINGERPRINT | ||
- run: | ||
command: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "report errors on github.com/PyNE/PyNE" | ||
- run: | ||
name: Build PyNE website | ||
command: | | ||
cd docs/ | ||
make html | ||
make push-<< parameters.push_option >> | ||
# Jobs part: | ||
# Define the different job that will be ran this separate building form | ||
# testing for each configuration allowing to get more information out of the CI | ||
|
@@ -227,6 +251,25 @@ jobs: | |
flags: "python2" | ||
build: "python2_dagmc_pymoab" | ||
|
||
# Website | ||
# Build and push the website | ||
build_push_website_test: | ||
executor: | ||
name: py2_dagmc_pymoab | ||
working_directory: ~/repo | ||
steps: | ||
- website_build_push: | ||
push_option: "test" | ||
|
||
build_push_website_deploy: | ||
executor: | ||
name: py2_dagmc_pymoab | ||
working_directory: ~/repo | ||
steps: | ||
- website_build_push: | ||
push_option: "root" | ||
|
||
|
||
# Workflow part: | ||
# This part defines the list of the jobs that will be ran and in which sequence. | ||
# The goal was to avoid running advanced configuration if PyNE does not work | ||
|
@@ -279,3 +322,26 @@ workflows: | |
- py2_dagmc_pymoab_test: | ||
requires: | ||
- py2_dagmc_pymoab_build | ||
|
||
|
||
# Build/Push test website | ||
- build_push_website_test: | ||
requires: | ||
- py2_dagmc_pymoab_test | ||
- py3_dagmc_pymoab_test | ||
filters: | ||
branches: | ||
only: | ||
- develop | ||
|
||
|
||
# only done on tags | ||
- build_push_website_deploy: | ||
requires: | ||
- py2_dagmc_pymoab_test | ||
- py3_dagmc_pymoab_test | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
**Added:** None | ||
- automatic deployement of a updated version of the website on tags | ||
- automatic creation of a new version of the website (not deployed) for | ||
verication purposes in `pyne.github.com/website_preview` | ||
|
||
**Changed:** None | ||
|
||
**Deprecated:** None | ||
|
||
**Removed:** None | ||
|
||
**Fixed:** None | ||
|
||
**Security:** None |