Skip to content
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

Convert Library references from submodule to upstream #4102

Merged
merged 7 commits into from
Aug 8, 2017
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ _site/**
.sass-cache/**
CNAME
Gemfile.lock
_samples/library/**
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,3 @@
path = tests/src/gopkg.in/yaml.v2
url = https://github.com/go-yaml/yaml.git
branch = a5b47d31c556af34a302ce5d659e6fea44d90de0
[submodule "samples/library"]
path = samples/library
url = https://github.com/docker-library/docs.git
branch = master
25 changes: 0 additions & 25 deletions MIGRATION.md

This file was deleted.

4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ url: https://docs.docker.com
keep_files: ["v1.4", "v1.5", "v1.6", "v1.7", "v1.8", "v1.9", "v1.10", "v1.11", "v1.12", "v1.13", "v17.03"]
compose_current: 1.14.0

collections:
samples:
output: true

gems:
- jekyll-redirect-from
- jekyll-seo-tag
Expand Down
12 changes: 0 additions & 12 deletions _data/toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1252,28 +1252,16 @@ samples:
title: ASP.NET Core + SQL Server on Linux
- path: /engine/examples/couchdb_data_volumes/
title: CouchDB
- path: /samples/couchbase/
title: Couchbase
nosync: true
- path: /compose/django/
title: Django and PostgreSQL
- path: /samples/mongo/
nosync: true
title: MongoDB
- path: /engine/examples/postgresql_service/
title: PostgreSQL
- path: /compose/rails/
title: Rails and PostgreSQL
- path: /samples/redis/
title: Redis
nosync: true
- path: /engine/examples/running_riak_service/
title: Riak
- path: /engine/examples/running_ssh_service/
title: SSHd
- path: /samples/wordpress/
title: WordPress
nosync: true

manuals:
- sectiontitle: Docker Enterprise Edition
Expand Down
4 changes: 2 additions & 2 deletions _includes/generateTOC.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% if include.tocToGenerate=="library"%}{% for thisPage in site.pages %}{% if thisPage.url contains "/samples/" and thisPage.url != "/samples/" %}
{% if include.tocToGenerate=="library"%}{% for thisPage in site.samples %}
<li><a href="{{ thisPage.url}}"{% if page.url==thisPage.url %}{% assign topicFound="true" %} class="active currentPage"{% endif %}>{{ thisPage.title }}</a></li>
{% endif %}{% endfor %}{% endif %}
{% endfor %}{% endif %}
22 changes: 0 additions & 22 deletions _layouts/library.html

This file was deleted.

8 changes: 8 additions & 0 deletions _samples/boilerplate.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
> **Library reference**
>
> This content is imported from
> [the official Docker Library docs](https://github.com/docker-library/docs/tree/master/{{ page.repo}}/),
> and is provided by the original uploader. You can view the Docker Store page for this image at
> [https://store.docker.com/images/{{ page.repo }}](https://store.docker.com/images/{{ page.repo }})

<!-- content begin -->
44 changes: 44 additions & 0 deletions _scripts/fetch-upstream-resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,49 @@ svn co https://github.com/docker/docker-ce/"$ENGINE_SVN_BRANCH"/components/cli/d
svn co https://github.com/docker/docker-ce/"$ENGINE_SVN_BRANCH"/components/engine/docs/api md_source/engine/api || (echo "Failed engine/api download" && exit -1) # This will only get you the old API MD files 1.18 through 1.24
svn co https://github.com/docker/distribution/"$DISTRIBUTION_SVN_BRANCH"/docs/spec md_source/registry/spec || (echo "Failed registry/spec download" && exit -1)

# Get the Library docs
svn co https://github.com/docker-library/docs/trunk md_source/_samples/library || (echo "Failed library download" && exit -1)
# Remove symlinks to maintainer.md because they break jekyll and we don't use em
find md_source/_samples/library -maxdepth 9 -type l -delete
# Loop through the README.md files, turn them into rich index.md files
FILES=$(find md_source/_samples/library -type f -name 'README.md')
for f in $FILES
do
curdir=$(dirname "${f}")
justcurdir="${curdir##*/}"
if [ -e ${curdir}/README-short.txt ]
then
# shortrm=$(<${curdir}/README-short.txt)
shortrm=$(cat ${curdir}/README-short.txt)
fi
echo "Adding front-matter to ${f} ..."
echo --- >> ${curdir}/front-matter.txt
echo title: "${justcurdir}" >> ${curdir}/front-matter.txt
echo keywords: library, sample, ${justcurdir} >> ${curdir}/front-matter.txt
echo repo: "${justcurdir}" >> ${curdir}/front-matter.txt
echo layout: docs >> ${curdir}/front-matter.txt
echo permalink: /samples/library/${justcurdir}/ >> ${curdir}/front-matter.txt
echo description: \| >> ${curdir}/front-matter.txt
echo \ \ ${shortrm} >> ${curdir}/front-matter.txt
echo --- >> ${curdir}/front-matter.txt
echo >> ${curdir}/front-matter.txt
echo ${shortrm} >> ${curdir}/front-matter.txt
echo >> ${curdir}/front-matter.txt
if [ -e ${curdir}/github-repo ]
then
# gitrepo=$(<${curdir}/github-repo)
gitrepo=$(cat ${curdir}/github-repo)
echo >> ${curdir}/front-matter.txt
echo GitHub repo: \["${gitrepo}"\]\("${gitrepo}"\)\{: target="_blank"\} >> ${curdir}/front-matter.txt
echo >> ${curdir}/front-matter.txt
fi
cat ${curdir}/front-matter.txt md_source/_samples/boilerplate.txt > ${curdir}/header.txt
echo {% raw %} >> ${curdir}/header.txt
cat ${curdir}/header.txt ${curdir}/README.md > ${curdir}/index.md
echo {% endraw %} >> ${curdir}/index.md
rm -rf ${curdir}/front-matter.txt
rm -rf ${curdir}/header.txt
done

# Get the Engine APIs that are in Swagger
# Be careful with the locations on Github for these
Expand Down Expand Up @@ -47,3 +90,4 @@ wget -O md_source/registry/configuration.md https://raw.githubusercontent.com/do
rm md_source/registry/spec/api.md.tmpl
rm -rf md_source/apidocs/cloud-api-source
rm -rf md_source/tests
rm md_source/_samples/library/index.md
10 changes: 9 additions & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@ layout: null
"description":{{ page.description | jsonify }},
"keywords":{{ page.keywords | jsonify }}
}
{% endif %}{% endfor %}]}
{% endif %}{% endfor %}
{% for page in site.samples %},
{
"url":{{ page.url | jsonify }},
"title":{{ page.title | jsonify }},
"description":{{ page.description | strip | jsonify }},
"keywords":{{ page.keywords | jsonify }}
}
{% endfor %}]}
121 changes: 0 additions & 121 deletions netlify.sh

This file was deleted.

5 changes: 0 additions & 5 deletions redirect_from.csv

This file was deleted.

6 changes: 0 additions & 6 deletions samples/adminer.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/aerospike.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/alpine.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/amazonlinux.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/arangodb.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/backdrop.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/bash.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/bonita.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/buildpack-deps.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/busybox.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/cassandra.md

This file was deleted.

6 changes: 0 additions & 6 deletions samples/celery.md

This file was deleted.

Loading