Skip to content

Commit

Permalink
fix(stencil): upgrade modules (2023-08-07) (#20)
Browse files Browse the repository at this point in the history
* fix(stencil): upgrade modules (2023-08-07)

* cleanup service.yaml, disable docker and e2e step

---------

Co-authored-by: getoutreach-ci-1[bot] <95656460+getoutreach-ci-1[bot]@users.noreply.github.com>
Co-authored-by: Jared Allard <jaredallard@users.noreply.github.com>
  • Loading branch information
getoutreach-ci-1[bot] and jaredallard committed Aug 7, 2023
1 parent bcd9027 commit 422abd1
Show file tree
Hide file tree
Showing 19 changed files with 1,852 additions and 1,777 deletions.
62 changes: 41 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
# syntax, such as anchors, will be fixed automatically.
version: 2.1
orbs:
shared: getoutreach/shared@2.5.1
shared: getoutreach/shared@2.17.0
queue: eddiewebb/queue@1.8.4

parameters:
rebuild_cache:
type: boolean
default: false

# Extra contexts to expose to all jobs below
contexts: &contexts
Expand All @@ -11,14 +17,24 @@ contexts: &contexts
- docker-registry
- npm-credentials
- prismacloud-credentials
- opslevel-credentials
- vault-dev
- confluence
- circleci-credentials
- tray-webhooks
## <<Stencil::Block(extraContexts)>>

## <</Stencil::Block>>

# Test configs to pass to test and cache jobs
test: &test
context: *contexts
app_name: logfmt
### Start parameters inserted by other modules
### End parameters inserted by other modules
## <<Stencil::Block(circleTestExtra)>>

## <</Stencil::Block>>

# Branches used for releasing code, pre-release or not
release_branches: &release_branches # Release branch
- release
Expand All @@ -43,7 +59,26 @@ workflows:
### Start workflows inserted by other modules
### End workflows inserted by other modules

rebuild-cache:
triggers:
- schedule:
# Every day at 00:00 UTC.
cron: "0 0 * * *"
filters:
branches:
only:
- main
jobs:
- shared/save_cache: *test

manual-rebuild-cache:
when: << pipeline.parameters.rebuild_cache >>
jobs:
- shared/save_cache: *test

release:
when:
not: << pipeline.parameters.rebuild_cache >>
jobs:
## <<Stencil::Block(circleWorkflowJobs)>>

Expand Down Expand Up @@ -73,30 +108,15 @@ workflows:
branches:
ignore: *release_branches
- shared/test:
context: *contexts
app_name: logfmt
### Start parameters inserted by other modules
### End parameters inserted by other modules
## <<Stencil::Block(circleTestExtra)>>
<<: *test
## <<Stencil::Block(circleSharedTestExtra)>>

## <</Stencil::Block>>

- shared/publish_docs:
context: *contexts
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
- shared/e2e:
context: *contexts
## <<Stencil::Block(circleE2EExtra)>>

## <</Stencil::Block>>
- shared/docker:
context: *contexts
filters:
branches:
ignore: *release_branches
only:
- main
tags:
only: /v\d+(\.\d+)*(-.*)*/
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ updates:
ignore:
- dependency-name: github.com/getoutreach/gobox
- dependency-name: github.com/urfave/cli/v2
- dependency-name: github.com/getoutreach/mint
- dependency-name: github.com/getoutreach/httpx
- dependency-name: github.com/getoutreach/services
- dependency-name: github.com/getoutreach/datastores/v2
- dependency-name: github.com/getoutreach/mint
- dependency-name: github.com/getoutreach/httpx

# Ignore semantic-release, this code is only executed in CI.
- package-ecosystem: "npm"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pull_request-shared-actions.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Pull Request Shared Actions
on: pull_request
on:
pull_request:
types: [opened, synchronize, reopened, edited] # Add edited to the default list for title changes event

jobs:
conventional_commit:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ TAGS
*.sublime-project
*.sublime-workspace
.\#*
.dir-locals.el

# Test binary, build with "go test -c"
*.test
Expand Down Expand Up @@ -60,6 +61,9 @@ Pulumi.*.yaml
# Documentation output
/apidocs

### Start ignores inserted by other modules
### End ignores inserted by other modules

## <<Stencil::Block(extras)>>

## <</Stencil::Block>>
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Documentation for this file: http://goreleaser.com
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
before:
hooks:
- make dep
Expand All @@ -18,6 +18,7 @@ builds:
- '-X "main.TeleforkAPIKey={{ .Env.TELEFORK_APIKEY }}"'
env:
- CGO_ENABLED=0

archives: []
checksum:
name_template: "checksums.txt"
Expand Down
7 changes: 3 additions & 4 deletions .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
# you are reducing compatibility guarantees.
## <<Stencil::Block(toolverOverride)>>
## <</Stencil::Block>>
golang 1.19
nodejs 16.13.0
terraform 0.13.5
ruby 2.7.5
golang 1.19.11
terraform 1.4.4
protoc 21.5
nodejs 18.14.1
# Note: Versions in this block do not override the default versions above
# but sometimes you have to declare additional versions of the same tool
# while leaving the 'default' version intact for the infra.
Expand Down
27 changes: 24 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,41 @@
"host": "127.0.0.1",
"port": 42097,
// <</Stencil::Block>>
// Paths to replace when running the debugger. "from" is the host
// path and "to" is the path in the devspace.
"substitutePath": [
{
// Maps the workspace root (the repository directory) to the path that
// is compiled into the built binary. Note: This is not impacted by trimpath
// because devbase currently uses dlv to compile the source code.
// See: https://github.com/getoutreach/devbase/blob/main/shell/debug.sh#L72
"from": "${workspaceRoot}",
"to": "/home/dev/app"
},
// Maps the go module cache on the host to the persistent volume used by devspaces.
// See the value of `go env GOMODCACHE` on the host and devspace.
{
"from": "${env:HOME}/.asdf/installs/golang/1.19/packages/pkg/mod",
"from": "${env:HOME}/.asdf/installs/golang/1.19.11/packages/pkg/mod",
"to": "/tmp/cache/go/mod/"
},
{
"from": "${env:HOME}/.asdf/installs/golang/1.19/go/src",
"to": "/home/dev/.asdf/installs/golang/1.19/go/src"
// Maps the standard library location on the host to the location in the devspace.
// This enables debugging standard library code.
"from": "${env:HOME}/.asdf/installs/golang/1.19.11/go/src",
"to": "/home/dev/.asdf/installs/golang/1.19.11/go/src"
}
]
},
{
"name": "Attach to dev container (in binary mode)",
"type": "go",
"debugAdapter": "dlv-dap",
"request": "attach",
"mode": "remote",
// <<Stencil::Block(vscodeRemoteDebugDevspaceBinary)>>
"host": "127.0.0.1",
"port": 42097
// <</Stencil::Block>>
}
// <<Stencil::Block(vscodeLaunchConfigs)>>

Expand Down
2 changes: 0 additions & 2 deletions .vscode/private.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
MY_NAMESPACE="logfmt--bento1a"
OUTREACH_ACCOUNTS_BASE_URL="https://accounts.outreach-dev.com"
OUTREACH_DOMAIN="outreach-dev.com"
// <<Stencil::Block(vscodeEnvVars)>>

// <</Stencil::Block>>
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

## Building and Testing

This project uses devbase, which exposes the following build tooling: [devbase/docs/makefile.md](https://github.com/getoutreach/devbase/blob/main/docs/makefile.md)

<!-- <<Stencil::Block(customBuildingAndTesting)>> -->

<!-- <</Stencil::Block>> -->
Expand Down
14 changes: 12 additions & 2 deletions cmd/logfmt/logfmt.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Outreach Corporation. All Rights Reserved.
// Copyright 2023 Outreach Corporation. All Rights Reserved.

// Description: This file is the entrypoint for the logfmt CLI
// command for logfmt.
Expand All @@ -10,6 +10,7 @@ import (
"context"

oapp "github.com/getoutreach/gobox/pkg/app"
"github.com/getoutreach/gobox/pkg/cfg"
gcli "github.com/getoutreach/gobox/pkg/cli"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
Expand Down Expand Up @@ -40,6 +41,7 @@ const HoneycombDataset = ""

// <</Stencil::Block>>

// main is the entrypoint for the logfmt CLI.
func main() {
ctx, cancel := context.WithCancel(context.Background())
log := logrus.New()
Expand Down Expand Up @@ -83,5 +85,13 @@ func main() {
// <</Stencil::Block>>

// Insert global flags, tracing, updating and start the application.
gcli.HookInUrfaveCLI(ctx, cancel, &app, log, HoneycombTracingKey, HoneycombDataset, TeleforkAPIKey)
gcli.Run(ctx, cancel, &app, &gcli.Config{
Logger: log,
Telemetry: gcli.TelemetryConfig{
Otel: gcli.TelemetryOtelConfig{
Dataset: HoneycombDataset,
HoneycombAPIKey: cfg.SecretData(HoneycombTracingKey),
},
},
})
}
Loading

0 comments on commit 422abd1

Please sign in to comment.