diff --git a/.github/workflows/build-ui-and-server.yml b/.github/workflows/build-ui-and-server.yml deleted file mode 100644 index ed02ff76df5..00000000000 --- a/.github/workflows/build-ui-and-server.yml +++ /dev/null @@ -1,292 +0,0 @@ -name: Meshery UI and Server -on: - pull_request_target: - types: [opened, synchronize, reopened] - branches: - - "master" - paths-ignore: - - "docs/**" - - "mesheryctl/**" - - "*.md" - - "*.github/**" - workflow_dispatch: - inputs: - logLevel: - description: "Log level" - required: true - default: "warning" - -permissions: read-all - -jobs: - build-backend: - name: Backend build - if: github.repository == 'meshery/helm-kanvas-snapshot' - runs-on: ubuntu-22.04 - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - name: Setup Go - uses: actions/setup-go@master - with: - go-version: "1.21" - - name: Build Meshery Server - env: - PROVIDER_BASE_URLS: http://localhost:9876 - PORT: 9081 - ADAPTER_URLS: "localhost:10000 localhost:10001 localhost:10002 localhost:10003 localhost:10004 localhost:10009 localhost:10007 localhost:10013" - run: | - make build-server - ui-build: - name: UI build - if: github.repository == 'meshery/helm-kanvas-snapshot' - runs-on: ubuntu-22.04 - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - name: Cache node modules - id: node-cache - uses: actions/cache@v4 - with: - path: | - ~/cache - ~/.cache - /home/runner/.cache - !~/cache/exclude - **/node_modules - ~/.npm - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- - - name: Install dependencies - if: steps.node-cache.outputs.cache-hit != 'true' - run: | - cd ui - npm i - cd .. - cd provider-ui - npm i - # - name: Cache meshery-ui - # id: meshery-ui-cache - # uses: actions/cache@v3 - # with: - # path: | - # /home/runner/work/meshery/meshery/ui/out - # key: ${{ runner.os }}-meshery-ui-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - - name: build meshery-ui - # if: steps.meshery-ui-cache.outputs.cache-hit != 'true' - run: | - make ui-meshery-build - - name: build provider-ui - run: | - make ui-provider-build - - name: Upload meshery-ui artifacts - uses: actions/upload-artifact@v4 - with: - name: meshery-ui - retention-days: 30 - path: /home/runner/work/meshery/meshery/ui/out - - name: Upload provider-ui artifacts - uses: actions/upload-artifact@v4 - with: - name: provider-ui - retention-days: 30 - path: /home/runner/work/meshery/meshery/provider-ui/out - tests-ui-e2e: - needs: [build-backend, ui-build] - name: UI end-to-end tests - environment: staging-playground - if: github.repository == 'meshery/helm-kanvas-snapshot' - runs-on: ubuntu-22.04 - timeout-minutes: 45 - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Check out meshery-istio code - uses: actions/checkout@v4 - with: - repository: layer5io/meshery-istio - path: ./meshery-istio - # - name: Check out meshery-consul code - # uses: actions/checkout@v4 - # with: - # repository: layer5io/meshery-consul - # path: ./meshery-consul - - name: Create k8s Kind Cluster - uses: helm/kind-action@v1.8.0 - with: - cluster_name: "kind-cluster" - - name: Setup Go - uses: actions/setup-go@master - with: - go-version: "1.21" - - name: Run meshery-istio - run: | - mkdir -p /home/runner/.meshery/bin - cd ./meshery-istio - go run main.go & - sleep 60 - # - name: Run meshery-consul - # run: | - # mkdir -p /home/runner/.meshery/bin - # cd ./meshery-consul - # go run main.go & - # sleep 60 - - name: Setup node - uses: actions/setup-node@v4 - with: - node-version: 18 - - name: Restore node modules cache - id: node-cache - uses: actions/cache@v4 - with: - path: | - ~/cache - ~/.cache - /home/runner/.cache - !~/cache/exclude - **/node_modules - ~/.npm - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- - - name: Download meshery-ui artifacts - uses: actions/download-artifact@v4 - with: - name: meshery-ui - path: /home/runner/work/meshery/meshery/ui/out - - name: Download provider-ui artifacts - uses: actions/download-artifact@v4 - with: - name: provider-ui - path: /home/runner/work/meshery/meshery/provider-ui/out - - name: Run Meshery UI and Server - env: - PROVIDER_BASE_URLS: http://localhost:9876 - PORT: 9081 - ADAPTER_URLS: "localhost:10000 localhost:10001 localhost:10002 localhost:10003 localhost:10004 localhost:10009 localhost:10007" - run: | - make server & - sleep 90 - - name: Install Playwright Browsers - run: npx playwright install --with-deps - working-directory: ui - - name: Run Playwright End-to-End Tests - env: - MESHERY_SERVER_URL: "http://localhost:9081" - REMOTE_PROVIDER_URL: "https://staging-meshery.layer5.io" - REMOTE_PROVIDER_USER_EMAIL: ${{ secrets.REMOTE_PROVIDER_USER_EMAIL }} - REMOTE_PROVIDER_USER_PASSWORD: ${{ secrets.REMOTE_PROVIDER_USER_PASS }} - PROVIDER_TOKEN: ${{ secrets.PROVIDER_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} - run: npx playwright test --project=chromium --project=firefox --reporter="./tests/e2e/custom-playwright-reporter.js" - working-directory: ui - - name: Save PR number - if: ${{ !cancelled() }} - run: | - mkdir -p ./pr - echo ${{ github.event.number }} > ./pr/number - - name: Upload Test Report - if: ${{ !cancelled() }} - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 - with: - name: e2e-test-reporter - path: | - ui/test-report.md - pr/number - retention-days: 14 - docker-build-test: - name: Docker build - if: github.repository == 'meshery/helm-kanvas-snapshot' - runs-on: ubuntu-22.04 - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - name: Docker edge build & tag - if: startsWith(github.ref, 'refs/tags/') != true && success() - env: - RELEASE_CHANNEL: "edge" - run: | - DOCKER_BUILDKIT=1 docker build -f install/docker/Dockerfile --no-cache -t meshery:edge-latest --build-arg TOKEN=test --build-arg GIT_COMMITSHA=${GITHUB_SHA::8} --build-arg RELEASE_CHANNEL=${RELEASE_CHANNEL} . - docker tag meshery:edge-latest meshery:edge-${GITHUB_SHA::8} - - name: Docker edge push - if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() - run: | - docker push ${{ secrets.IMAGE_NAME }}:edge-latest - docker push ${{ secrets.IMAGE_NAME }}:edge-${GITHUB_REF/refs\/tags\//} - docker push ${{ secrets.IMAGE_NAME }}:edge-${GITHUB_SHA::8} - - name: Docker Hub Description - if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() - uses: peter-evans/dockerhub-description@v4 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - repository: ${{ secrets.IMAGE_NAME }} - # validate the swagger docs - swaggerci: - if: github.repository == 'meshery/helm-kanvas-snapshot' - name: swagger-docs - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - name: Check if handlers were modified - uses: dorny/paths-filter@v3 - id: changes - with: - filters: | - modified: - - added|modified: "handlers/**" - - name: Setup go-swagger - if: steps.changes.outputs.modified == 'true' - uses: minchao/setup-go-swagger@v1 - with: - version: v0.26.1 - - name: swagger-spec - if: steps.changes.outputs.modified == 'true' - run: swagger generate spec -o ./server/helpers/swagger.yaml --scan-models - - name: swagger-docs - if: steps.changes.outputs.modified == 'true' - run: swagger generate spec -o ./docs/_data/swagger.yml --scan-models && swagger flatten ./docs/_data/swagger.yml -o ./docs/_data/swagger.yml --with-expand --format=yaml - - # validate graphQL schema - garphql_validate: - name: Validate GraphQL schema - if: github.repository == 'meshery/helm-kanvas-snapshot' - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - name: Check if schema was modified - uses: dorny/paths-filter@v3 - id: filter - with: - filters: | - modified: - - added|modified: 'server/internal/graphql/schema/schema.graphql' - - name: Set up Ruby - if: steps.filter.outputs.modified == 'true' - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.2.2 - bundler-cache: true - - name: graphql-docs - if: steps.filter.outputs.modified == 'true' - run: | - cd docs - bundle install - bundle exec rake graphql:compile_docs diff --git a/.github/workflows/build-ui-server-reusable-workflow.yml b/.github/workflows/build-ui-server-reusable-workflow.yml deleted file mode 100644 index 96173e1b3b4..00000000000 --- a/.github/workflows/build-ui-server-reusable-workflow.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Re-usable Workflow - Build UI and Server -on: - workflow_call: - secrets: - NODE_VERSION: - required: true - GO_VERSION: - required: true - -jobs: - build-backend: - name: Backend build - runs-on: ubuntu-22.04 - steps: - - name: Check out code - uses: actions/checkout@master - with: - repository: meshery/meshery - fetch-depth: 1 - - name: Setup Go - uses: actions/setup-go@master - with: - go-version: "1.21" - - name: Setup Cache - uses: actions/cache@v4 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - run: | - GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go build -tags draft ./server/cmd/main.go ./server/cmd/error.go - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: meshery - path: ./main - ui-build: - name: UI build - runs-on: ubuntu-22.04 - steps: - - name: Check out code - uses: actions/checkout@master - with: - repository: meshery/meshery - fetch-depth: 1 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - name: Cache node modules - id: node-cache - uses: actions/cache@v4 - with: - path: | - ~/cache - ~/.cache - /home/runner/.cache - !~/cache/exclude - **/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/lockfiles') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Install dependencies - run: | - cd ui - npm i - cd .. - cd provider-ui - npm i - - name: build meshery-ui - run: | - make ui-meshery-build - - name: build provider-ui - run: | - make ui-provider-build - - name: upload meshery-ui artifact - uses: actions/upload-artifact@v4 - with: - name: meshery-ui-build - path: ui/out/ - - name: upload Meshery-provider-ui artifacts - uses: actions/upload-artifact@v4 - with: - name: meshery-provider-ui build - path: provider-ui/out/ - diff --git a/.github/workflows/error-codes-updater.yaml b/.github/workflows/error-codes-updater.yaml index ed546023d2d..bca8e42e243 100644 --- a/.github/workflows/error-codes-updater.yaml +++ b/.github/workflows/error-codes-updater.yaml @@ -17,6 +17,11 @@ jobs: if: github.repository == 'meshery/helm-kanvas-snapshot' runs-on: ubuntu-22.04 steps: + - name: Checkout Meshery repo + uses: actions/checkout@master + with: + path: meshery + token: ${{ secrets.GH_ACCESS_TOKEN }} - uses: actions/checkout@master if: ${{ github.event_name == 'pull_request' }} with: @@ -38,18 +43,9 @@ jobs: go get github.com/layer5io/meshkit/cmd/errorutil@master go build -o ~/errorutil github.com/layer5io/meshkit/cmd/errorutil - - name: Run Utility For Meshery Server - run: | - ~/errorutil update -d . -i ./server/helpers -o ./server/helpers --skip-dirs mesheryctl - output=$(~/errorutil -d . analyze -i ./server/helpers -o ./server/helpers --skip-dirs mesheryctl | wc -c) - if [ "$output" -ne 0 ]; then - exit 1 - fi - echo '{ "errors_export": "" }' | jq --slurpfile export ./server/helpers/errorutil_errors_export.json '.errors_export = $export[0]' > ./docs/_data/errorref/meshery-server_errors_export.json - - - name: Run Utility For Mesheryctl + - name: Run Utility For Plugin run: | - cd ./mesheryctl + cd ./cmd ~/errorutil update -d . -i ./helpers -o ./helpers output=$(~/errorutil -d . analyze -i ./helpers -o ./helpers | wc -c) if [ "$output" -ne 0 ]; then @@ -69,4 +65,4 @@ jobs: commit_user_email: ci@layer5.io commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> commit_options: "--signoff" - commit_message: "[Error Codes]: Update Meshery server and mehseryctl error codes and reference" \ No newline at end of file + commit_message: "[Error Codes]: Update Helm Kanvas Snapshot error codes and reference" \ No newline at end of file diff --git a/.github/workflows/eslint-gh.yml b/.github/workflows/eslint-gh.yml deleted file mode 100644 index 0d6ad987ca2..00000000000 --- a/.github/workflows/eslint-gh.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: eslint-check -on: [pull_request] -jobs: - eslint: - name: runner / eslint - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - name: Run ESLint Meshery-UI - run: cd ui && npm i eslint && npx eslint . - - name: Run ESLint Provider-UI - run: cd provider-ui && npm i eslint && npx eslint . diff --git a/.github/workflows/go-testing-ci.yml b/.github/workflows/go-testing-ci.yml index bd6c99b2ad0..258f4d3a371 100644 --- a/.github/workflows/go-testing-ci.yml +++ b/.github/workflows/go-testing-ci.yml @@ -44,8 +44,6 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 2 - - name: Install lynx for xdg-open support - run: sudo apt-get install lynx - name: Setup Go uses: actions/setup-go@v5 with: @@ -66,8 +64,6 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 2 - - name: Install lynx for xdg-open support - run: sudo apt-get install lynx - name: Setup Go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/mesheryctl-ci.yml b/.github/workflows/golangci-lint.yml similarity index 99% rename from .github/workflows/mesheryctl-ci.yml rename to .github/workflows/golangci-lint.yml index b4cc948f949..319e668080e 100644 --- a/.github/workflows/mesheryctl-ci.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,4 +1,4 @@ -name: Mesheryctl +name: Linter on: push: branches: diff --git a/.github/workflows/meshmap.yml b/.github/workflows/meshmap.yml index bc74d931a81..0b19d21c678 100644 --- a/.github/workflows/meshmap.yml +++ b/.github/workflows/meshmap.yml @@ -1,4 +1,4 @@ -name: Meshery Snapshot Service +name: Kanvas Snapshot Service on: # rebuild any PRs and main branch changes pull_request_target: types: [opened, synchronize, reopened] diff --git a/build/component_info.json b/build/component_info.json index 72df6e60829..a84e379a028 100644 --- a/build/component_info.json +++ b/build/component_info.json @@ -1,5 +1,5 @@ { - "name": "kanvas-snapshot", + "name": "helm-kanvas-snapshot", "type": "component", "next_error_code": 1000 } \ No newline at end of file