Skip to content

Commit

Permalink
Merge pull request #15 from mentimeter/focus-workspace-production
Browse files Browse the repository at this point in the history
Focus workspace production
  • Loading branch information
ostenbom authored Sep 12, 2023
2 parents d6eece1 + 2dd965b commit d2688b2
Show file tree
Hide file tree
Showing 50 changed files with 1,723 additions and 1,144 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
image: heroku/heroku:${{ matrix.stack_number }}-build
strategy:
matrix:
stack_number: ["18", "20", "22"]
stack_number: ["20", "22"]
env:
STACK: heroku-${{ matrix.stack_number }}
steps:
Expand All @@ -31,7 +31,7 @@ jobs:
image: heroku/heroku:${{ matrix.stack_number }}-build
strategy:
matrix:
stack_number: ["18", "20", "22"]
stack_number: ["20", "22"]
env:
STACK: heroku-${{ matrix.stack_number }}
steps:
Expand All @@ -56,13 +56,3 @@ jobs:
bundler-cache: true
- name: Run hatchet tests
run: make hatchet

unit-test-binary:
runs-on: ubuntu-22.04
container:
image: golang:1.14
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test Go Binary
run: make test-binary
31 changes: 31 additions & 0 deletions .github/workflows/hatchet_app_cleaner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Hatchet app cleaner

on:
schedule:
# Daily at 6am UTC.
- cron: "0 6 * * *"
# Allow the workflow to be manually triggered too.
workflow_dispatch:

permissions:
contents: read

jobs:
hatchet-app-cleaner:
runs-on: ubuntu-latest
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_API_USER: ${{ secrets.HEROKU_API_USER }}
HEROKU_DISABLE_AUTOUPDATE: 1
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Ruby and dependencies
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: "2.7"
- name: Run Hatchet destroy
# Only apps older than 10 minutes are destroyed, to ensure that any
# in progress CI runs are not interrupted.
run: bundle exec hatchet destroy --older-than 10
87 changes: 87 additions & 0 deletions .github/workflows/inventory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Update Inventory
on:
workflow_dispatch:
schedule:
- cron: '00 4 * * 1-5'

jobs:
update-nodejs-inventory:
name: Update Node.js Engine Inventory
runs-on: pub-hk-ubuntu-22.04-small
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Rust Inventory Binaries
run: cargo install heroku-nodejs-utils --bin diff_versions --bin generate_inventory --git https://github.com/heroku/buildpacks-nodejs
- id: set-diff-msg
name: Set Diff Message
run: echo "::set-output name=msg::$(diff_versions node inventory/node.toml)"
- name: Rebuild Inventory
run: "generate_inventory node > inventory/node.toml"
- name: Update Changelog
run: echo "${{ steps.set-diff-msg.outputs.msg }}" | xargs -r -I '{}' perl -i -p -e 's/## main\s+/## main\n\n{}/' CHANGELOG.md
- uses: heroku/use-app-token-action@main
id: generate-token
with:
app_id: ${{ vars.LINGUIST_GH_APP_ID }}
private_key: ${{ secrets.LINGUIST_GH_PRIVATE_KEY }}
- name: Create Pull Request
id: pr
uses: peter-evans/[email protected]
with:
token: ${{ steps.generate-token.outputs.app_token }}
title: "Update Node.js Engine Inventory"
commit-message: "Update Inventory for heroku/nodejs engine\n\n${{ steps.set-diff-msg.outputs.msg }}"
branch: update-nodejs-inventory
labels: "automation"
body: "Automated pull-request to update heroku/nodejs engine inventory:\n\n${{ steps.set-diff-msg.outputs.msg }}"
- name: Configure PR
if: steps.pr.outputs.pull-request-operation == 'created'
run: gh pr merge --squash --auto "${{ steps.pr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ steps.generate-token.outputs.app_token }}

update-yarn-inventory:
name: Update Node.js Yarn Inventory
runs-on: pub-hk-ubuntu-22.04-small
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- id: install-rust-toolchain
name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Rust Inventory Binaries
run: cargo install heroku-nodejs-utils --bin diff_versions --bin generate_inventory --git https://github.com/heroku/buildpacks-nodejs
- id: set-diff-msg
name: Set Diff Message
run: echo "::set-output name=msg::$(diff_versions yarn inventory/yarn.toml)"
- name: Rebuild Inventory
run: "generate_inventory yarn > inventory/yarn.toml"
- name: Update Changelog
run: echo "${{ steps.set-diff-msg.outputs.msg }}" | xargs -r -I '{}' perl -i -p -e 's/## main\s+/## main\n\n{}/' CHANGELOG.md
- uses: heroku/use-app-token-action@main
id: generate-token
with:
app_id: ${{ vars.LINGUIST_GH_APP_ID }}
private_key: ${{ secrets.LINGUIST_GH_PRIVATE_KEY }}
- name: Create Pull Request
id: pr
uses: peter-evans/[email protected]
with:
token: ${{ steps.generate-token.outputs.app_token }}
title: "Update Node.js Yarn Inventory"
commit-message: "Update Inventory for heroku/nodejs yarn\n\n${{ steps.set-diff-msg.outputs.msg }}"
branch: update-yarn-inventory
labels: "automation"
body: "Automated pull-request to update heroku/nodejs yarn inventory:\n\n${{ steps.set-diff-msg.outputs.msg }}"
- name: Configure PR
if: steps.pr.outputs.pull-request-operation == 'created'
run: gh pr merge --squash --auto "${{ steps.pr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ steps.generate-token.outputs.app_token }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.DS_Store
repos/*
.idea
.build
78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,84 @@

## main

## v219 (2023-08-10)

- Added Node.js version 16.20.2.
- Added Node.js version 18.17.1.
- Added Node.js version 20.5.1.

## v218 (2023-07-24)

- Added Node.js version 20.5.0.

## v217 (2023-07-19)

- Added Node.js version 18.17.0.

## v216 (2023-07-07)

- Added Node.js version 20.4.0.
- Added Yarn version 3.6.1.

## v215 (2023-06-21)

- Added Node.js version 20.3.1, 18.16.1, 16.20.1.

## v214 (2023-06-20)

- Added Yarn version 4.0.0-rc.45.
- Added Node.js version 20.3.0.

## v213 (2023-05-24)

- Added node version 20.2.0.
- Added yarn version 4.0.0-rc.44.

## v212 (2023-05-09)

- Added node version 20.1.0.
- Added yarn version 4.0.0-rc.43, 3.5.1.
- Drop all support and references to the now end-of-life heroku-18.

## v211 (2023-04-20)

- Add metrics and tests for Node.js 20.x line

## v210 (2023-04-20)

- Added node version 20.0.0.

## v209 (2023-04-17)

- Added node version 18.16.0.

## v208 (2023-04-11)

- Added node version 19.9.0.

## v207 (2023-04-03)

- Added node version 16.20.0.
- Added yarn version 4.0.0-rc.42, 4.0.0-rc.41.

## v206 (2023-03-24)

- Added node versions 19.8.0, 19.8.1
- Added yarn version 3.5.0

## v205 (2023-03-13)

- Added node version 18.15.0
- Added yarn version 4.0.0-rc.40

## v204 (2023-03-03)

- Switch to inventory-based Node.js and Yarn version resolver ([#1061](https://github.com/heroku/heroku-buildpack-nodejs/pull/1061))

## v203 (2023-02-10)

- Allow yarn version selection for yarn berry projects ([#1060](https://github.com/heroku/heroku-buildpack-nodejs/pull/1060))

## v202 (2022-11-03)

- Update go to 1.19 and recompile resolve-version ([#1050](https://github.com/heroku/heroku-buildpack-nodejs/pull/1050))
Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ GEM
specs:
diff-lcs (1.5.0)
erubis (2.7.0)
excon (0.86.0)
excon (0.99.0)
heroics (0.1.2)
erubis (~> 2.0)
excon
moneta
multi_json (>= 1.9.2)
webrick
heroku_hatchet (7.3.4)
heroku_hatchet (8.0.2)
excon (~> 0)
platform-api (~> 3)
rrrretry (~> 1)
Expand All @@ -22,25 +22,25 @@ GEM
parallel_split_test (0.10.0)
parallel (>= 0.5.13)
rspec-core (>= 3.9.0)
platform-api (3.3.0)
platform-api (3.5.0)
heroics (~> 0.1.1)
moneta (~> 1.0.0)
rate_throttle_client (~> 0.1.0)
rake (13.0.6)
rate_throttle_client (0.1.2)
rrrretry (1.0.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.1)
rspec-core (3.12.0)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (~> 3.12.0)
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.11.1)
rspec-support (3.12.0)
sem_version (2.0.1)
thor (1.1.0)
thor (1.2.1)
threaded (0.0.4)
webrick (1.7.0)
webrick (1.8.1)

PLATFORMS
ruby
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ make test
Or to just test a specific stack:

```
make heroku-18-build
make heroku-20-build
make heroku-22-build
```
Expand Down
5 changes: 0 additions & 5 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,6 @@ install_bins() {
npm_engine=$(read_json "$BUILD_DIR/package.json" ".engines.npm")
yarn_engine=$(read_json "$BUILD_DIR/package.json" ".engines.yarn")

if [[ "$YARN_2" == "true" && -n "$yarn_engine" ]]; then
warn "You don't need to specify Yarn engine. Heroku will install the latest Yarn 1.x, so that per project version can be used. More information here: https://yarnpkg.com/getting-started/install#global-install"
unset yarn_engine
fi

meta_set "node-version-request" "$node_engine"
meta_set "npm-version-request" "$npm_engine"
meta_set "yarn-version-request" "$yarn_engine"
Expand Down
4 changes: 0 additions & 4 deletions bin/report
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,8 @@ kv_pair "yarn_prune_time" "$(meta_get "yarn-prune-time")"
kv_pair "yarn_prune_memory" "$(meta_get "yarn-prune-memory")"

# testing resolve-version differences
kv_pair "resolve_v1_node" "$(meta_get "resolve-v1-node")"
kv_pair "resolve_v1_yarn" "$(meta_get "resolve-v1-yarn")"
kv_pair "resolve_v2_node" "$(meta_get "resolve-v2-node")"
kv_pair "resolve_v2_yarn" "$(meta_get "resolve-v2-yarn")"
kv_pair "resolve_is_equal_node" "$(meta_get "resolve-is-equal-node")"
kv_pair "resolve_is_equal_yarn" "$(meta_get "resolve-is-equal-yarn")"
kv_pair_string "resolve_v2_error" "$(meta_get "resolve-v2-error")"

# save which features were turned on or off
Expand Down
Loading

0 comments on commit d2688b2

Please sign in to comment.