Skip to content

Commit

Permalink
Migrate Gulp scripts to Makefile, add latest tag for releases and upd…
Browse files Browse the repository at this point in the history
…ate dependencies (kubernetes#6351)

* Add the latest tag to the official image release

* Start migration to Makefile

* Remove unused variables

* Add docker-push-head script

* Remove leftovers

* Add manifest tagging

* Add missing commands for latest tag

* Add validate, test and coverage targets

* Remove redundant files
Improve error message

* Add backend serve and watch scripts

* Add serve args

* Add e2e test job

* Adjust e2e job

* Add prod build

* Add cross build

* Regenerate package-lock.json

* Regenerate package-lock.json

* Add check command

* Fix build command, clean up and migrate more scripts

* Update target names

* Start codegen migration

* Fix checks

* Minor fixes

* Remove Gulp leftovers

* Remove duplicated checks

* Remove leftovers

* Update docs

* Add prod start

* Restore update codegen script

* Regenerate lockfile and update codegen

* Fix coverage script

* Fix check script

* Fix e2e tests

* Do not run check in parallel

* Fix review findings

* Restore npm config

* Regenerate lock files

* Fix typo

* Revert CLI version

* Use air instead of fswatch

* Commit air config

* Fix watch issue

* Update .air.toml

Co-authored-by: Shu Muto <[email protected]>

* Update dependencies

* Revert dependencies
Update Node to v16

* Update Angular to v13

* Update dependencies

* Update dependencies

* Update dependencies

* Ignore Angular build artifacts

* Fix codegen scripts

* Format files

* Retry

* Add Cypress cache

Co-authored-by: Sebastian Florek <[email protected]>
Co-authored-by: Shu Muto <[email protected]>
  • Loading branch information
3 people authored Nov 29, 2021
1 parent 835b40e commit 2033f87
Show file tree
Hide file tree
Showing 34 changed files with 26,703 additions and 9,302 deletions.
32 changes: 32 additions & 0 deletions .air.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
root = "."
tmp_dir = ".tmp"

[build]
bin = ".tmp/serve/dashboard"
cmd = "make build-backend"
delay = 2000
exclude_dir = []
exclude_file = []
exclude_regex = []
exclude_unchanged = false
follow_symlink = false
full_bin = "make run-backend"
include_dir = ["src/app/backend"]
include_ext = ["go"]
kill_delay = "1s"
log = "build-errors.log"
send_interrupt = true
stop_on_error = true

[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"

[log]
time = false

[misc]
clean_on_exit = true
4 changes: 0 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Do not include the Docker build pipeline itself.
aio/docker/gulp-in-docker/Dockerfile
aio/scripts/run-gulp-in-docker.sh

# Ignore all development artifacts so that the build is always clean.
.git
.tmp/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cd-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Setup NodeJS
uses: actions/[email protected]
with:
node-version: 14.16.1
node-version: 16.13.0

- name: Cache Node Modules
uses: actions/cache@v2
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Setup NodeJS
uses: actions/[email protected]
with:
node-version: 14.16.1
node-version: 16.13.0

- name: Cache Node Modules
uses: actions/cache@v2
Expand Down
61 changes: 0 additions & 61 deletions .github/workflows/ci-license-workflow.yml

This file was deleted.

28 changes: 11 additions & 17 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Setup NodeJS
uses: actions/[email protected]
with:
node-version: 14.17.0
node-version: 16.13.0

- name: Cache Node Modules
uses: actions/cache@v2
Expand All @@ -73,12 +73,6 @@ jobs:
run: |
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1; } && go mod download
- name: Install Codegen
shell: bash
run: |
export GOPATH=$(go env GOPATH)/bin
aio/scripts/install-codegen.sh
- name: Check Code
shell: bash
run: |
Expand Down Expand Up @@ -109,7 +103,7 @@ jobs:
- name: Setup NodeJS
uses: actions/[email protected]
with:
node-version: 14.17.0
node-version: 16.13.0

- name: Cache Node Modules
uses: actions/cache@v2
Expand All @@ -126,17 +120,15 @@ jobs:
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1; } && go mod download
- name: Run Frontend Unit Tests
run: npm run test:frontend:coverage
run: make coverage-frontend

- name: Run Backend Unit Tests
run: |
export GOPATH=$(go env GOPATH)/bin
npm run test:backend:coverage
run: make coverage-backend

- name: Cleanup & Upload Coverage
shell: bash
run: |
rm -rf .tmp
make clean
bash <(curl -s https://codecov.io/bash) -c -K || echo "Codecov upload failed"
e2e:
Expand Down Expand Up @@ -166,20 +158,22 @@ jobs:
- name: Setup NodeJS
uses: actions/[email protected]
with:
node-version: 14.17.0
node-version: 16.13.0

- name: Cache Node Modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
path: |
~/.cache/Cypress
node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

- name: Install Dependencies
shell: bash
run: |
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1; } && go mod download && npm install cypress
[ ! -d "node_modules" ] && npm ci && npm install cypress || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1; } && go mod download
- name: Run E2E Tests
run: npm run cluster:start && npm run e2e
run: make e2e
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ vendor/
.go_workspace/
.sass-cache/
.tmp/
.angular/
.cached_tools/
dist/
coverage/
Expand Down
6 changes: 2 additions & 4 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@
# limitations under the License
. "$(dirname "$0")/_/husky.sh"

npm run check
npm run check:license
npm run test:frontend
npm run test:backend
make check
make test
6 changes: 0 additions & 6 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,5 @@
engine-strict = true

# Dashboard configuration
kubeconfig_dir = ${HOME}/.kube
kubeconfig = ${HOME}/.kube/config
frontend_build_dir = dist/frontend/en
dashboard_binary_path = dist/amd64/dashboard
dashboard_locale_config = dist/amd64/locale_conf.json
bind_address = 127.0.0.1
sidecar_host = http://localhost:8000
port = 8080
Loading

0 comments on commit 2033f87

Please sign in to comment.