Skip to content

Commit 8f6bf76

Browse files
authored
chore(stencil): stencil for gcr -> ecr (#12)
* chore(stencil): stencil for gcr -> ecr * linter * remove release channel for stencil modules * skip docker build * add missing docker file * fix docker build issues
1 parent 71b429a commit 8f6bf76

24 files changed

+2396
-2178
lines changed

.circleci/config.yml

Lines changed: 68 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,54 @@
22
# syntax, such as anchors, will be fixed automatically.
33
version: 2.1
44
orbs:
5-
shared: getoutreach/[email protected]
5+
shared: getoutreach/[email protected]
6+
queue: eddiewebb/[email protected]
7+
## <<Stencil::Block(CircleCIExtraOrbs)>>
8+
9+
## <</Stencil::Block>>
10+
11+
parameters:
12+
rebuild_cache:
13+
type: boolean
14+
default: false
15+
## <<Stencil::Block(CircleCIExtraParams)>>
16+
17+
## <</Stencil::Block>>
618

719
# Extra contexts to expose to all jobs below
820
contexts: &contexts
921
- aws-credentials
1022
- ghaccesstoken
1123
- docker-registry
1224
- npm-credentials
13-
- prismacloud-credentials
14-
- opslevel-credentials
25+
- box
1526
- vault-dev
1627
- confluence
28+
- circleci-credentials
29+
- tray-webhooks
30+
- wizcli
1731
## <<Stencil::Block(extraContexts)>>
1832

1933
## <</Stencil::Block>>
2034

35+
# Test configs to pass to test and cache jobs
36+
test: &test
37+
context: *contexts
38+
app_name: csv
39+
### Start parameters inserted by other modules
40+
### End parameters inserted by other modules
41+
## <<Stencil::Block(circleTestExtra)>>
42+
43+
## <</Stencil::Block>>
44+
2145
# Branches used for releasing code, pre-release or not
2246
release_branches: &release_branches
2347
- "main"
2448

49+
## <<Stencil::Block(circleAnchorExtra)>>
50+
51+
## <</Stencil::Block>>
52+
2553
jobs:
2654
{}
2755
## <<Stencil::Block(circleJobs)>>
@@ -40,7 +68,27 @@ workflows:
4068
### Start workflows inserted by other modules
4169
### End workflows inserted by other modules
4270

71+
rebuild-cache:
72+
triggers:
73+
- schedule:
74+
# Every day at 00:00 UTC.
75+
cron: "0 0 * * *"
76+
filters:
77+
branches:
78+
only:
79+
- main
80+
jobs:
81+
- shared/save_cache: *test
82+
83+
manual-rebuild-cache:
84+
when: << pipeline.parameters.rebuild_cache >>
85+
jobs:
86+
- shared/save_cache: *test
87+
4388
release:
89+
when:
90+
and:
91+
- not: << pipeline.parameters.rebuild_cache >>
4492
jobs:
4593
## <<Stencil::Block(circleWorkflowJobs)>>
4694

@@ -60,45 +108,37 @@ workflows:
60108
- shared/test
61109
filters:
62110
branches:
63-
only: *release_branches
64-
65-
# Dryrun release for PRs.
66-
- shared/release:
67-
<<: *release
111+
only: main
112+
# Dryrun for PRs
113+
- shared/pre-release: &pre-release
68114
dryrun: true
115+
context: *contexts
116+
## <<Stencil::Block(circlePreReleaseDryRunExtra)>>
117+
118+
## <</Stencil::Block>>
119+
requires:
120+
## <<Stencil::Block(circlePreReleaseDryRunRequires)>>
121+
122+
## <</Stencil::Block>>
123+
- shared/test
69124
filters:
70125
branches:
71126
ignore: *release_branches
72127
- shared/test:
73-
context: *contexts
74-
app_name: csv
75-
### Start parameters inserted by other modules
76-
### End parameters inserted by other modules
77-
## <<Stencil::Block(circleTestExtra)>>
128+
<<: *test
129+
## <<Stencil::Block(circleSharedTestExtra)>>
78130

79131
## <</Stencil::Block>>
80-
81132
- shared/publish_docs:
82133
context: *contexts
83134
filters:
84135
branches:
85-
ignore: /.*/
136+
only:
137+
- main
86138
tags:
87-
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
88-
- shared/finalize-coverage:
89-
context: *contexts
90-
requires:
91-
- shared/e2e
92-
- shared/test
139+
only: /v\d+(\.\d+)*(-.*)*/
93140
- shared/e2e:
94141
context: *contexts
95142
## <<Stencil::Block(circleE2EExtra)>>
96143

97144
## <</Stencil::Block>>
98-
- shared/docker:
99-
context: *contexts
100-
filters:
101-
branches:
102-
ignore: *release_branches
103-
tags:
104-
only: /v\d+(\.\d+)*(-.*)*/

.github/dependabot.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ updates:
88
# stencil-golang managed dependencies
99
ignore:
1010
- dependency-name: github.com/getoutreach/gobox
11+
- dependency-name: github.com/getoutreach/stencil-golang/pkg
1112
- dependency-name: github.com/getoutreach/mint
12-
- dependency-name: github.com/getoutreach/httpx
1313
- dependency-name: github.com/getoutreach/services
1414
- dependency-name: github.com/getoutreach/datastores/v2
15+
- dependency-name: github.com/getoutreach/httpx
1516

1617
# Ignore semantic-release, this code is only executed in CI.
1718
- package-ecosystem: "npm"

.github/pull_request_template.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<!--
22
!!!! README !!!! Please fill this out.
33
4-
Please follow the PR naming conventions:
5-
https://outreach-io.atlassian.net/wiki/spaces/EN/pages/1902444645/Conventional+Commits
4+
Please follow conventional commit naming conventions:
5+
6+
https://www.conventionalcommits.org/en/v1.0.0/#summary
67
-->
78

9+
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for additional information on contributing to this repository!
810

911
<!-- A short description of what your PR does and what it solves. -->
1012
## What this PR does / why we need it
1113

1214

13-
1415
<!-- <<Stencil::Block(jiraPrefix)>> -->
1516
## Jira ID
1617

@@ -20,8 +21,6 @@
2021
<!-- Notes that may be helpful for anyone reviewing this PR -->
2122
## Notes for your reviewers
2223

23-
24-
2524
<!-- <<Stencil::Block(custom)>> -->
2625

2726
<!-- <</Stencil::Block>> -->

.github/workflows/pull_request-shared-actions.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Pull Request Shared Actions
2-
on: pull_request
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened, edited] # Add edited to the default list for title changes event
35

46
jobs:
57
conventional_commit:

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ TAGS
1414
*.sublime-project
1515
*.sublime-workspace
1616
.\#*
17+
.dir-locals.el
1718

1819
# Test binary, build with "go test -c"
1920
*.test
@@ -60,6 +61,12 @@ Pulumi.*.yaml
6061
# Documentation output
6162
/apidocs
6263

64+
# Terraform lock files
65+
.terraform.lock.hcl
66+
67+
### Start ignores inserted by other modules
68+
### End ignores inserted by other modules
69+
6370
## <<Stencil::Block(extras)>>
6471

6572
## <</Stencil::Block>>

.tool-versions

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# This file contains tool versions for use with asdf
2-
golang 1.19
3-
nodejs 16.13.0
4-
terraform 0.13.5
5-
ruby 2.7.5
2+
# Note: Versions in this block override the default versions below.
3+
# Be EXTREMELY CAREFUL with this. If you override a standard version
4+
# you are reducing compatibility guarantees.
5+
## <<Stencil::Block(toolverOverride)>>
6+
## <</Stencil::Block>>
67
protoc 21.5
7-
# Note: Versions in this block override the above. Be EXTREMELY
8-
# CAREFUL with this. If you override a standard version you are
9-
# reducing compatibility guarantees.
8+
nodejs 20.16.0
9+
terraform 1.5.7
10+
golang 1.23.4
11+
# Note: Versions in this block do not override the default versions above
12+
# but sometimes you have to declare additional versions of the same tool
13+
# while leaving the 'default' version intact for the infra.
14+
# The most common case is nodejs.
1015
## <<Stencil::Block(toolver)>>
1116
## <</Stencil::Block>>

.vscode/extensions.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"esbenp.prettier-vscode",
55
"hashicorp.terraform",
66
"golang.go",
7-
"heptio.jsonnet",
8-
"xrc-inc.jsonnet-formatter",
7+
"Grafana.vscode-jsonnet",
98
"timonwong.shellcheck",
109
"zxh404.vscode-proto3",
1110
"redhat.vscode-yaml",
1211
"ms-azuretools.vscode-docker",
13-
"foxundermoon.shell-format"
12+
"foxundermoon.shell-format",
13+
"WizCloud.wizcli-vscode"
1414

1515
// Please consider contributing back all recommended
1616
// extensions to stencil!

.vscode/launch.json

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,41 @@
2424
"host": "127.0.0.1",
2525
"port": 42097,
2626
// <</Stencil::Block>>
27+
// Paths to replace when running the debugger. "from" is the host
28+
// path and "to" is the path in the devspace.
2729
"substitutePath": [
2830
{
31+
// Maps the workspace root (the repository directory) to the path that
32+
// is compiled into the built binary. Note: This is not impacted by trimpath
33+
// because devbase currently uses dlv to compile the source code.
34+
// See: https://github.com/getoutreach/devbase/blob/main/shell/debug.sh#L72
2935
"from": "${workspaceRoot}",
3036
"to": "/home/dev/app"
3137
},
38+
// Maps the go module cache on the host to the persistent volume used by devspaces.
39+
// These should be the respective values of `go env GOMODCACHE`.
3240
{
33-
"from": "${env:HOME}/.asdf/installs/golang/1.19/packages/pkg/mod",
34-
"to": "/tmp/cache/go/mod/"
41+
"from": "${env:HOME}/.asdf/installs/golang/1.23.4/packages/pkg/mod",
42+
"to": "/home/dev/.asdf/installs/golang/1.23.4/packages/pkg/mod"
3543
},
3644
{
37-
"from": "${env:HOME}/.asdf/installs/golang/1.19/go/src",
38-
"to": "/home/dev/.asdf/installs/golang/1.19/go/src"
45+
// Maps the standard library location on the host to the location in the devspace.
46+
// This enables debugging standard library code.
47+
"from": "${env:HOME}/.asdf/installs/golang/1.23.4/go/src",
48+
"to": "/home/dev/.asdf/installs/golang/1.23.4/go/src"
3949
}
4050
]
51+
},
52+
{
53+
"name": "Attach to dev container (in binary mode)",
54+
"type": "go",
55+
"debugAdapter": "dlv-dap",
56+
"request": "attach",
57+
"mode": "remote",
58+
// <<Stencil::Block(vscodeRemoteDebugDevspaceBinary)>>
59+
"host": "127.0.0.1",
60+
"port": 42097
61+
// <</Stencil::Block>>
4162
}
4263
// <<Stencil::Block(vscodeLaunchConfigs)>>
4364

.vscode/private.env

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
MY_NAMESPACE="csv--bento1a"
2-
OUTREACH_ACCOUNTS_BASE_URL="https://accounts.outreach-dev.com"
3-
OUTREACH_DOMAIN="outreach-dev.com"
42
// <<Stencil::Block(vscodeEnvVars)>>
53

64
// <</Stencil::Block>>

.vscode/settings.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@
1010
"go.useLanguageServer": true,
1111
"go.testEnvFile": "${workspaceFolder}/.vscode/private.env",
1212
"go.alternateTools": {
13-
// This makes sure we use the correct version
14-
// of golangci-lint in our editors.
15-
"golangci-lint": "${workspaceFolder}/.bootstrap/shell/golangci-lint.sh"
13+
"golangci-lint": "${workspaceFolder}/.bootstrap/shell/vscode/golang-linters.sh"
1614
},
15+
// This is disabled because it causes version mismatches between the
16+
// tools used/installed by asdf / stencil, and the ones updated by VSCode.
17+
// In particular, this is a problem with newer versions of golangci-lint
18+
// incompatible with older versions of Go.
19+
"go.toolsManagement.autoUpdate": false,
1720
"go.buildTags": "or_dev",
1821
"go.testTags": "or_test,or_int,or_e2e",
22+
"files.trimTrailingWhitespace": true,
1923
// This prevents 99% of issues with linters :)
2024
"editor.formatOnSave": true,
2125
"shellcheck.customArgs": ["-P", "SCRIPTDIR", "-x"],

0 commit comments

Comments
 (0)