Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
Jupyter Docker Stacks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Jupyter Docker Stacks
Commits
8431b341
Commit
8431b341
authored
Jul 29, 2020
by
Peter Parente
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push images, git changes
parent
d2cb8057
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
35 deletions
+47
-35
.github/workflows/docker.yml
.github/workflows/docker.yml
+9
-5
.github/workflows/sphinx.yml
.github/workflows/sphinx.yml
+5
-3
Makefile
Makefile
+33
-27
No files found.
.github/workflows/docker.yml
View file @
8431b341
...
@@ -12,6 +12,7 @@ jobs:
...
@@ -12,6 +12,7 @@ jobs:
build
:
build
:
name
:
Build Docker Images
name
:
Build Docker Images
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
if
:
"
!contains(github.event.head_commit.message
,
'ci
skip')"
steps
:
steps
:
-
name
:
Clone Main Repo
-
name
:
Clone Main Repo
uses
:
actions/checkout@v2
uses
:
actions/checkout@v2
...
@@ -47,12 +48,15 @@ jobs:
...
@@ -47,12 +48,15 @@ jobs:
-
build
-
build
if
:
github.ref == 'refs/heads/master'
if
:
github.ref == 'refs/heads/master'
steps
:
steps
:
# TODO: need to auth with docker hub
-
name
:
Login to Docker Hub
-
name
:
Push Images
run
:
>
echo '${{secrets.DOCKERHUB_PASSWORD}}' | docker login --username
'${{secrets.DOCKERHUB_USERNAME}}'' --password-stdin
-
name
:
Push Images to DockerHub
run
:
make -C main push-all
run
:
make -C main push-all
# TODO: doesn't support working directory
-
name
:
Push Wiki to GitHub
-
name
:
Push Wiki
run
:
make -C main git-commit
uses
:
mikeal/publish-to-github-action@master
env
:
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY
:
${{github.repository}}.wiki
GITHUB_REPOSITORY
:
${{github.repository}}.wiki
LOCAL_PATH
:
../wiki
.github/workflows/sphinx.yml
View file @
8431b341
...
@@ -10,6 +10,7 @@ jobs:
...
@@ -10,6 +10,7 @@ jobs:
build
:
build
:
name
:
Build Sphinx Documentation
name
:
Build Sphinx Documentation
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
if
:
"
!contains(github.event.head_commit.message
,
'ci
skip')"
steps
:
steps
:
-
name
:
Checkout Repo
-
name
:
Checkout Repo
uses
:
actions/checkout@v2
uses
:
actions/checkout@v2
...
@@ -29,15 +30,16 @@ jobs:
...
@@ -29,15 +30,16 @@ jobs:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
needs
:
needs
:
-
build
-
build
if
:
github.ref == 'refs/heads/master'
&& !contains(github.event.head_commit.message, 'ci skip')
if
:
github.ref == 'refs/heads/master'
steps
:
steps
:
-
name
:
Extract Source Strings
-
name
:
Extract Source Strings
working-directory
:
docs
working-directory
:
docs
run
:
|
run
:
|
make gettext
make gettext
sphinx-intl update -p _build/gettext -l en
sphinx-intl update -p _build/gettext -l en
# TODO: need to ci skip to prevent looping
-
name
:
Push Strings to Master
-
name
:
Push Strings to Master
uses
:
mikeal/publish-to-github-action@master
run
:
make git-commit
env
:
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY
:
${{ github.repository }}
LOCAL_PATH
:
./docs/locale/en
Makefile
View file @
8431b341
...
@@ -4,9 +4,8 @@
...
@@ -4,9 +4,8 @@
# Use bash for inline if-statements in arch_patch target
# Use bash for inline if-statements in arch_patch target
SHELL
:=
bash
SHELL
:=
bash
OWNER
:=
jupyter
ARCH
:=
$(
shell
uname
-m
)
ARCH
:=
$(
shell
uname
-m
)
DIFF_RANGE
?=
master...HEAD
OWNER
?=
jupyter
# Need to list the images in build dependency order
# Need to list the images in build dependency order
ifeq
($(ARCH),ppc64le)
ifeq
($(ARCH),ppc64le)
...
@@ -76,9 +75,26 @@ dev/%: ## run a foreground container for a stack
...
@@ -76,9 +75,26 @@ dev/%: ## run a foreground container for a stack
dev-env
:
##
install libraries required to build docs and run tests
dev-env
:
##
install libraries required to build docs and run tests
pip
install
-r
requirements-dev.txt
pip
install
-r
requirements-dev.txt
docs
:
##
build HTML documentation
make
-C
docs html
git-commit
:
LOCAL_PATH?=.
git-commit
:
export GITHUB_SHA?=$(shell git rev-parse HEAD)
git-commit
:
GITHUB_REPOSITORY?=jupyter/docker-stacks
git-commit
:
##
commit outstading git changes and push to remote
@
git config
--global
user.name
"GitHub Actions"
@
git config
--global
user.email
"actions@users.noreply.github.com"
@
git remote add publisher https://
$
${GITHUB_TOKEN}
@github.com/
$
${GITHUB_REPOSITORY}
.git
@cd
$(LOCAL_PATH)
@git
checkout
master
@git
add
-A
--
.
@git
commit
-m
"[ci skip] Automated publish for $${GITHUB_SHA}"
||
exit
0
@git
push
-u
publisher
master
hook/%
:
export COMMIT_MSG?=$(shell git log -1 --pretty=%B)
hook/%
:
export COMMIT_MSG?=$(shell git log -1 --pretty=%B)
hook/%
:
export GITHUB_SHA?=$(shell git rev-parse HEAD)
hook/%
:
export GITHUB_SHA?=$(shell git rev-parse HEAD)
hook/%
:
export WIKI_PATH?=./wiki
hook/%
:
export WIKI_PATH?=.
.
/wiki
hook/%
:
##
run post-build hooks for an image
hook/%
:
##
run post-build hooks for an image
BUILD_TIMESTAMP
=
"
$$
(date -u +%FT%TZ)"
\
BUILD_TIMESTAMP
=
"
$$
(date -u +%FT%TZ)"
\
DOCKER_REPO
=
"
$(OWNER)
/
$(
notdir
$@
)
"
\
DOCKER_REPO
=
"
$(OWNER)
/
$(
notdir
$@
)
"
\
...
@@ -88,23 +104,6 @@ hook/%: ## run post-build hooks for an image
...
@@ -88,23 +104,6 @@ hook/%: ## run post-build hooks for an image
hook-all
:
$(foreach I
,
$(ALL_IMAGES)
,
hook/$(I) )
##
run post-build hooks for all images
hook-all
:
$(foreach I
,
$(ALL_IMAGES)
,
hook/$(I) )
##
run post-build hooks for all images
lint/%
:
ARGS?=
lint/%
:
##
lint the dockerfile(s) for a stack
@
echo
"Linting Dockerfiles in
$(
notdir
$@
)
..."
@
git ls-files
--exclude
=
'Dockerfile*'
--ignored
$(
notdir
$@
)
|
grep
-v
ppc64 | xargs
-L
1
$(HADOLINT)
$(ARGS)
@
echo
"Linting done!"
lint-all
:
$(foreach I
,
$(ALL_IMAGES)
,
lint/$(I) )
##
lint all stacks
lint-build-test-all
:
$(foreach I
,
$(ALL_IMAGES)
,
lint/$(I) arch_patch/$(I) build/$(I) test/$(I) )
##
lint
,
build and test all stacks
lint-install
:
##
install hadolint
@
echo
"Installing hadolint at
$(HADOLINT)
..."
@
curl
-sL
-o
$(HADOLINT)
"https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-
$(
shell
uname -s
)
-
$(
shell
uname -m
)
"
@
chmod
700
$(HADOLINT)
@
echo
"Installation done!"
@
$(HADOLINT)
--version
img-clean
:
img-rm-dang img-rm
##
clean dangling and jupyter images
img-clean
:
img-rm-dang img-rm
##
clean dangling and jupyter images
img-list
:
##
list jupyter images
img-list
:
##
list jupyter images
...
@@ -119,15 +118,22 @@ img-rm-dang: ## remove dangling images (tagged None)
...
@@ -119,15 +118,22 @@ img-rm-dang: ## remove dangling images (tagged None)
@
echo
"Removing dangling images ..."
@
echo
"Removing dangling images ..."
-
docker rmi
--force
$(
shell
docker images
-f
"dangling=true"
-q
)
2> /dev/null
-
docker rmi
--force
$(
shell
docker images
-f
"dangling=true"
-q
)
2> /dev/null
docs
:
##
build HTML documentation
lint/%
:
ARGS?=
make
-C
docs html
lint/%
:
##
lint the dockerfile(s) for a stack
@
echo
"Linting Dockerfiles in
$(
notdir
$@
)
..."
@
git ls-files
--exclude
=
'Dockerfile*'
--ignored
$(
notdir
$@
)
|
grep
-v
ppc64 | xargs
-L
1
$(HADOLINT)
$(ARGS)
@
echo
"Linting done!"
n-docs-diff
:
##
number of docs/ files changed since branch from master
lint-all
:
$(foreach I
,
$(ALL_IMAGES)
,
lint/$(I) )
##
lint all stacks
@
git diff
--name-only
$(DIFF_RANGE)
--
docs/
':!docs/locale'
|
wc
-l
|
awk
'{print $$1}'
lint-build-test-all
:
$(foreach I
,
$(ALL_IMAGES)
,
lint/$(I) arch_patch/$(I) build/$(I) test/$(I) )
##
lint
,
build and test all stacks
n-other-diff
:
##
number of files outside docs/ changed since branch from master
lint-install
:
##
install hadolint
@
git diff
--name-only
$(DIFF_RANGE)
--
':!docs/'
|
wc
-l
|
awk
'{print $$1}'
@
echo
"Installing hadolint at
$(HADOLINT)
..."
@
curl
-sL
-o
$(HADOLINT)
"https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-
$(
shell
uname -s
)
-
$(
shell
uname -m
)
"
@
chmod
700
$(HADOLINT)
@
echo
"Installation done!"
@
$(HADOLINT)
--version
pull/%
:
DARGS?=
pull/%
:
DARGS?=
pull/%
:
##
pull a jupyter image
pull/%
:
##
pull a jupyter image
...
@@ -151,4 +157,4 @@ test/%: ## run tests against a stack (only common tests or common tests + specif
...
@@ -151,4 +157,4 @@ test/%: ## run tests against a stack (only common tests or common tests + specif
@
if
[
!
-d
"
$(
notdir
$@
)
/test"
]
;
then
TEST_IMAGE
=
"
$(OWNER)
/
$(
notdir
$@
)
"
pytest
-m
"not info"
test
;
\
@
if
[
!
-d
"
$(
notdir
$@
)
/test"
]
;
then
TEST_IMAGE
=
"
$(OWNER)
/
$(
notdir
$@
)
"
pytest
-m
"not info"
test
;
\
else
TEST_IMAGE
=
"
$(OWNER)
/
$(
notdir
$@
)
"
pytest
-m
"not info"
test
$(
notdir
$@
)
/test
;
fi
else
TEST_IMAGE
=
"
$(OWNER)
/
$(
notdir
$@
)
"
pytest
-m
"not info"
test
$(
notdir
$@
)
/test
;
fi
test-all
:
$(foreach I
,
$(ALL_IMAGES)
,
test/$(I))
##
test all stacks
test-all
:
$(foreach I
,
$(ALL_IMAGES)
,
test/$(I))
##
test all stacks
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment