Skip to content

Commit

Permalink
Make Ruby rundoc tutorial (more) dynamic and add .NET (#63)
Browse files Browse the repository at this point in the history
* Update Rundoc version

* Simplify ruby RUNDOC.md

* Re-write Ruby docs to be dynamic

* Rename main markdown file

* Use 5006 for port

Same port as `heroku local`

* Update rundoc filename

* Update README now that Fir is announced

* Add a explanation to the docs folder

Includes information on how to build the docs.

* Add links to tutorials from README

* Re-order arguments

It's prettier

* Update to make slightly more dynamic

We still can't extract the article into it's own section, but this makes some progress.

* Remove "ruby" from shared docs

* Update rundoc version

* Add dotnet

* Ignore ruby getting started guide instead of deleting

* Update CI to add dotnet
  • Loading branch information
schneems authored Dec 17, 2024
1 parent ec79d38 commit 46ed97a
Show file tree
Hide file tree
Showing 55 changed files with 4,296 additions and 524 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/rundoc-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
jobs:
test-rundoc:
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: .rundoc-workspace/Gemfile
strategy:
matrix:
lang: ["ruby", "dotnet", "nodejs", "python", "php", "go", "java_maven", "java_gradle", "scala"]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -15,9 +21,11 @@ jobs:
with:
ruby-version: "3.3"
bundler-cache: true # do run 'bundle install' and cache
working-directory: .rundoc-workspace
- uses: buildpacks/github-actions/[email protected]

# [CONFIG] add different languages set up here
- run: bundle exec rundoc ../docs/src/ruby/ruby_tutorial.md --on-success-dir ../docs/ruby --on-failure-dir ../docs/fail --force
working-directory: .rundoc-workspace
- run: |
bundle exec rundoc docs/src/${{ matrix.lang }}/RUNDOC.md \
--on-success-dir docs/${{ matrix.lang }} \
--on-failure-dir docs/fail/${{ matrix.lang }} \
--force
20 changes: 12 additions & 8 deletions .github/workflows/rundoc-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
jobs:
run-rundoc:
runs-on: pub-hk-ubuntu-24.04-ip
env:
BUNDLE_GEMFILE: .rundoc-workspace/Gemfile
strategy:
matrix:
lang: ["ruby", "dotnet", "nodejs", "python", "php", "go", "java_maven", "java_gradle", "scala"]
fail-fast: false
steps:
- name: Get token for GH application (Linguist)
uses: actions/create-github-app-token@v1
Expand All @@ -25,23 +31,21 @@ jobs:
with:
ruby-version: "3.3"
bundler-cache: true # do run 'bundle install' and cache
working-directory: .rundoc-workspace
- uses: buildpacks/github-actions/[email protected]

# [CONFIG] add different languages set up here
- run: bundle exec rundoc ../docs/src/ruby/ruby_tutorial.md --on-success-dir ../docs/ruby --on-failure-dir ../docs/fail --force
working-directory: .rundoc-workspace
- run: |
bundle exec rundoc docs/src/${{ matrix.lang }}/RUNDOC.md \
--on-success-dir docs/${{ matrix.lang }} \
--on-failure-dir docs/fail/${{ matrix.lang }} \
--force
continue-on-error: true
- run: rm -rf ruby-getting-started
working-directory: docs/ruby
continue-on-error: true

- name: Create Pull Request
id: pr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
branch: rundoc-update
branch: rundoc-update-${{ matrix.lang }}
delete-branch: true
base: main
commit-message: Update tutorials
Expand Down
22 changes: 11 additions & 11 deletions .rundoc-workspace/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GEM
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
aws-eventstream (1.3.0)
aws-partitions (1.1014.0)
aws-partitions (1.1022.0)
aws-sdk-core (3.214.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
Expand All @@ -13,7 +13,7 @@ GEM
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.174.0)
aws-sdk-s3 (1.176.1)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand All @@ -29,22 +29,22 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
dotenv (3.1.4)
dotenv (3.1.6)
jmespath (1.6.2)
logger (1.6.1)
logger (1.6.3)
matrix (0.4.2)
mini_mime (1.1.5)
nokogiri (1.16.7-aarch64-linux)
nokogiri (1.17.2-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm-linux)
nokogiri (1.17.2-arm-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
nokogiri (1.17.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86-linux)
nokogiri (1.17.2-x86-linux)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
nokogiri (1.17.2-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
nokogiri (1.17.2-x86_64-linux)
racc (~> 1.4)
parslet (2.0.0)
public_suffix (6.0.1)
Expand All @@ -55,7 +55,7 @@ GEM
regexp_parser (2.9.3)
rexml (3.3.9)
rubyzip (2.3.2)
rundoc (4.0.0)
rundoc (4.1.1)
aws-sdk-s3 (~> 1)
base64 (~> 0)
capybara (~> 3)
Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@
<img alt="Heroku Cloud Native Buildpacks Logo" src="./logo.png" width="100%">
</p>

Create a production-ready container image for your application with a [single command](TUTORIAL.md); no Dockerfile required. [Try Heroku Cloud Native Buildpacks today](TUTORIAL.md).
Create a production-ready container image for your application with a single command; no Dockerfile required. Try Heroku Cloud Native Buildpacks today with one of the local language-specific tutorials:

- [.NET](docs/dotnet/README.md)
- [Go](docs/go/README.md)
- [Java (Gradle)](docs/java_gradle/README.md)
- [Java (Maven)](docs/java_maven/README.md)
- [Node.JS](docs/nodejs/README.md)
- [PHP](docs/php/README.md)
- [Python](docs/python/README.md)
- [Ruby](docs/ruby/README.md)
- [Scala](docs/scala/README.md)

> [!IMPORTANT]
> The Heroku Cloud Native Buildpacks program is an open-source preview, and is
not currently available for use on the Heroku platform. If you are looking for
information or help with Heroku Cedar Buildpacks on the Heroku platform, you
may find more information [here](https://devcenter.heroku.com/articles/buildpacks).
> The Heroku Cloud Native Buildpacks are available for use on [Heroku Fir](https://devcenter.heroku.com/articles/generations#fir) generation. If you are looking for
> information or help with Heroku Cedar generation [Classic Buildpacks](https://devcenter.heroku.com/articles/buildpacks#classic-buildpacks) on the Heroku platform, you
> may find more information [on the Dev Center](https://devcenter.heroku.com/articles/buildpacks).
## What is a Cloud Native Buildpack?

Expand All @@ -19,7 +28,7 @@ Cloud Native Buildpacks (CNBs) are an [open specification for building and runni

### Philosophy

Heroku CNBs are written with the app developer in mind. We want it to be as easy and simple as possible to transform an app into an OCI image. While a Dockerfile is procedural, CNBs are declarative. Give us your application, and we'll give you an image that can run it. Don't believe us? [Try it out today](TUTORIAL.md).
Heroku CNBs are written with the app developer in mind. We want it to be as easy and simple as possible to transform an app into an OCI image. While a Dockerfile is procedural, CNBs are declarative. Give us your application, and we'll give you an image that can run it. Don't believe us? [Try it out today](docs/README.md).

We believe:
- Building OCI images shouldn't be a pain.
Expand Down Expand Up @@ -59,7 +68,7 @@ To run our buildpack locally, we will use `pack`, a tool maintained by the Cloud
### Create the app image

> [!NOTE]
> For a full hands-on getting started experience [follow our getting started tutorial](TUTORIAL.md).
> For a full hands-on getting started experience [follow our getting started tutorials](docs/README.md).
First, we need an application to produce an image. We will use [Heroku's getting started app for Node.js](https://github.com/heroku/node-js-getting-started), but any other app that uses a supported ecosystem will work. Clone the application:

Expand All @@ -73,7 +82,7 @@ In your application directory, run the `pack build` command. No additional steps
$ pack build my-app-image --builder heroku/builder:24 --path node-js-getting-started
```

Once the image is built, you can run it with the tools you're already comfortable with, like the `docker` CLI, for a demonstration of how [read out getting started tutorial](TUTORIAL.md).
Once the image is built, you can run it with the tools you're already comfortable with, like the `docker` CLI, for a demonstration of how [read out getting started tutorials](docs/README.md).

## Discussions

Expand Down
Loading

0 comments on commit 46ed97a

Please sign in to comment.