Skip to content

Commit 6e8eb9b

Browse files
authored
Update to build the whole project without Bazel (#3575)
* Update to build the whole project without Bazel * Disable some Kapetanios plugins
1 parent 9c83729 commit 6e8eb9b

File tree

189 files changed

+146
-6635
lines changed

Some content is hidden

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

189 files changed

+146
-6635
lines changed

.bazelignore

-10
This file was deleted.

.bazelrc

-36
This file was deleted.

.bazelversion

-1
This file was deleted.

.github/workflows/build.yaml

+7-19
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,8 @@ jobs:
1717
- uses: actions/setup-go@v2
1818
with:
1919
go-version: '1.17.6'
20-
21-
- name: Build pipecd binary
22-
run: GOOS=linux GOARCH=amd64 go build -o ./.artifacts/pipecd ./cmd/pipecd
23-
- name: Build piped binary
24-
run: GOOS=linux GOARCH=amd64 go build -o ./.artifacts/piped ./cmd/piped
25-
- name: Build launcher binary
26-
run: GOOS=linux GOARCH=amd64 go build -o ./.artifacts/launcher ./cmd/launcher
27-
- name: Build pipectl binary
28-
run: GOOS=linux GOARCH=amd64 go build -o ./.artifacts/pipectl ./cmd/pipectl
29-
- name: Build helloworld binary
30-
run: GOOS=linux GOARCH=amd64 go build -o ./.artifacts/helloworld ./cmd/helloworld
20+
- name: Build backend modules
21+
run: make build/backend
3122

3223
frontend:
3324
name: Frontend
@@ -47,11 +38,10 @@ jobs:
4738
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
4839
restore-keys: |
4940
${{ runner.os }}-yarn-
50-
- name: Yarn install
51-
working-directory: web
52-
run: yarn install --prefer-offline
41+
- name: Update frontend dependencies
42+
run: make update/frontend-deps
5343
- name: Build web static
54-
run: make web-build
44+
run: make build/frontend
5545

5646
chart:
5747
name: Helm Chart
@@ -66,7 +56,5 @@ jobs:
6656
uses: Azure/setup-helm@v1
6757
with:
6858
version: ${{ env.HELM_VERSION }}
69-
- name: Package pipecd chart
70-
run: make package-chart CHART=pipecd
71-
- name: Package piped chart
72-
run: make package-chart CHART=piped
59+
- name: Package helm charts
60+
run: make build/chart

.github/workflows/publish.yaml

+9-27
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,9 @@ jobs:
2626
- name: Determine version
2727
run: echo "PIPECD_VERSION=$(git describe --tags --always --abbrev=7)" >> $GITHUB_ENV
2828

29-
# Building Go binaries.
30-
- name: Build pipecd binary
31-
run: make build-go GO_BUILD_COMPONENT=pipecd
32-
- name: Build piped binary
33-
run: make build-go GO_BUILD_COMPONENT=piped
34-
- name: Build launcher binary
35-
run: make build-go GO_BUILD_COMPONENT=launcher
36-
- name: Build pipectl binary
37-
run: make build-go GO_BUILD_COMPONENT=pipectl
38-
- name: Build helloworld binary
39-
run: make build-go GO_BUILD_COMPONENT=helloworld
29+
# Building backend.
30+
- name: Build backend modules
31+
run: make build/backend
4032

4133
# Building frontend.
4234
- uses: actions/setup-node@v2
@@ -52,15 +44,11 @@ jobs:
5244
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
5345
restore-keys: |
5446
${{ runner.os }}-yarn-
55-
- name: Yarn install
56-
working-directory: web
57-
run: yarn install
47+
- name: Update frontend dependencies
48+
run: make update/frontend-deps
5849
- name: Build web static
5950
run: |
60-
make web-build
61-
rm -rf .artifacts/web-static
62-
mkdir -p .artifacts/web-static
63-
cp -rf web/dist/. .artifacts/web-static
51+
make build/frontend
6452
6553
# Login to push container images.
6654
- name: Log in to the container registry
@@ -122,17 +110,11 @@ jobs:
122110
- name: Login to OCI using Helm
123111
run: |
124112
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ env.REGISTRY }} --username ${{ github.repository_owner }} --password-stdin
125-
- name: Publish pipecd chart
113+
- name: Publish helm charts
126114
run: |
127-
make package-chart CHART=pipecd
115+
make build/chart VERSION=${{ env.PIPECD_VERSION }}
128116
helm push .artifacts/pipecd-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.REGISTRY }}/pipe-cd/chart
129-
- name: Publish piped chart
130-
run: |
131-
make package-chart CHART=piped
132117
helm push .artifacts/piped-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.REGISTRY }}/pipe-cd/chart
133-
- name: Publish helloworld chart
134-
run: |
135-
make package-chart CHART=helloworld
136118
helm push .artifacts/helloworld-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.REGISTRY }}/pipe-cd/chart
137119
138120
# Notify PipeCD to trigger deployment via EventWatcher.
@@ -199,5 +181,5 @@ jobs:
199181
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ env.REGISTRY }} --username ${{ github.repository_owner }} --password-stdin
200182
- name: Publish site chart
201183
run: |
202-
make package-chart CHART=site VERSION=${{ env.PIPECD_VERSION }}
184+
make build/chart MOD=site VERSION=${{ env.PIPECD_VERSION }}
203185
helm push .artifacts/site-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.REGISTRY }}/pipe-cd/chart

.github/workflows/test.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
go-version: '1.17.6'
2020
- name: Run unit tests
21-
run: go test ./pkg/... ./cmd/...
21+
run: make test/backend
2222

2323
frontend:
2424
name: Frontend
@@ -38,8 +38,7 @@ jobs:
3838
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3939
restore-keys: |
4040
${{ runner.os }}-yarn-
41-
- name: Yarn install
42-
working-directory: web
43-
run: yarn install --prefer-offline
41+
- name: Update frontend dependencies
42+
run: make update/frontend-deps
4443
- name: Run unit tests
45-
run: make web-test
44+
run: make test/frontend

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,9 @@ pkg/app/web/.env
4949
.terraform-credentials
5050

5151
.rendered-manifests
52+
53+
# manfiests
54+
manifests/pipecd/charts
55+
manifests/piped/charts
56+
manifests/site/charts
57+
manifests/helloworld/charts

.kapetanios/plugin-coverage.yaml

-17
This file was deleted.

.kapetanios/plugin.yaml

-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,11 @@
11
version: v1
22
kind: Plugin
33
spec:
4-
# A plugin to handle approval process that includes managing
5-
# 'approved' label, checking approver permission based on code ownership.
6-
# See more: https://kapetanios.dev/docs/plugins/approve
7-
approve:
8-
enabled: true
9-
allowSelfApproval: true
10-
114
# A plugin to label the pull request size based on its changes.
125
# See more: https://kapetanios.dev/docs/plugins/size
136
size:
147
enabled: true
158

16-
# A plugin to schedule user defined builds.
17-
# See more: https://kapetanios.dev/plugins/trigger
18-
trigger:
19-
enabled: true
20-
onlyOrgMembers: true
21-
22-
# A plugin to automatically assign reviewers based on code ownership.
23-
# See more: https://kapetanios.dev/docs/plugins/reviewassigner
24-
reviewAssigner:
25-
enabled: true
26-
reviewerCount: 4
27-
maxReviewerCount: 4
28-
29-
# A plugin that provides commands to assign issue/PR or request review for PR.
30-
# See more: https://kapetanios.dev/docs/plugins/assign
31-
assign:
32-
enabled: true
33-
349
# A plugin provides commands that add or remove certain types of labels.
3510
# See more: https://kapetanios.dev/docs/plugins/label
3611
label:
@@ -47,15 +22,6 @@ spec:
4722
hold:
4823
enabled: true
4924

50-
# A plugin that enable merge automation with a safer merge logic.
51-
# See more: https://kapetanios.dev/docs/plugins/merger
52-
merger:
53-
enabled: true
54-
mergeMethod: squash
55-
preconditions:
56-
branches:
57-
- master
58-
5925
# A plugin to delete branch when pull request is merged or closed.
6026
# See more: https://kapetanios.dev/docs/plugins/branchcleaner
6127
branchCleaner:

.kapetanios/postsubmit.yaml

-51
This file was deleted.

.kapetanios/presubmit.yaml

-59
This file was deleted.

0 commit comments

Comments
 (0)