Skip to content

Commit 95809b7

Browse files
authored
πŸ”’ Upgrade CircleCI image, Sphinx & jQuery (#236)
* πŸ‘· Upgrade Circle image to cimg/python:3.7 * πŸ‘· Move from `/` to `/home/circleci` * πŸ‘· Require graphviz-dev * πŸ‘· Add sudo to aptitude commands * πŸ‘· Move `.ssh` and `GITMESSAGE.txt` from `/root/` to `/home/circleci` * πŸ”₯ Remove jQuery v1.7.2 (allow π“‚€ Sphinx to choose jQuery version)
1 parent 993b5ed commit 95809b7

File tree

2 files changed

+33
-9435
lines changed

2 files changed

+33
-9435
lines changed

β€Ž.circleci/config.ymlβ€Ž

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ commands:
1313
- run:
1414
name: ↑ Installing build dependencies
1515
command: |
16-
apt-get update && apt-get -y install git python-dev graphviz libgraphviz-dev pkg-config python3-sphinx
16+
sudo apt-get update && sudo apt-get -y install git python3-dev graphviz graphviz-dev libgraphviz-dev pkg-config python3-sphinx
1717
pip install --user -r https://raw.githubusercontent.com/FCP-INDI/C-PAC/<< parameters.version >>/requirements.txt
1818
pip install --user git+https://github.com/${CIRCLE_PROJECT_USERNAME}/C-PAC.git@<< parameters.version >> sphinx m2r numpydoc PyGithub sphinxcontrib-fulltoc sphinxcontrib-programoutput semver torch
19-
git clone https://github.com/${CIRCLE_PROJECT_USERNAME}/C-PAC.git /build/C-PAC
20-
cd /build/C-PAC
19+
git clone https://github.com/${CIRCLE_PROJECT_USERNAME}/C-PAC.git /home/circleci/build/C-PAC
20+
cd /home/circleci/build/C-PAC
2121
git checkout << parameters.version >>
22-
cd /build
22+
cd /home/circleci/build
2323
python -m venv ~/simple
2424
source ~/simple/bin/activate
2525
pip install cpac
@@ -46,7 +46,7 @@ commands:
4646
steps:
4747
- run:
4848
name: ↑ Installing deploy dependencies
49-
command: apt-get update && apt-get -y install git rsync
49+
command: sudo apt-get update && sudo apt-get -y install git rsync
5050
- run:
5151
name: πŸ”§ Configuring git user
5252
command: |
@@ -55,12 +55,12 @@ commands:
5555
- run:
5656
name: πŸ”€ Combining new docs with existing docs
5757
command: |
58-
cd /build
58+
cd /home/circleci/build
5959
git clone --single-branch --branch master [email protected]:${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git /tmp/repo || git clone --single-branch --branch master [email protected]:${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git /tmp/repo
6060
rsync -rtv ./ /tmp/repo/ --exclude '.git'
6161
- run:
6262
name: πŸ“‘ Generating list of versions
63-
command: python /build/scripts/version_list.py /tmp/repo/docs
63+
command: python /home/circleci/build/scripts/version_list.py /tmp/repo/docs
6464
deploy:
6565
steps:
6666
- run:
@@ -77,33 +77,34 @@ commands:
7777
git rm -fr C-PAC || rm -fr C-PAC || true
7878
git rm -fr cpac || rm -fr cpac || true
7979
git rm -fr scripts/__pycache__ || rm -fr scripts/__pycache__ || true
80-
git commit -m "$(cat /root/GITMESSAGE.txt)" --allow-empty
80+
git commit -m "$(cat /home/circleci/GITMESSAGE.txt)" --allow-empty
8181
git push origin HEAD:master -f
8282
cd -
8383
store-commit-message:
8484
steps:
8585
- run:
8686
name: πŸ“‘ Storing commit message
87-
command: git log origin/source -1 --oneline --pretty=%s > /root/GITMESSAGE.txt
87+
command: git log origin/source -1 --oneline --pretty=%s > /home/circleci/GITMESSAGE.txt
8888
persist-new-build:
8989
steps:
9090
- persist_to_workspace:
91-
root: /
92-
paths:
91+
root: /home/circleci/
92+
paths:
9393
- build/404.html
9494
- build/docs
9595
- build/index.html
9696
- build/scripts
97-
- root/.ssh
98-
- root/GITMESSAGE.txt
99-
97+
- .ssh
98+
- GITMESSAGE.txt
99+
100100
jobs:
101101
build-nightly:
102-
working_directory: /build
102+
working_directory: /home/circleci/build
103103
docker:
104-
- image: python:3.7
104+
- image: cimg/python:3.7
105105
steps:
106-
- checkout
106+
- checkout:
107+
path: /home/circleci/build
107108
- install-build-dependencies:
108109
version: develop
109110
- run-cpac-commands
@@ -112,13 +113,14 @@ jobs:
112113
command: ./bin/build nightly
113114
- store-commit-message
114115
- persist-new-build
115-
116+
116117
build-version:
117-
working_directory: /build
118+
working_directory: /home/circleci/build
118119
docker:
119-
- image: python:3.7
120+
- image: cimg/python:3.7
120121
steps:
121-
- checkout
122+
- checkout:
123+
path: /home/circleci/build
122124
- get-version
123125
- install-build-dependencies:
124126
version: ${BUILD_VERSION}
@@ -128,24 +130,24 @@ jobs:
128130
command: ./bin/build ${BUILD_VERSION}
129131
- store-commit-message
130132
- persist-new-build
131-
133+
132134
deploy-nightly:
133-
working_directory: /
135+
working_directory: /home/circleci/
134136
docker:
135-
- image: python:3.7
137+
- image: cimg/python:3.7
136138
steps:
137139
- attach_workspace:
138-
at: /
140+
at: /home/circleci/
139141
- prep-deploy
140142
- deploy
141-
143+
142144
deploy-version:
143-
working_directory: /
145+
working_directory: /home/circleci/
144146
docker:
145-
- image: python:3.7
147+
- image: cimg/python:3.7
146148
steps:
147149
- attach_workspace:
148-
at: /
150+
at: /home/circleci/
149151
- get-version
150152
- prep-deploy
151153
- run:
@@ -155,7 +157,7 @@ jobs:
155157
python scripts/link_to_set_version.py ${BUILD_VERSION}
156158
- run:
157159
name: πŸ”– Checking if latest
158-
command: if $(python /build/scripts/is_latest.py /tmp/repo/docs); then cp -r /build/docs/${BUILD_VERSION} /build/docs/latest; fi
160+
command: if $(python /home/circleci/build/scripts/is_latest.py /tmp/repo/docs); then cp -r /home/circleci/build/docs/${BUILD_VERSION} /home/circleci/build/docs/latest; fi
159161
- deploy
160162

161163
workflows:
@@ -185,4 +187,4 @@ workflows:
185187
branches:
186188
ignore: /.*/
187189
requires:
188-
- build-version
190+
- build-version

0 commit comments

Comments
Β (0)