Skip to content

Commit

Permalink
Build Connect in Webapps-Build pipeline (gravitational#874)
Browse files Browse the repository at this point in the history
* Remove get-teleport-connect-dir

We didn't end up using it, see gravitational#13099.

* Run build-term & package-term in Webapps-Build pipeline

* Remove build script from package.json

It seems like it's no longer used anywhere at this point.
  • Loading branch information
ravicious authored Jun 13, 2022
1 parent bddf9e8 commit 69df4ef
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
23 changes: 21 additions & 2 deletions web/.cloudbuild/ci/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,28 @@ steps:
- "go run ./cmd/checkout -w=/workspace"

- name: gcr.io/cloud-builders/docker
id: build
id: type-check-and-lint
waitFor: ['checkout']
args:
- build
- '--build-arg'
- NPM_SCRIPT=build
- NPM_SCRIPT=type-check-and-lint
- .

- name: gcr.io/cloud-builders/docker
id: build-teleport
waitFor: ['type-check-and-lint']
args:
- build
- '--build-arg'
- NPM_SCRIPT=build-teleport
- .

- name: gcr.io/cloud-builders/docker
id: build-term
waitFor: ['type-check-and-lint']
args:
- build
- '--build-arg'
- NPM_SCRIPT=build-and-package-term
- .
2 changes: 1 addition & 1 deletion web/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COMMIT_URL = https://github.com/gravitational/webapps/commit/$(COMMIT)
.PHONY: build
build:
@if [ -d "packages/webapps.e/" ]; then \
$(MAKE) docker-build NPM_CMD=build FROM=dist/ TO=dist/; \
$(MAKE) docker-build NPM_CMD=build-teleport FROM=dist/ TO=dist/; \
else \
$(MAKE) docker-build NPM_CMD=build-oss FROM=dist/ TO=dist/; \
fi;
Expand Down
7 changes: 3 additions & 4 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"tdd": "jest --watch",
"package-term": "yarn workspace @gravitational/teleterm package",
"build-term": "yarn workspace @gravitational/teleterm build",
"build-and-package-term": "yarn build-term && yarn package-term",
"start-term": "yarn workspace @gravitational/teleterm start",
"start-teleport": "yarn workspace @gravitational/teleport start",
"start-teleport-e": "yarn workspace @gravitational/teleport.e start",
Expand All @@ -18,9 +19,8 @@
"build-teleport-e": "yarn workspace @gravitational/teleport.e build --output-path=../../../dist/e/teleport/app",
"build-oss": "yarn build-teleport-oss",
"build-e": "yarn build-teleport-e",
"build": "yarn lint && yarn type-check && yarn build-oss && yarn build-e",
"type-check-and-lint": "yarn type-check && yarn lint",
"lint": "eslint --ext .js,.jsx,.ts,.tsx packages/",
"get-teleport-connect-dir": "node -p \"require('./package.json').teleportConnectDir\"",
"type-check": "tsc --noEmit"
},
"private": true,
Expand All @@ -37,6 +37,5 @@
"packages/webapps*/**",
"packages/teleterm"
]
},
"teleportConnectDir": "packages/teleterm"
}
}

0 comments on commit 69df4ef

Please sign in to comment.