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

Add 8 language tutorials #63

Merged
merged 44 commits into from
Dec 17, 2024
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
6778869
Update Rundoc version
schneems Dec 13, 2024
c43bf2e
Simplify ruby RUNDOC.md
schneems Dec 13, 2024
fad664e
Re-write Ruby docs to be dynamic
schneems Dec 13, 2024
a0328bf
Rename main markdown file
schneems Dec 13, 2024
561b857
Use 5006 for port
schneems Dec 13, 2024
f540d2d
Update rundoc filename
schneems Dec 13, 2024
a871cd3
Update README now that Fir is announced
schneems Dec 13, 2024
136dc75
Add a explanation to the docs folder
schneems Dec 13, 2024
0970469
Add links to tutorials from README
schneems Dec 13, 2024
38cfb84
Re-order arguments
schneems Dec 13, 2024
fbbdde7
Update to make slightly more dynamic
schneems Dec 13, 2024
fc91c1e
Remove "ruby" from shared docs
schneems Dec 13, 2024
c79a505
Update rundoc version
schneems Dec 13, 2024
6329639
Add dotnet
schneems Dec 13, 2024
35c420f
Ignore ruby getting started guide instead of deleting
schneems Dec 13, 2024
e86aec6
Update CI to add dotnet
schneems Dec 13, 2024
b2da642
Add cleanup to insert a .gitignore automatically
schneems Dec 14, 2024
8343852
Node.js initial rundoc
schneems Dec 14, 2024
9da7bae
Node.js Run
schneems Dec 14, 2024
588e052
Python setup
schneems Dec 14, 2024
f9903b2
Python first run
schneems Dec 14, 2024
2be6c48
PHP setup
schneems Dec 14, 2024
1ae0f7c
PHP first run
schneems Dec 14, 2024
34340ac
Setup go
schneems Dec 14, 2024
ba6db15
Go output
schneems Dec 14, 2024
a719dc6
Setup java maven
schneems Dec 15, 2024
2784939
Java output
schneems Dec 15, 2024
a67929f
Setup Java
schneems Dec 15, 2024
c686f84
Java gradle output
schneems Dec 15, 2024
e0bcdb4
Setup Scala
schneems Dec 15, 2024
462095f
Scala results
schneems Dec 15, 2024
6ca4e21
Add links to all languages
schneems Dec 17, 2024
ef82ffa
Replace tutorial page with docs/README.md symlink
schneems Dec 17, 2024
7760a67
Pluralize "tutorial"
schneems Dec 17, 2024
a2fe148
Fix accidentally hidden ERB
schneems Dec 17, 2024
a00ee80
Put ERB in an ERB block
schneems Dec 17, 2024
b00f759
Apply ERB fixes to languages
schneems Dec 17, 2024
6f32550
Reduce java_maven `pack build` output
schneems Dec 17, 2024
9e46c82
Update screenshots
schneems Dec 17, 2024
4c6148f
Update Ruby
schneems Dec 17, 2024
f5db920
Fix links
schneems Dec 17, 2024
61eded7
Use regular document for TUTORIAL.md
schneems Dec 17, 2024
2acf714
Show hidden files when calling `ls`
schneems Dec 17, 2024
8a16984
Only show `web` from the Procfile
schneems Dec 17, 2024
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
14 changes: 11 additions & 3 deletions .github/workflows/rundoc-ci.yml
Original file line number Diff line number Diff line change
@@ -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:
@@ -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/setup-pack@v5.8.3

# [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
@@ -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
@@ -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/setup-pack@v5.8.3

# [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
22 changes: 11 additions & 11 deletions .rundoc-workspace/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
@@ -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)
@@ -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)
@@ -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)
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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?

@@ -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.
@@ -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:

@@ -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

Loading
Loading