Skip to content

Commit 4222976

Browse files
Merge branch 'coder:main' into feat/coder-login-secret
2 parents 87a924d + c933c75 commit 4222976

22 files changed

+1181
-330
lines changed

.github/workflows/release.yaml

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# GitHub release workflow.
22
name: Release
33
on:
4-
push:
5-
tags:
6-
- "v*"
74
workflow_dispatch:
85
inputs:
6+
release_channel:
7+
type: choice
8+
description: Release channel
9+
options:
10+
- mainline
11+
- stable
12+
release_notes:
13+
description: Release notes for the publishing the release. This is required to create a release.
914
dry_run:
1015
description: Perform a dry-run release (devel). Note that ref must be an annotated tag when run without dry-run.
1116
type: boolean
@@ -28,6 +33,8 @@ env:
2833
# https://github.blog/changelog/2022-06-10-github-actions-inputs-unified-across-manual-and-reusable-workflows/
2934
CODER_RELEASE: ${{ !inputs.dry_run }}
3035
CODER_DRY_RUN: ${{ inputs.dry_run }}
36+
CODER_RELEASE_CHANNEL: ${{ inputs.release_channel }}
37+
CODER_RELEASE_NOTES: ${{ inputs.release_notes }}
3138

3239
jobs:
3340
release:
@@ -62,21 +69,45 @@ jobs:
6269
echo "CODER_FORCE_VERSION=$version" >> $GITHUB_ENV
6370
echo "$version"
6471
65-
- name: Create release notes
66-
env:
67-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
# We always have to set this since there might be commits on
69-
# main that didn't have a PR.
70-
CODER_IGNORE_MISSING_COMMIT_METADATA: "1"
72+
# Verify that all expectations for a release are met.
73+
- name: Verify release input
74+
if: ${{ !inputs.dry_run }}
75+
run: |
76+
set -euo pipefail
77+
78+
if [[ "${GITHUB_REF}" != "refs/tags/v"* ]]; then
79+
echo "Ref must be a semver tag when creating a release, did you use scripts/release.sh?"
80+
exit 1
81+
fi
82+
83+
# 2.10.2 -> release/2.10
84+
version="$(./scripts/version.sh)"
85+
release_branch=release/${version%.*}
86+
branch_contains_tag=$(git branch --remotes --contains "${GITHUB_REF}" --list "*/${release_branch}" --format='%(refname)')
87+
if [[ -z "${branch_contains_tag}" ]]; then
88+
echo "Ref tag must exist in a branch named ${release_branch} when creating a release, did you use scripts/release.sh?"
89+
exit 1
90+
fi
91+
92+
if [[ -z "${CODER_RELEASE_NOTES}" ]]; then
93+
echo "Release notes are required to create a release, did you use scripts/release.sh?"
94+
exit 1
95+
fi
96+
97+
echo "Release inputs verified:"
98+
echo
99+
echo "- Ref: ${GITHUB_REF}"
100+
echo "- Version: ${version}"
101+
echo "- Release channel: ${CODER_RELEASE_CHANNEL}"
102+
echo "- Release branch: ${release_branch}"
103+
echo "- Release notes: true"
104+
105+
- name: Create release notes file
71106
run: |
72107
set -euo pipefail
73-
ref=HEAD
74-
old_version="$(git describe --abbrev=0 "$ref^1")"
75-
version="v$(./scripts/version.sh)"
76108
77-
# Generate notes.
78109
release_notes_file="$(mktemp -t release_notes.XXXXXX)"
79-
./scripts/release/generate_release_notes.sh --check-for-changelog --old-version "$old_version" --new-version "$version" --ref "$ref" >> "$release_notes_file"
110+
echo "$CODER_RELEASE_NOTES" > "$release_notes_file"
80111
echo CODER_RELEASE_NOTES_FILE="$release_notes_file" >> $GITHUB_ENV
81112
82113
- name: Show release notes
@@ -265,6 +296,9 @@ jobs:
265296
set -euo pipefail
266297
267298
publish_args=()
299+
if [[ $CODER_RELEASE_CHANNEL == "stable" ]]; then
300+
publish_args+=(--stable)
301+
fi
268302
if [[ $CODER_DRY_RUN == *t* ]]; then
269303
publish_args+=(--dry-run)
270304
fi

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,9 @@ We are always working on new integrations. Feel free to open an issue to request
116116

117117
- [**Provision Coder with Terraform**](https://github.com/ElliotG/coder-oss-tf): Provision Coder on Google GKE, Azure AKS, AWS EKS, DigitalOcean DOKS, IBMCloud K8s, OVHCloud K8s, and Scaleway K8s Kapsule with Terraform
118118
- [**Coder Template GitHub Action**](https://github.com/marketplace/actions/update-coder-template): A GitHub Action that updates Coder templates
119+
120+
## Contributing
121+
122+
We are always happy to see new contributors to Coder. If you are new to the Coder codebase, we have
123+
[a guide on how to get started](https://coder.com/docs/v2/latest/CONTRIBUTING). We'd love to see your
124+
contributions!

docs/contributing/frontend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ example below:
152152
export const getAgentListeningPorts = async (
153153
agentID: string,
154154
): Promise<TypesGen.ListeningPortsResponse> => {
155-
const response = await axios.get(
155+
const response = await axiosInstance.get(
156156
`/api/v2/workspaceagents/${agentID}/listening-ports`,
157157
);
158158
return response.data;

docs/install/kubernetes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ locally in order to log in and manage templates.
132132
helm install coder coder-v2/coder \
133133
--namespace coder \
134134
--values values.yaml \
135-
--version 2.10.0
135+
--version 2.10.2
136136
```
137137

138138
For the **stable** Coder release:
@@ -141,7 +141,7 @@ locally in order to log in and manage templates.
141141
helm install coder coder-v2/coder \
142142
--namespace coder \
143143
--values values.yaml \
144-
--version 2.9.1
144+
--version 2.9.4
145145
```
146146

147147
You can watch Coder start up by running `kubectl get pods -n coder`. Once

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ require (
128128
github.com/go-ping/ping v1.1.0
129129
github.com/go-playground/validator/v10 v10.19.0
130130
github.com/gofrs/flock v0.8.1
131-
github.com/gohugoio/hugo v0.125.2
131+
github.com/gohugoio/hugo v0.125.3
132132
github.com/golang-jwt/jwt/v4 v4.5.0
133133
github.com/golang-migrate/migrate/v4 v4.17.0
134134
github.com/google/go-cmp v0.6.0
@@ -218,6 +218,7 @@ require (
218218
github.com/benbjohnson/clock v1.3.5
219219
github.com/coder/serpent v0.7.0
220220
github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47
221+
github.com/google/go-github/v61 v61.0.0
221222
)
222223

223224
require (

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
411411
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
412412
github.com/gohugoio/go-i18n/v2 v2.1.3-0.20230805085216-e63c13218d0e h1:QArsSubW7eDh8APMXkByjQWvuljwPGAGQpJEFn0F0wY=
413413
github.com/gohugoio/go-i18n/v2 v2.1.3-0.20230805085216-e63c13218d0e/go.mod h1:3Ltoo9Banwq0gOtcOwxuHG6omk+AwsQPADyw2vQYOJQ=
414-
github.com/gohugoio/hugo v0.125.2 h1:hwuoROViXxuFH6EdmooBH4mIfPi8tfJJt/IxotArMLM=
415-
github.com/gohugoio/hugo v0.125.2/go.mod h1:gNl67fhGCJSKN+lDnivkzaT8z4oRNLYNKxwYIMA2vpY=
414+
github.com/gohugoio/hugo v0.125.3 h1:94q41c1EpMI+qTEYTSNqC6+O4Tfw/IkaTBYApt3niZ4=
415+
github.com/gohugoio/hugo v0.125.3/go.mod h1:gNl67fhGCJSKN+lDnivkzaT8z4oRNLYNKxwYIMA2vpY=
416416
github.com/gohugoio/hugo-goldmark-extensions/passthrough v0.2.0 h1:PCtO5l++psZf48yen2LxQ3JiOXxaRC6v0594NeHvGZg=
417417
github.com/gohugoio/hugo-goldmark-extensions/passthrough v0.2.0/go.mod h1:g9CCh+Ci2IMbPUrVJuXbBTrA+rIIx5+hDQ4EXYaQDoM=
418418
github.com/gohugoio/locales v0.14.0 h1:Q0gpsZwfv7ATHMbcTNepFd59H7GoykzWJIxi113XGDc=
@@ -469,6 +469,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
469469
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
470470
github.com/google/go-github/v43 v43.0.1-0.20220414155304-00e42332e405 h1:DdHws/YnnPrSywrjNYu2lEHqYHWp/LnEx56w59esd54=
471471
github.com/google/go-github/v43 v43.0.1-0.20220414155304-00e42332e405/go.mod h1:4RgUDSnsxP19d65zJWqvqJ/poJxBCvmna50eXmIvoR8=
472+
github.com/google/go-github/v61 v61.0.0 h1:VwQCBwhyE9JclCI+22/7mLB1PuU9eowCXKY5pNlu1go=
473+
github.com/google/go-github/v61 v61.0.0/go.mod h1:0WR+KmsWX75G2EbpyGsGmradjo3IiciuI4BmdVCobQY=
472474
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
473475
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
474476
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=

0 commit comments

Comments
 (0)