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

Support GitHub Enterprise for Kiln Release Notes Cmd #505

Merged
merged 16 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/create-debugging-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
env:
RELEEN_GITHUB_TOKEN: ${{ secrets.RELEEN_GITHUB_TOKEN }}
run: |
export GITHUB_TOKEN="${RELEEN_GITHUB_TOKEN}"
export GITHUB_ACCESS_TOKEN="${RELEEN_GITHUB_TOKEN}"
go test ./...

- name: Acceptance Tests
Expand All @@ -49,7 +49,7 @@ jobs:
RELEEN_GITHUB_TOKEN: ${{ secrets.RELEEN_GITHUB_TOKEN }}
run: |
set -euo pipefail
export GITHUB_TOKEN="${RELEEN_GITHUB_TOKEN}"
export GITHUB_ACCESS_TOKEN="${RELEEN_GITHUB_TOKEN}"

set -x
go test --run '(using_kiln|baking_a_tile|generating_release_notes|updating_)' \
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
env:
RELEEN_GITHUB_TOKEN: ${{ secrets.RELEEN_GITHUB_TOKEN }}
run: |
export GITHUB_TOKEN="${RELEEN_GITHUB_TOKEN}"
export GITHUB_ACCESS_TOKEN="${RELEEN_GITHUB_TOKEN}"
go test --covermode=atomic --coverprofile=kiln-${{github.sha}}-unit-test-code-coverage.out ./...

- name: Archive Unit Test Code Coverage Output
Expand All @@ -52,7 +52,7 @@ jobs:
RELEEN_GITHUB_TOKEN: ${{ secrets.RELEEN_GITHUB_TOKEN }}
run: |
set -euo pipefail
export GITHUB_TOKEN="${RELEEN_GITHUB_TOKEN}"
export GITHUB_ACCESS_TOKEN="${RELEEN_GITHUB_TOKEN}"

set -x
go test -v --timeout 24h --tags acceptance github.com/pivotal-cf/kiln/internal/acceptance/workflows
Expand All @@ -79,4 +79,5 @@ jobs:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
RELEEN_GITHUB_TOKEN: ${{ secrets.RELEEN_GITHUB_TOKEN }}
run: |
set -euo pipefail
export GITHUB_TOKEN="${RELEEN_GITHUB_TOKEN}"
export GITHUB_ACCESS_TOKEN="${RELEEN_GITHUB_TOKEN}"

set -x
go test -v --timeout 15m --tags acceptance github.com/pivotal-cf/kiln/internal/acceptance/workflows
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ brews:
tap:
owner: pivotal-cf
name: kiln
token: "{{ .Env.GITHUB_TOKEN }}"
token: "{{ .Env.GITHUB_ACCESS_TOKEN }}"
folder: HomebrewFormula
ids:
- homebrew
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ stemcell_criteria:
- type: github
id: optional-unique-name-defaults-to-github-org-name
org: the-github-org
endpoint: $(variable "github_host")
github_token: $(variable "github_token")
```

Expand Down
6 changes: 3 additions & 3 deletions TILE_AUTHOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ release_sources:
- type: "github"
id: crhntr # (optional) the default ID in this case is the value of org
org: "crhntr"
github_token: $(variable "github_token")
github_token: $(variable "github_access_token")
```

**`github_token` is always required even for public repositories because we make API requests**
Expand All @@ -371,10 +371,10 @@ You will need to add the following flag to most commands:

```
# Optional helper
export GITHUB_TOKEN="$(gh auth status --show-token 2>&1 | grep 'Token:' | awk '{print $NF}')"
export GITHUB_ACCESS_TOKEN="$(gh auth status --show-token 2>&1 | grep 'Token:' | awk '{print $NF}')"
# Example Kiln variable flag
kiln fetch --variable="github_token=${GITHUB_TOKEN}"
kiln fetch --variable="github_access_token=${GITHUB_ACCESS_TOKEN}"
```

The value of `remote_path` in the BOSH release tarball lock is a URL.
Expand Down
29 changes: 15 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/pivotal-cf/kiln

go 1.22.6
go 1.23

toolchain go1.23.2

require (
github.com/Masterminds/semver/v3 v3.2.1
Expand All @@ -17,26 +19,25 @@ require (
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/go-git/go-billy/v5 v5.5.0
github.com/go-git/go-git/v5 v5.11.0
github.com/google/go-github/v40 v40.0.0
github.com/google/go-github/v50 v50.2.0
github.com/julienschmidt/httprouter v1.3.0
github.com/masterminds/sprig v2.22.0+incompatible
github.com/maxbrunsfeld/counterfeiter/v6 v6.5.0
github.com/maxbrunsfeld/counterfeiter/v6 v6.10.0
github.com/migueleliasweb/go-github-mock v0.0.16
github.com/moby/buildkit v0.12.5
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.27.10
github.com/onsi/gomega v1.34.2
github.com/opencontainers/image-spec v1.1.0
github.com/pivotal-cf-experimental/gomegamatchers v0.0.0-20180326192815-e36bfcc98c3a
github.com/pivotal-cf/go-pivnet/v7 v7.0.2
github.com/pivotal-cf/jhanda v0.0.0-20200619200912-8de8eb943a43
github.com/pivotal-cf/om v0.0.0-20230707145702-e2ef8fd451b1
github.com/snabb/httpreaderat v1.0.1
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.21.0
golang.org/x/crypto v0.28.0
golang.org/x/oauth2 v0.16.0
golang.org/x/sync v0.6.0
golang.org/x/term v0.18.0
golang.org/x/sync v0.8.0
golang.org/x/term v0.25.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
)
Expand Down Expand Up @@ -69,7 +70,7 @@ require (
github.com/fatih/color v1.15.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
Expand Down Expand Up @@ -119,17 +120,17 @@ require (
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.18.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/tools v0.26.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect
google.golang.org/grpc v1.62.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
Expand Down
Loading
Loading