Skip to content

Commit 1f2d180

Browse files
authored
[BB-1883] Containerize connector (#35)
* [BB-1883] Containerize connector * Log a warning when no valid authentication method is detected * Refactor configuration * Update authentication method display names * Rename authentication method groups for consistency in schema configuration
1 parent 5d07a69 commit 1f2d180

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+372
-13385
lines changed

.github/workflows/capabilities.yaml renamed to .github/workflows/capabilities_and_config.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
name: Generate connector capabilities
1+
name: Generate capabilities and config schema
22

33
on:
44
push:
55
branches:
66
- main
77

88
jobs:
9-
calculate-capabilities:
9+
generate_outputs:
10+
if: github.actor != 'github-actions[bot]'
1011
runs-on: ubuntu-latest
1112

1213
steps:
@@ -18,12 +19,15 @@ jobs:
1819
- name: Setup Go
1920
uses: actions/setup-go@v5
2021
with:
21-
go-version-file: 'go.mod'
22+
go-version-file: "go.mod"
2223

2324
- name: Build
2425
run: go build -o connector ./cmd/baton-databricks
2526

26-
- name: Run and save output
27+
- name: Run and save config output
28+
run: ./connector config > config_schema.json
29+
30+
- name: Run and save capabilities output
2731
env:
2832
DATABRICKS_CLIENT_ID: ${{ secrets.DATABRICKS_CLIENT_ID }}
2933
DATABRICKS_CLIENT_SECRET: ${{ secrets.DATABRICKS_CLIENT_SECRET }}
@@ -36,5 +40,7 @@ jobs:
3640
uses: EndBug/add-and-commit@v9
3741
with:
3842
default_author: github_actions
39-
message: 'Updating baton capabilities.'
40-
add: 'baton_capabilities.json'
43+
message: "Updating baton config schema and capabilities."
44+
add: |
45+
config_schema.json
46+
baton_capabilities.json

.github/workflows/ci.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: ci
2-
on: pull_request
2+
on:
3+
pull_request:
4+
types: [opened, reopened, synchronize]
5+
push:
6+
branches:
7+
- main
8+
39
jobs:
410
go-lint:
511
runs-on: ubuntu-latest

.github/workflows/main.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
uses: ConductorOne/github-workflows/.github/workflows/release.yaml@v4
1212
with:
1313
tag: ${{ github.ref_name }}
14-
lambda: false
1514
secrets:
1615
RELENG_GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }}
1716
APPLE_SIGNING_KEY_P12: ${{ secrets.APPLE_SIGNING_KEY_P12 }}

Makefile

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,42 @@
11
GOOS = $(shell go env GOOS)
22
GOARCH = $(shell go env GOARCH)
33
BUILD_DIR = dist/${GOOS}_${GOARCH}
4+
GENERATED_CONF := pkg/config/conf.gen.go
45

56
ifeq ($(GOOS),windows)
67
OUTPUT_PATH = ${BUILD_DIR}/baton-databricks.exe
78
else
89
OUTPUT_PATH = ${BUILD_DIR}/baton-databricks
910
endif
1011

12+
# Set the build tag conditionally based on ENABLE_LAMBDA
13+
ifdef BATON_LAMBDA_SUPPORT
14+
BUILD_TAGS=-tags baton_lambda_support
15+
else
16+
BUILD_TAGS=
17+
endif
18+
1119
.PHONY: build
12-
build:
13-
go build -o ${OUTPUT_PATH} ./cmd/baton-databricks
20+
build: $(GENERATED_CONF)
21+
go build ${BUILD_TAGS} -o ${OUTPUT_PATH} ./cmd/baton-databricks
22+
23+
$(GENERATED_CONF): pkg/config/schema.go go.mod
24+
@echo "Generating $(GENERATED_CONF)..."
25+
go generate ./pkg/config
26+
27+
generate: $(GENERATED_CONF)
1428

1529
.PHONY: update-deps
1630
update-deps:
1731
go get -d -u ./...
1832
go mod tidy -v
1933
go mod vendor
2034

21-
.PHONY: add-dep
22-
add-dep:
35+
.PHONY: add-deps
36+
add-deps:
2337
go mod tidy -v
2438
go mod vendor
25-
39+
2640
.PHONY: lint
2741
lint:
28-
golangci-lint run
42+
golangci-lint run

cmd/baton-databricks/config/schema_test.go

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)