Skip to content

[Outdated] Producing a gitbook out of the patterns in maturity Structured/Validated #217

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 154 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
30ffbc0
Adding pattern as outlined in gdoc. minor formatting fixes
spier Aug 15, 2020
0e49c3c
fixes InnerSource spelling
spier Aug 15, 2020
8e5b9c1
Adding missing template elements. Also linking from README to .md fil…
spier Aug 15, 2020
6a72c5e
first gitbook experiment
spier Sep 18, 2020
3cc8aa9
testing if what is specified in the config as 'readme' is shown as 'i…
spier Sep 18, 2020
f741bd9
Adding a couple more pages to get the hang of it
spier Sep 18, 2020
215d71a
trying to show the Appendix as a 'group'
spier Sep 18, 2020
6a98cc9
trying to set a gitbook description via a yaml frontmatter
spier Sep 18, 2020
f8bacd1
trying to set title via frontmatter as well
spier Sep 18, 2020
7de427e
Use a separate intro for the book (i.e. not the default README from t…
spier Sep 19, 2020
f0d399c
fix 'How to Contribute' title
spier Sep 19, 2020
12c3a50
Add missing Introduction file
spier Sep 19, 2020
47df9fc
fix indentation in the ToC for the book
spier Sep 21, 2020
d6ad3ca
Adding documentation for the book generation approach. Also rename so…
spier Sep 22, 2020
48af49f
add script to generate an overview of all 2-structured patterns. prep…
spier Sep 22, 2020
5e0a34d
explicitly adding the ToC to the book
spier Sep 22, 2020
6018906
add patlet to the automatically generated toc
spier Sep 22, 2020
477e3d2
try to import HTML file
spier Sep 22, 2020
f313940
remove HTML again (doesn't work)
spier Sep 22, 2020
5b8ec1e
experimenting with GitHub action to write the toc for the book
spier Sep 22, 2020
1a90400
need to install bundler first
spier Sep 22, 2020
377aee3
bundle install
spier Sep 23, 2020
59fbfd1
cd into book/ folder first
spier Sep 23, 2020
b73c4f7
trying to split up ruby dependency install // toc generation into 2 s…
spier Sep 23, 2020
77ee5c2
cd into folder twice?
spier Sep 23, 2020
1c28c59
Sort patterns in the ToC by name. Improve docs for the generation pro…
spier Sep 23, 2020
d8e3e21
Trying out-committing the changed ToC
spier Sep 23, 2020
c4ac506
Writing new ToC for the book
spier Sep 23, 2020
703db51
[fix] gitbook requires toc entries to be in a bulleted list, fo the T…
spier Sep 23, 2020
28ffb99
Writing new ToC for the book
spier Sep 23, 2020
3b2c8ed
Writing new ToC for the book
spier Sep 25, 2020
368cc10
add Patlet placeholder for patterns that didn't have that
spier Sep 25, 2020
1ce4136
rename link check to represent more correctly what it does
spier Sep 25, 2020
7d4c5ca
set more descriptive name for the ToC
spier Sep 25, 2020
94986b4
Writing new ToC for the book
spier Sep 25, 2020
7bfab20
add the 3-validated folder to the automatic book generation as well (…
spier Sep 25, 2020
6721b18
change root of book content to ./ rather than ./book
spier Sep 25, 2020
9011406
Writing new ToC for the book
spier Sep 25, 2020
da33ebe
trying to fix broken relative paths
spier Sep 25, 2020
7275e51
and yet again
spier Sep 25, 2020
e9ae7a5
Writing new ToC for the book
spier Sep 25, 2020
08dda8c
and again
spier Sep 25, 2020
ea84d72
one more try :)
spier Sep 25, 2020
b8ee292
Writing new ToC for the book
spier Sep 25, 2020
a03e539
keep trying :)
spier Sep 26, 2020
45c6f83
Writing new ToC for the book
spier Sep 26, 2020
19f0adf
experimenting with a static toc2.md file to find the book generation bug
spier Sep 26, 2020
500153a
experiment with paths relative to the TOC file, rather than to the gi…
spier Sep 26, 2020
0e0363d
Found it. generating new toc with gitbook root at ./
spier Sep 26, 2020
f2c2662
Writing new ToC for the book
spier Sep 26, 2020
b56b2d4
removing unused file
spier Sep 26, 2020
f975472
add a hint about the 'alpha stage' of this book release'
spier Sep 26, 2020
a5b3bbd
fixing one link
spier Sep 26, 2020
86f00b4
reword alpha hint
spier Sep 26, 2020
9bb15ff
trying to fix two broken links
spier Sep 26, 2020
2c9a31a
remove experiment with frontmatter variables for one pattern
spier Sep 26, 2020
053469f
Moving both patterns related to 'Overcome Acquisition-based Silos' 1 …
spier Sep 26, 2020
636464c
fixing a broken link
spier Sep 26, 2020
fe4ef83
add link to known pattern. provide context for 3 patterns not known. …
spier Sep 26, 2020
f28eb3f
Adding two external links to the TOC
spier Sep 27, 2020
4ceb935
Writing new ToC for the book
spier Sep 27, 2020
33d7704
add a do-not-edit notice to the toc
spier Sep 27, 2020
d1b1187
rewriting introduction. adding dedicated 'how to contribute' for the …
spier Sep 27, 2020
d3dfeae
Writing new ToC for the book
spier Sep 27, 2020
d6dd252
check if this resolves the broken link
spier Sep 27, 2020
f7b37b9
experimenting with embeddinga book cover
spier Sep 27, 2020
d94b3a7
Merge pull request #225 from spier/down-level-overcome-acquisition-ba…
lenucksi Sep 27, 2020
eeb5bba
Merge pull request #199 from spier/pattern/reluctance-to-accept-contr…
lenucksi Sep 27, 2020
ae1166e
reword contribution section
spier Sep 27, 2020
6b02f2c
first gitbook experiment
spier Sep 18, 2020
f69ab62
testing if what is specified in the config as 'readme' is shown as 'i…
spier Sep 18, 2020
953a060
Adding a couple more pages to get the hang of it
spier Sep 18, 2020
2666d98
trying to show the Appendix as a 'group'
spier Sep 18, 2020
4903192
trying to set a gitbook description via a yaml frontmatter
spier Sep 18, 2020
265c40a
trying to set title via frontmatter as well
spier Sep 18, 2020
5714f9d
Use a separate intro for the book (i.e. not the default README from t…
spier Sep 19, 2020
efdad02
fix 'How to Contribute' title
spier Sep 19, 2020
33e4438
Add missing Introduction file
spier Sep 19, 2020
5362f51
fix indentation in the ToC for the book
spier Sep 21, 2020
0e983a7
Adding documentation for the book generation approach. Also rename so…
spier Sep 22, 2020
726b781
add script to generate an overview of all 2-structured patterns. prep…
spier Sep 22, 2020
19b25c1
explicitly adding the ToC to the book
spier Sep 22, 2020
42e6ad7
add patlet to the automatically generated toc
spier Sep 22, 2020
6114726
try to import HTML file
spier Sep 22, 2020
c25c5dd
remove HTML again (doesn't work)
spier Sep 22, 2020
fa726ef
experimenting with GitHub action to write the toc for the book
spier Sep 22, 2020
d34a5bf
need to install bundler first
spier Sep 22, 2020
7a20886
bundle install
spier Sep 23, 2020
8f61309
cd into book/ folder first
spier Sep 23, 2020
e1f6926
trying to split up ruby dependency install // toc generation into 2 s…
spier Sep 23, 2020
5881a92
cd into folder twice?
spier Sep 23, 2020
cbef1bc
Sort patterns in the ToC by name. Improve docs for the generation pro…
spier Sep 23, 2020
d850b64
Trying out-committing the changed ToC
spier Sep 23, 2020
2ae8a99
Writing new ToC for the book
spier Sep 23, 2020
e7dbbd9
[fix] gitbook requires toc entries to be in a bulleted list, fo the T…
spier Sep 23, 2020
702ba6c
Writing new ToC for the book
spier Sep 23, 2020
2f4b42c
Writing new ToC for the book
spier Sep 25, 2020
1a4d7ad
add Patlet placeholder for patterns that didn't have that
spier Sep 25, 2020
033a662
rename link check to represent more correctly what it does
spier Sep 25, 2020
d813835
set more descriptive name for the ToC
spier Sep 25, 2020
123e37f
Writing new ToC for the book
spier Sep 25, 2020
24bf1a3
add the 3-validated folder to the automatic book generation as well (…
spier Sep 25, 2020
0228706
change root of book content to ./ rather than ./book
spier Sep 25, 2020
e2150ef
Writing new ToC for the book
spier Sep 25, 2020
4b60b97
trying to fix broken relative paths
spier Sep 25, 2020
0cb7f97
and yet again
spier Sep 25, 2020
5e2fe94
Writing new ToC for the book
spier Sep 25, 2020
94e6b6e
and again
spier Sep 25, 2020
ae4f54f
one more try :)
spier Sep 25, 2020
f5916e2
Writing new ToC for the book
spier Sep 25, 2020
3e699e2
keep trying :)
spier Sep 26, 2020
5dc29cb
Writing new ToC for the book
spier Sep 26, 2020
cf947e8
experimenting with a static toc2.md file to find the book generation bug
spier Sep 26, 2020
ed436b7
experiment with paths relative to the TOC file, rather than to the gi…
spier Sep 26, 2020
31471e5
Found it. generating new toc with gitbook root at ./
spier Sep 26, 2020
bc7ad3b
Writing new ToC for the book
spier Sep 26, 2020
2170247
removing unused file
spier Sep 26, 2020
de93894
add a hint about the 'alpha stage' of this book release'
spier Sep 26, 2020
f71be4d
fixing one link
spier Sep 26, 2020
bd7d3ae
reword alpha hint
spier Sep 26, 2020
2971b1d
trying to fix two broken links
spier Sep 26, 2020
ad0ede3
remove experiment with frontmatter variables for one pattern
spier Sep 26, 2020
4735728
Adding two external links to the TOC
spier Sep 27, 2020
d2690a0
Writing new ToC for the book
spier Sep 27, 2020
6dbf4fb
add a do-not-edit notice to the toc
spier Sep 27, 2020
78b76d3
rewriting introduction. adding dedicated 'how to contribute' for the …
spier Sep 27, 2020
ec89a89
Writing new ToC for the book
spier Sep 27, 2020
f0d790a
check if this resolves the broken link
spier Sep 27, 2020
d4314da
experimenting with embeddinga book cover
spier Sep 27, 2020
e8ae24e
reword contribution section
spier Sep 27, 2020
0320ec8
Merge branch 'book' of github.com:spier/InnerSourcePatterns into book
spier Sep 27, 2020
28ac286
Writing new ToC for the book
spier Sep 27, 2020
b1da81d
[bug] now correctly extracting links from Patlets
spier Oct 3, 2020
fe4f27d
Writing new ToC for the book
spier Oct 3, 2020
789f00b
Call out the 'contribute to this book' section even more
spier Oct 3, 2020
b9f7608
add sublementary files for some patterns to the toc
spier Oct 3, 2020
33530cd
Writing new ToC for the book
spier Oct 3, 2020
d4e6338
fix links
spier Oct 3, 2020
eac8c64
Merge branch 'book' of github.com:spier/InnerSourcePatterns into book
spier Oct 3, 2020
ad4f7a0
Writing new ToC for the book
spier Oct 3, 2020
2e6a1dd
improve README for book generation
spier Oct 3, 2020
f1da3bb
Merge branch 'book' of github.com:spier/InnerSourcePatterns into book
spier Oct 3, 2020
4efb69c
rename 'extras' section
spier Oct 3, 2020
933410c
Writing new ToC for the book
spier Oct 3, 2020
9d98e2b
explain licensing a bit more
spier Oct 3, 2020
4c01735
Shortening pattern titles (to make for a nicer demo).
spier Nov 12, 2020
f0ec681
Writing new ToC for the book
spier Nov 12, 2020
2ec353a
Adding two palets (for demo purposes of the book).
spier Nov 12, 2020
c1a1c54
Writing new ToC for the book
spier Nov 12, 2020
6fae4f8
trying to add the mindmap to the TOC. hopefully the image won't be re…
spier Nov 12, 2020
0865b33
Writing new ToC for the book
spier Nov 12, 2020
ce44e8f
add credits (mention pattern contributors, working group, and cover i…
spier Nov 13, 2020
248a4fc
rename book Introduction file (lowercased)
spier Nov 13, 2020
fb11a3b
[docs] improve documentation for book generation
spier Dec 5, 2020
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
5 changes: 5 additions & 0 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root : ./

structure:
readme: book/introduction.md
summary: book/toc.md
35 changes: 35 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: book-toc-generation

on:
pull_request:
push:
branches:
- "book"

jobs:
book-toc-generation:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'

- name: Install ruby dependencies
run: |
cd book/
gem install bundler
bundle install

- name: Generate ToC for the book
run: |
cd book/
ruby generate_toc.rb

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Writing new ToC for the book
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# from: https://github.com/marketplace/actions/link-checker
# link checker used is 'liche': https://github.com/raviqqe/liche

name: Link Check on README.md
name: Link Check on Patterns and README

on: [push, pull_request]
jobs:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ possible to either deploy the same service in independent environments with sepa

* [Assisted Compliance](https://github.com/InnerSourceCommons/InnerSourcePatterns/pull/74) - *Helping repo owners be compliant by writing their CONTRIBUTING.md for them as a pull request.*
* [Cross-Team Project Valuation](patterns/2-structured/crossteam-project-valuation.md) - *It's hard to sell the value of cross-team, inner sourced projects that don't provide a direct impact on company revenue. Here's a data-driven way to represent your project that both articulates its value and amplifies it.*
* [Reluctance to Receive Contributions](https://docs.google.com/document/d/13QDN-BpE_BixRFVGjao32n4Ctim0ROXAHbBWMBOijb4/edit) - *Core owner of shared asset is reluctant to take contributions due to the required maintenance that comes with them.*
* [Reluctance to Receive Contributions](patterns/1-initial/reluctance-to-accept-contributions.md) - *Core owner of shared asset is reluctant to take contributions due to the required maintenance that comes with them.*
* [What Before How or Services Documentation](https://docs.google.com/document/d/1_N1wsQeDusfIcNy-O2ZXenY3PL7ZbvkUDRZxGUuegZw/edit?usp=drive_web) - *A lack of common understanding between different management tiers creates funding barriers and increases the risk that solutions will not deliver required business outcomes.*
* [Overcome Acquisition Based Silos - Developers](patterns/2-structured/overcome-acquisition-based-silos-developer.md)
* [Overcome Acquisition Based Silos - Managers](patterns/2-structured/overcome-acquisition-based-silos-manager.md)
* [Open Source Trumps InnerSource](https://github.com/InnerSourceCommons/InnerSourcePatterns/pull/46) - *People find the InnerSource project but, after all things are considered, even if the InnerSource component meets their needs, they still go with the open source component.*
* [Start as Experiment](patterns/2-structured/start-as-experiment.md) - *An inner source initiative is considered but not started, because management is unsure about its outcome and therefore unwilling to commit to the investment.*
* [Include Product Owners](https://github.com/InnerSourceCommons/InnerSourcePatterns/pull/71) - *Key Performance Indicators (KPIs) for Product Owners are primarily product focused, and don't consider areas such as collaborative development. This results in a lower level of engagement with inner source projects.*
Expand All @@ -68,6 +66,8 @@ possible to either deploy the same service in independent environments with sepa

#### Pattern Ideas (not yet proven; brainstormed)

* [Overcome Acquisition Based Silos - Developers](patterns/1-initial/overcome-acquisition-based-silos-developer.md)
* [Overcome Acquisition Based Silos - Managers](patterns/1-initial/overcome-acquisition-based-silos-manager.md)
* [Discover Your InnerSource](patterns/1-initial/discover-your-innersource.md)
* [Junkyard Styled Inner Sourcing](patterns/1-initial/junkyard-styled-innersourcing.md)
* [Shared Code Repo Different from Build Repo](patterns/1-initial/shared-code-repo-different-from-build-repo.md) - *Deal with the overhead of having shared code in a separate repository that isn't the same as the project-specific one that is tied to production builds.*
Expand Down
1 change: 1 addition & 0 deletions book/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Gemfile.lock
7 changes: 7 additions & 0 deletions book/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem 'commonmarker'
44 changes: 44 additions & 0 deletions book/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# How to generate the InnerSource Patterns gitbook

Whenever changes to the [InnerSource Patterns][InnerSourcePatterns] GitHub repository are made, a new version of our InnerSource Patterns book is published at gitbook.com.

The files in the `./book` folder contain generator scripts and some extra content required to create our gitbook.

## Where is the book published?

The most up-to-date version of the book is available for readers/consumers at [innersourcecommons.gitbook.io/innersource-patterns/][book_production].

*NOTE:*
The final URL of the book has not been determined yet.

We also have a [Staging version][book_staging], used by the editors/producers of the book for testing purposes.

## Which patterns are published?

In the book we publish the patterns of maturity **Structured** (Level 2) or **Validated** (Level 3). For more on these maturity levels see the [Contributor Handbook](../meta/contributor-handbook.md).

## How does it work?

- `/.gitbook.yaml` - Holds basic configuration for the gitbook service. This never needs to be changed.
- `/book/toc.md` - An auto-generated table of contents (ToC) for the book i.e. a list of all pages and patterns that are part of the book. The ToC is what you see on the left-hand-side menu in gitbooks.
- `/book/generate_toc.rb` - Takes patterns of maturity **Structured** and **Validated**, extracts title and patlet, and injects this info into `/book/toc_template.md`. The output is written to `/book/toc.md`.
- `.github/workflows/book.yml` - A GitHub Action that triggers the execution of `/book/generate_toc.rb`.
- `/book/introduction.md` - The introduction to our book. This content is what the reader sees first when they open the book. The current content is based on [README.md](../README.md). We may need to modify this content even further, to address the readers of the book more specifically, rather than the readers of our GitHub repository.
- `/book/contribute-to-this-book.md` - Information about how to contribute to this book.

## Objectives of the book

These patterns are already publicly available in the [InnerSource Patterns][InnerSourcePatterns] GitHub repo. So why publish such a book at all?

We think there are a couple of good reasons to publish the InnerSource patterns as a gitbook:

* (consumers) have something that is “nicer” to read than things on GitHub
* (consumers) have stable URLs for patterns i.e. even if the files move in the folder structure in the repo, the URL of the pattern stay the same
* (consumers) export book as PDF and read on other devices
* (producers) a motivation for pattern authors (and all contributors) to level up patterns from 1-initial, as only 2-structured and 3-validated are published in the book
* (producers) a motivation for us to introduce more specific quality guidelines for level 2+3, so that we can be even more proud of the content in the book :)
* (producers) learn which patterns are most interesting for readers (e.g. through Google Analytics)

[InnerSourcePatterns]: https://github.com/InnerSourceCommons/InnerSourcePatterns
[book_production]: https://innersourcecommons.gitbook.io/innersource-patterns/
[book_staging]: https://innersourcecommons.gitbook.io/innersource-patterns-staging/v/book/
27 changes: 27 additions & 0 deletions book/contribute-to-this-book.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Contribute to this book

You want to help us make this book better? That is awesome!

The InnerSource Patterns book itself is an open source project, and welcomes any form of contribution. Nothing is too small!

If you have never made a contribution to an open source project before, know that the InnerSource Patterns community is group of friendly people and with that a safe place to try it out :)

## Before you get started

As the sources for the InnerSource Patterns and this book are kept in a repository on GitHub, you will need a user account there to make edits and suggestions to this book. If you don't have a user account at GitHub yet, head over to [github.com](https://github.com) and create one for free.

## Different ways to contribute

Here a few ways in which you can contribute:

1. fix spelling, formatting, or other glitches that you notice in this book
2. improve the content of the existing patterns
3. contribute new patterns of how you have overcome InnerSource-related challenges in your organization

For (1) and (2) above you can simply hit the **Edit on GitHub** link that you see at the top of each page in the book. This will take you straight to the respective file in our GitHub repository, where you can suggest your changes.

For (3) you need to clone the [InnerSourcePatterns](https://github.com/InnerSourceCommons/InnerSourcePatterns) repository, and add a new file with your suggested pattern. When making such larger contributions to this book please review our [CONTRIBUTING.md](../CONTRIBUTING.md) and also our [Contributor Handbook](../meta/contributor-handbook.md).

## License of Contributions

The contents of this repository are licensed under [CC-BY-SA-4.0](../LICENSE.txt). By contributing to this repository, you grant us (and everyone else for that matter) the right to use your contribution in accordance with that license.
89 changes: 89 additions & 0 deletions book/generate_toc.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
require 'rubygems'
require 'bundler/setup'
Bundler.require(:default)

require 'pp'

# Extracts the value of a specific section from a markdown file
def extract_section(file, section_title)
markdown = open(file).readlines().join
doc = CommonMarker.render_doc(markdown)

title_found = false
section_nodes = []

# once the header in question is found, extract all the text nodes from the
# subsequent paragaph
doc.walk do |node|
if node.type == :header
node.each do |subnode|
if subnode.type == :text and subnode.string_content == section_title
title_found = true
end
end
elsif node.type == :paragraph && title_found == true
node.each do |subnode|
section_nodes += extract_text(subnode)
end
break # stop the recursion once the paragraph has been processed
end
end

section_content = section_nodes.join("")
return section_content
end

# extracts the pure text content from this CommonMarker node, and its children.
# returns an array of strings
def extract_text(node)
section_nodes = []
if node.type == :softbreak
section_nodes << " "
elsif node.type == :text
section_nodes << node.string_content
else
node.each do |subnode|
section_nodes += extract_text(subnode)
end
end
return section_nodes
end


def generate_patterns_overview(patterns)
pattern_overview = Hash.new()

patterns.each do |file|
title = extract_section(file, "Title")
patlet = extract_section(file, "Patlet")
pattern_overview[title] = {
:file => file,
:patlet => patlet
}
end

pattern_overview
end


# Main block

TOC_TEMPLATE_FILE = "./toc_template.md"
TOC_FILE = "./toc.md"

## Generate list of patterns and sort them by name
patterns = Dir["../patterns/2-structured/*.md","../patterns/2-structured/project-setup/*.md", "../patterns/3-validated/*.md"]
pattern_overview = generate_patterns_overview(patterns)
pattern_overview = pattern_overview.sort.to_h

toc_snippet = pattern_overview.map{|title, values| "* [#{title}](#{values[:file]}) - #{values[:patlet]}"}
toc_snippet = toc_snippet.join("\n")

## Inject the list of patterns into the ToC template
new_toc_content = open(TOC_TEMPLATE_FILE).readlines().join()
new_toc_content = new_toc_content.gsub(/<<PATTERS_HERE>>/,toc_snippet)

## Write the new ToC to file
File.write(TOC_FILE, new_toc_content)

puts "Written new ToC for book to #{TOC_FILE}"
Binary file added book/innersource-patterns-book-cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/innersource-program-mind-map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions book/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Introduction

<img src="./innersource-patterns-book-cover.jpg" title="InnerSource Patterns">

{% hint style="info" %}
This is an early release of the InnerSource Patterns book.
You may still find broken link, spelling mistakes, or other errors in this book.
Please help us to fix them to produce the best book possible :) Learn here how to [contribute to this book](../book/contribute-to-this-book.md).
{% endhint %}

Welcome to the **InnerSource Patterns book**.

This book contains InnerSource best practices codified in a specific format to make it easy to understand, evaluate, and reuse them. We call this reuse format a **pattern**.

These patterns have been collected by the [InnerSource Commons](http://innersourcecommons.org) community over many years. The most mature of these patterns have been published in this book.

In this introduction we explain [what InnerSource is](#what-is-innersource), [what a pattern is](#what-are-innersource-patterns), and [how to use these patterns](#how-can-you-use-innersource-patterns) in your organization.

If you are using InnerSource in your company already and want to contribute your experiences to this book we would love to [welcome your contributions](../book/contribute-to-this-book.md)!

## What is InnerSource?

We define InnerSource as:

> The use of open source principles and practices for software development within the confines of a company.

InnerSource takes the lessons learned from developing open source software and applies them to the way companies develop software internally. As developers have become accustomed to working on world class open source software, there is a strong desire to bring those practices back inside the firewall and apply them to software that companies may be reluctant to release.

For companies building mostly closed source software, InnerSource can be a great tool to help break down silos, encourage internal collaboration, accelerate new engineer on-boarding, and identify opportunities to contribute software back to the open source world.

## What are InnerSource Patterns?

Patterns are a way of describing a repeatable, proven solution to a problem with a context. They follow a simple form that helps people wanting to implement the solution to understand the constraints on the problem, the forces that must be balanced and the resulting context (the situation you are left with after the solution is applied).

In inner sourcing, patterns can provide a way for the InnerSource Commons participants to concisely share information with each other, improving the practice of inner sourcing. Each of the patterns are divided into Title, Problem Statement, Context, Forces, and Solutions as their main sections.

* [`What are patterns?` Youtube videos](http://bit.ly/innersource_patterns_videos) - Watch a set of 2-5 min youtube videos explaining InnerSource Patterns
* [Pattern Discussion Webinar](https://youtu.be/i-0IVhfRVFU) - We held a webinar 2017-03-16 to live-discuss a donut pattern (go to 24:30 for the discussion). This is an illustration of the review process we follow. Also see the [June 1, 2017 O'Reilly Webinar on InnerSource Patterns](http://www.oreilly.com/pub/e/3884).
* [Pattern Template](../meta/pattern-template.md) - View a skeleton inner source pattern to get an idea on what goes into a new pattern!
* [Introduction to InnerSource Patterns (2016 Fall Summit presentation)](https://drive.google.com/open?id=0B7_9iQb93uBQbnlkdHNuUGhpTXc) - *Tim Yao and Padma Sudarsan* (PDF). Detailed pattern background and examples -- Get a detailed understanding of why and how to interact with our patterns. Also see the [Introduction to InnerSource Patterns (2017 Fall Summit)](https://drive.google.com/open?id=0B7_9iQb93uBQWmYwMFpyaGh4OFU) *Tim Yao and Bob Hanmer* (PDF).

## How can you use InnerSource Patterns?

Patterns must be used in a thoughtful manner. They cannot be blindly applied. In most cases, you will need to adapt the given solution to your own situation; but the information given in the pattern, defining the context (immovable constraints) and forces (constraints that can be changed and balanced against each other), should help you do this. Note that you will also need to determine if there are additional constraints (company context and company forces) that apply to your particular company/organization that must be added to the pattern (as a kind of filter). These additional constraints may require additional solution steps to be applied.

The pattern form is useful for describing proven patterns but it can also be used for *brainstorming solutions* where patterns are not yet established, since the form gives a structured way for thinking about a problem. You could also create a *donut pattern* (filling in the problem, context, forces and resulting context fields but leaving the solution blank) as a way of asking the InnerSource Commons community for help (to find a proven solution or to brainstorm things to try).

## How to Contribute?

Please refer to: [Contribute to this book](./contribute-to-this-book.md)

## Credits

This book is the result of many years of work from countless [Open Source Contributors](https://github.com/InnerSourceCommons/InnerSourcePatterns/graphs/contributors) from around the world. Their willingness to openly share the challenges that they faced in their companies, and how InnerSource has helped them address those challenges, make this book such a valuable resource for others on their InnerSource journey.

We want to specifically mention the InnerSource Patterns Working Group. They have nurtured the quality of the InnerSource Patterns and helped others to contribute. Lastly they also compiled a selection of available patterns into this book.

The title image of this book was created by [Sebastian Spier](https://spier.hu) and adapted from an image by [Tony Hisgett - Alhambra 6](https://www.flickr.com/photos/hisgett/29345405788/), available under [CC BY 2.0](https://creativecommons.org/licenses/by/2.0/).

**Thank you to all contributors! And happy InnerSource Day :)**

## Licensing

![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/88x31.png)

InnerSourcePatterns by [InnerSourceCommons.org](http://innersourcecommons.org) is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/) License.
Loading