Skip to content

Commit

Permalink
The typescript SDK will get built now as part of the UI build process (
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann authored Nov 1, 2024
1 parent 8b4b019 commit 5da675a
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 75 deletions.
34 changes: 13 additions & 21 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,37 +83,29 @@ jobs:
cache: 'npm'
cache-dependency-path: 'ui/**/package-lock.json'

- name: Build and verify the typescript-sdk
working-directory: typescript-sdk
run: |
npm install
npm run generate-sources
npm run lint
npm run build
- name: Install UI Dependencies
run: |
cd ui
npm install
working-directory: ui
run: npm install

- name: Lint UI Code
run: |
cd ui
npm run lint
working-directory: ui
run: npm run lint

- name: Build and Package UI
run: |
cd ui
npm run build
npm run package
- name: Build the UI
working-directory: ui
run: npm run build

- name: Package the UI
working-directory: ui
run: npm run package

- name: Build and Push UI image
- name: Build and Push UI container image
working-directory: ui
env:
IMAGE_REPO: ttl.sh/${{ github.sha }}
# maximum allowed
IMAGE_TAG: 1d
run: |
cd ui
docker build -t $IMAGE_REPO/apicurio/apicurio-registry-ui:$IMAGE_TAG .
docker push $IMAGE_REPO/apicurio/apicurio-registry-ui:$IMAGE_TAG
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/release-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,9 @@ jobs:
cd registry
./mvnw clean package -pl app,distro/docker -am --no-transfer-progress -Pprod -DskipTests=true -DskipCommitIdPlugin=false -Dmaven.wagon.httpconnectionManager.maxTotal=30 -Dmaven.wagon.http.retryHandler.count=5 -Dspotless.check.skip=true
- name: Build the typescript-sdk
run: |
cd registry/typescript-sdk
npm install
npm run generate-sources
npm run lint
npm run build
- name: Build Registry UI
working-directory: registry/ui
run: |
cd registry/ui
npm install
npm run lint
npm run build
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release-sdk-typescript.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,17 @@ jobs:

# Needs special tagging to use submodules: https://stackoverflow.com/a/64705638/7898052
- name: Release Typescript SDK
working-directory: registry/typescript-sdk
run: |
cd registry/typescript-sdk
npm install
npm run generate-sources
npm run build
- name: Publish to npmjs.com
working-directory: registry/typescript-sdk
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd registry/typescript-sdk
npm publish --access public
run: npm publish --access public

- name: Google Chat Notification
if: ${{ failure() }}
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,9 @@ jobs:
cd registry
./mvnw clean package -pl distro/docker -am --no-transfer-progress -Pprod -DskipTests=true -DskipCommitIdPlugin=false -Dmaven.wagon.httpconnectionManager.maxTotal=30 -Dmaven.wagon.http.retryHandler.count=5
- name: Build the typescript-sdk
run: |
cd registry/typescript-sdk
npm install
npm run generate-sources
npm run lint
npm run build
- name: Build Registry UI
working-directory: registry/ui
run: |
cd registry/ui
npm install
npm run lint
npm run build
Expand Down
45 changes: 17 additions & 28 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,39 +136,29 @@ jobs:
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Build and verify the typescript-sdk
working-directory: typescript-sdk
run: |
npm install
npm run generate-sources
npm run lint
npm run build
- name: Install Dependencies
run: |
cd ui
npm install
working-directory: ui
run: npm install

- name: Lint
run: |
cd ui
npm run lint
working-directory: ui
run: npm run lint

- name: Build and Package
run: |
cd ui
npm run build
npm run package
- name: Build
working-directory: ui
run: npm run build

- name: Package
working-directory: ui
run: npm run package

- name: Install Test Dependencies
run: |
cd ui/tests
npm install
working-directory: ui/tests
run: npm install

- name: Lint Tests
run: |
cd ui/tests
npm run lint
working-directory: ui/tests
run: npm run lint

- name: Login to DockerHub Registry
if: github.event_name == 'push'
Expand All @@ -180,9 +170,8 @@ jobs:

- name: Build and Push UI Multi-arch Images
if: github.event_name == 'push'
run: |
cd ui
docker buildx build --push -f ./Dockerfile -t quay.io/apicurio/apicurio-registry-ui:latest-snapshot -t docker.io/apicurio/apicurio-registry-ui:latest-snapshot --platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le .
working-directory: ui
run: docker buildx build --push -f ./Dockerfile -t quay.io/apicurio/apicurio-registry-ui:latest-snapshot -t docker.io/apicurio/apicurio-registry-ui:latest-snapshot --platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le .

- name: Google Chat Notification (Always)
if: github.event_name == 'push' && always()
Expand Down
11 changes: 7 additions & 4 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@
"version": "3.0.4-Dev",
"type": "module",
"scripts": {
"postinstall": "npm install --prefix ./ui-app && npm install --prefix ./ui-docs",
"postinstall": "npm install --prefix ../typescript-sdk && npm install --prefix ./ui-app && npm install --prefix ./ui-docs",
"clean-sdk": "npm run clean --prefix ../typescript-sdk",
"clean-app": "npm run clean --prefix ./ui-app",
"clean-docs": "npm run clean --prefix ./ui-docs",
"clean": "rimraf dist && npm run clean-app && npm run clean-docs",
"clean": "rimraf dist && npm run clean-sdk && npm run clean-app && npm run clean-docs",
"lint-sdk": "npm run lint --prefix ../typescript-sdk",
"lint-app": "npm run lint --prefix ./ui-app",
"lint-docs": "npm run lint --prefix ./ui-docs",
"lint": "npm run lint-app && npm run lint-docs",
"lint": "npm run lint-sdk && npm run lint-app && npm run lint-docs",
"build-sdk": "npm run generate-sources --prefix ../typescript-sdk && npm run build --prefix ../typescript-sdk",
"build-app": "npm run build --prefix ./ui-app",
"build-docs": "npm run build --prefix ./ui-docs",
"build": "npm run build-app && npm run build-docs && node .scripts/generate-version.cjs",
"build": "npm run build-sdk && npm run build-app && npm run build-docs && node .scripts/generate-version.cjs",
"package": "node .scripts/package.cjs",
"dev": "npm run dev --prefix ./ui-app"
},
Expand Down
1 change: 1 addition & 0 deletions ui/ui-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5da675a

Please sign in to comment.