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

ci: update ci workflow #1790

Merged
merged 27 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ad19591
ci: add sign and pack deb ci scripts
Apr 21, 2021
c3e6894
test: only use env var for acceptance tests
Apr 21, 2021
421e460
ci: test storing of signed gpg results to artifacts
Apr 21, 2021
919e6b7
ci: consolidate to a single workflow and release jobs
Apr 22, 2021
729f8ae
ci: fix indenting
Apr 22, 2021
1cb2503
ci: fix checkout order
Apr 22, 2021
fc23d57
ci: run yarn in pack jobs
Apr 22, 2021
fb0b3d4
ci: release depends on pack-tarballs
Apr 22, 2021
e4f3e26
ci: remove hardcoded s3 bucket, rely on env var
Apr 22, 2021
b6a9c69
ci: remove pack from tarballs release
Apr 22, 2021
9a6c347
ci: fix double nested dist dir after attaching workspace
Apr 23, 2021
24f7244
ci: try switching up the yarn cache key
fivetanley Apr 23, 2021
09123ec
ci: comment out windows tests temporarily for quicker builds
Apr 23, 2021
dd64d2f
ci: fix yarn caching
fivetanley Apr 23, 2021
6bbb309
ci: use always run filter so jobs run on tags
fivetanley Apr 23, 2021
08f1ee1
build(cli): update @oclif/dev-cli
fivetanley Apr 23, 2021
38ad1bf
ci: fix working directory before running scripts/postrelease
fivetanley Apr 23, 2021
dd30659
ci: use absolute path to dir for install_scripts
Apr 23, 2021
4b686ab
ci: use env var for s3 bucket
fivetanley Apr 23, 2021
373c8cd
ci: restore windows tests
Apr 23, 2021
535a64d
ci: use passphrase with deb signing
Apr 26, 2021
4cda809
ci: publish heroku deb public key to s3
Apr 26, 2021
30ef78b
ci: fix ci cache keys
Apr 26, 2021
23a544a
ci: set pinentry-mode on gpg import
Apr 26, 2021
e2f008f
ci: use batch instead of pinentry
Apr 26, 2021
72645fa
ci: run windows and node tests with always_run_filter
Apr 26, 2021
b934a45
ci: disable automatic cloudfront cache invalidation
Apr 27, 2021
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
320 changes: 170 additions & 150 deletions .circleci/config.yml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"uuid": "3.3.2"
},
"devDependencies": {
"@oclif/dev-cli": "^1.21.3",
"@oclif/dev-cli": "^1.23",
"@oclif/test": "^1.2.4",
"@types/ansi-styles": "^3.2.1",
"@types/chai": "^4.1.7",
Expand Down Expand Up @@ -244,7 +244,6 @@
},
"s3": {
"xz": true,
"bucket": "heroku-cli-assets",
"host": "https://cli-assets.heroku.com"
}
},
Expand Down
1 change: 0 additions & 1 deletion packages/run-v5/test/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ cli.raiseErrors = true
global.commands = require('../index').commands

global.apikey = process.env.HEROKU_API_KEY
if (!global.apikey) global.apikey = require('netrc')()['api.heroku.com'].password

process.stdout.isTTY = false
17 changes: 17 additions & 0 deletions scripts/pack/deb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env node

const execa = require('execa')
const path = require('path')

const root = path.join(__dirname, '..', '..')
const CLI_ROOT = path.join(root, 'packages', 'cli')

async function main() {
await require('../utils/_update_channel')()
await execa('./node_modules/.bin/oclif-dev', ['pack:deb'], {
cwd: CLI_ROOT,
stdio: 'inherit'
})
}

main()
6 changes: 3 additions & 3 deletions scripts/postrelease/install_scripts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -ex

if [[ ! -z "${CIRCLE_TAG}" ]]; then
echo "Pushing install scripts to s3..."
aws s3 cp --content-type text/plain --cache-control "max-age: 604800" ./install-standalone.sh s3://heroku-cli-assets/install-standalone.sh
aws s3 cp --content-type text/plain --cache-control "max-age: 604800" ./install-standalone.sh s3://heroku-cli-assets/install.sh
aws s3 cp --content-type text/plain --cache-control "max-age: 604800" ./install-ubuntu.sh s3://heroku-cli-assets/install-ubuntu.sh
aws s3 cp --content-type text/plain --cache-control "max-age: 604800" ./install-standalone.sh "s3://${HEROKU_S3_BUCKET}/install-standalone.sh"
aws s3 cp --content-type text/plain --cache-control "max-age: 604800" ./install-standalone.sh "s3://${HEROKU_S3_BUCKET}/install.sh"
aws s3 cp --content-type text/plain --cache-control "max-age: 604800" ./install-ubuntu.sh "s3://${HEROKU_S3_BUCKET}/install-ubuntu.sh"
else
echo "Not on stable release, skipping updating install scripts"
fi
3 changes: 1 addition & 2 deletions scripts/release/deb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const qq = require('qqjs')
qq.config.silent = false
qq.run(async () => {
await require('../utils/_update_channel')()
await qq.x('echo "$HEROKU_DEB_SECRET_KEY" | base64 -d | gpg --import')
await qq.x('./node_modules/.bin/oclif-dev pack:deb')
await qq.x('./node_modules/.bin/oclif-dev publish:deb')
await qq.x(`aws s3 cp --content-type text/plain --cache-control "max-age: 604800" /cli/packages/cli/dist/apt/release.key "s3://${process.env.HEROKU_S3_BUCKET}/apt/release.key"`)
})
1 change: 0 additions & 1 deletion scripts/release/tarballs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ const qq = require('qqjs')
qq.config.silent = false
qq.run(async () => {
await require('../utils/_update_channel')()
await qq.x('./node_modules/.bin/oclif-dev pack')
await qq.x('./node_modules/.bin/oclif-dev publish')
})
14 changes: 14 additions & 0 deletions scripts/sign/deb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e -o pipefail

# This will sign files after `oclif-dev pack:deb`, this script should be ran from
# the `dist/deb` folder
echo "$HEROKU_DEB_SECRET_KEY" | base64 -d 2> /dev/null | gpg --import --batch --passphrase "$HEROKU_DEB_SIGNING_PASSWORD" 2> /dev/null
gpg --digest-algo SHA512 --clearsign --batch --passphrase "$HEROKU_DEB_SIGNING_PASSWORD" -u $HEROKU_DEB_KEY_ID -o InRelease Release 2> /dev/null
gpg --digest-algo SHA512 -abs --batch --passphrase "$HEROKU_DEB_SIGNING_PASSWORD" -u $HEROKU_DEB_KEY_ID -o Release.gpg Release 2> /dev/null
echo "Signed debian packages successfully"
echo "sha256 sums:"
sha256sum *Release*

mkdir -p /build/dist/apt
echo $HEROKU_DEB_PUBLIC_KEY | base64 --decode > /build/dist/apt/release.key
88 changes: 85 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@
debug "^4.1.1"
semver "^5.6.0"

"@oclif/command@^1.5.20", "@oclif/command@^1.5.4", "@oclif/command@^1.6.0":
"@oclif/command@^1.5.20", "@oclif/command@^1.5.4", "@oclif/command@^1.6.0", "@oclif/command@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.8.0.tgz#c1a499b10d26e9d1a611190a81005589accbb339"
integrity sha512-5vwpq6kbvwkQwKqAoOU3L72GZ3Ta8RRrewKj9OJRolx28KLJJ8Dg9Rf7obRwt5jQA9bkYd8gqzMTrI7H3xLfaw==
Expand Down Expand Up @@ -1146,7 +1146,7 @@
debug "^4.1.1"
tslib "^1.9.3"

"@oclif/config@^1.15.1", "@oclif/config@^1.8.7":
"@oclif/config@^1.15.1", "@oclif/config@^1.17.0", "@oclif/config@^1.8.7":
version "1.17.0"
resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.17.0.tgz#ba8639118633102a7e481760c50054623d09fcab"
integrity sha512-Lmfuf6ubjQ4ifC/9bz1fSCHc6F6E653oyaRXxg+lgT4+bYf9bk+nqrUpAbrXyABkCqgIBiFr3J4zR/kiFdE1PA==
Expand Down Expand Up @@ -1202,6 +1202,25 @@
qqjs "^0.3.10"
tslib "^1.9.3"

"@oclif/dev-cli@^1.23":
version "1.26.0"
resolved "https://registry.npmjs.org/@oclif/dev-cli/-/dev-cli-1.26.0.tgz#e3ec294b362c010ffc8948003d3770955c7951fd"
integrity sha512-272udZP+bG4qahoAcpWcMTJKiA+V42kRMqQM7n4tgW35brYb2UP5kK+p08PpF8sgSfRTV8MoJVJG9ax5kY82PA==
dependencies:
"@oclif/command" "^1.8.0"
"@oclif/config" "^1.17.0"
"@oclif/errors" "^1.3.3"
"@oclif/plugin-help" "^3.2.0"
cli-ux "^5.2.1"
debug "^4.1.1"
find-yarn-workspace-root "^2.0.0"
fs-extra "^8.1"
github-slugger "^1.2.1"
lodash "^4.17.11"
normalize-package-data "^3.0.0"
qqjs "^0.3.10"
tslib "^2.0.3"

"@oclif/errors@1.2.2", "@oclif/errors@^1.2.1":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@oclif/errors/-/errors-1.2.2.tgz#9d8f269b15f13d70aa93316fed7bebc24688edc2"
Expand Down Expand Up @@ -1296,7 +1315,7 @@
widest-line "^2.0.1"
wrap-ansi "^4.0.0"

"@oclif/plugin-help@^3":
"@oclif/plugin-help@^3", "@oclif/plugin-help@^3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-3.2.0.tgz#b2c1112f49202ebce042f86b2e42e49908172ef1"
integrity sha512-7jxtpwVWAVbp1r46ZnTK/uF+FeZc6y4p1XcGaIUuPAp7wx6NJhIRN/iMT9UfNFX/Cz7mq+OyJz+E+i0zrik86g==
Expand Down Expand Up @@ -4558,6 +4577,13 @@ find-up@^4.0.0:
locate-path "^5.0.0"
path-exists "^4.0.0"

find-yarn-workspace-root@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd"
integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==
dependencies:
micromatch "^4.0.2"

fixture-stdout@0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/fixture-stdout/-/fixture-stdout-0.2.1.tgz#0b7966535ab87cf03f8dcbefabdac3effe195a24"
Expand Down Expand Up @@ -5315,6 +5341,13 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.7.1:
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c"
integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==

hosted-git-info@^4.0.1:
version "4.0.2"
resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz#5e425507eede4fea846b7262f0838456c4209961"
integrity sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==
dependencies:
lru-cache "^6.0.0"

http-cache-semantics@3.8.1, http-cache-semantics@^3.8.1:
version "3.8.1"
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
Expand Down Expand Up @@ -5735,6 +5768,13 @@ is-ci@^2.0.0:
dependencies:
ci-info "^2.0.0"

is-core-module@^2.2.0:
version "2.2.0"
resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a"
integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==
dependencies:
has "^1.0.3"

is-data-descriptor@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
Expand Down Expand Up @@ -6603,6 +6643,13 @@ lru-cache@^5.1.1:
dependencies:
yallist "^3.0.2"

lru-cache@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
dependencies:
yallist "^4.0.0"

macos-release@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f"
Expand Down Expand Up @@ -7213,6 +7260,16 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-
semver "2 || 3 || 4 || 5"
validate-npm-package-license "^3.0.1"

normalize-package-data@^3.0.0:
version "3.0.2"
resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz#cae5c410ae2434f9a6c1baa65d5bc3b9366c8699"
integrity sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==
dependencies:
hosted-git-info "^4.0.1"
resolve "^1.20.0"
semver "^7.3.4"
validate-npm-package-license "^3.0.1"

normalize-url@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6"
Expand Down Expand Up @@ -8571,6 +8628,14 @@ resolve@^1.11.1:
dependencies:
path-parse "^1.0.6"

resolve@^1.20.0:
version "1.20.0"
resolved "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
dependencies:
is-core-module "^2.2.0"
path-parse "^1.0.6"

resolve@^1.3.2, resolve@^1.5.0, resolve@^1.6.0, resolve@^1.8.1, resolve@~1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
Expand Down Expand Up @@ -8754,6 +8819,13 @@ semver@^7.3.2:
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==

semver@^7.3.4:
version "7.3.5"
resolved "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
dependencies:
lru-cache "^6.0.0"

semver@~5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
Expand Down Expand Up @@ -9891,6 +9963,11 @@ tslib@^2.0.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e"
integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==

tslib@^2.0.3:
version "2.2.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c"
integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==

tslint-config-prettier@*:
version "1.17.0"
resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.17.0.tgz#946ed6117f98f3659a65848279156d87628c33dc"
Expand Down Expand Up @@ -10497,6 +10574,11 @@ yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3:
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==

yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==

yargs-parser@^11.1.1:
version "11.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4"
Expand Down