Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify deployments and update to new production buckets #11649

Merged
merged 3 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,22 @@ jobs:
- uses: ./.github/actions/verify-package
- name: deploy to s3
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-s3 -- -b "cesium-public-builds" -d cesium/$BRANCH -c 'no-cache' --confirm
run: |
aws s3 sync . s3://cesium-public-builds/cesium/$BRANCH/ \
--cache-control "no-cache" \
--exclude ".git/*" \
--exclude ".concierge/*" \
--exclude ".github/*" \
--exclude ".husky/*" \
--exclude ".vscode/*" \
--exclude "Build/Coverage/*" \
--exclude "Build/CesiumDev/*" \
mramato marked this conversation as resolved.
Show resolved Hide resolved
--exclude "Build/Specs/e2e" \
--exclude "Documentation/*" \
--exclude "node_modules/*" \
--exclude "scripts/*" \
--exclude "Tools/*" \
--delete
- name: set status
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-status -- --status success --message Deployed
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ jobs:
run: npm run build-apps
- name: deploy to cesium.com
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-s3 -- -b "cesium.com-next" -c 'public, max-age=1800' --skip --confirm
run: |
unzip Cesium-$(cat package.json | jq -r '.version').zip -d Build/release/ -x "Apps"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is jq built in or does it need to be installed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've used it in other workflows without doing anything special so I'm confident it's built in.

aws s3 sync Build/release/ s3://cesium-website/cesiumjs/releases/$(cat package.json | jq -r '.version')/ --cache-control "public, max-age=1800" --delete
aws s3 sync Build/Documentation/ s3://cesium-website/cesiumjs/ref-doc/ --cache-control "public, max-age=1800" --delete
aws s3 sync Build/CesiumViewer/ s3://cesium-website/cesiumjs/cesium-viewer/ --cache-control "public, max-age=1800" --delete
aws s3 sync Build/Sandcastle/ s3://cesium-sandcastle-website/ --cache-control "public, max-age=1800" --delete
5 changes: 2 additions & 3 deletions Documentation/Contributors/BuildGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ Here's the full set of scripts and what they do.
- `test-webgl-validation` - Runs all tests with Karma and enables low-level WebGL validation
- `test-release` - Runs all tests on the minified release version of built Cesium
- **Deployment scripts**
- `deploy-s3` - Deploys the built CesiumJS files, the npm package, and the zip file to Amazon S3. This requires having credentials set up for the S3 bucket to which you are deploying
- `deploy-status` - Sets the deployment statuses in GitHub, for use in CI
- `deploy-set-version` - Sets the version of `package.json`, for use in CI

Expand Down Expand Up @@ -179,7 +178,7 @@ aws s3 sync ./Build/Coverage s3://cesium-public-builds/cesium/$BRANCH/Build/Cove
```

```yml
npm run deploy-s3 -- -b "cesium-public-builds" -d cesium/$BRANCH -c 'no-cache' --confirm
aws s3 sync Build/unzipped/ s3://cesium-public-builds/cesium/$BRANCH/Build/ --cache-control "no-cache" --delete
```

- In `gulpfile.js`, edit the following line:
Expand All @@ -188,7 +187,7 @@ npm run deploy-s3 -- -b "cesium-public-builds" -d cesium/$BRANCH -c 'no-cache' -
const devDeployUrl = "https://ci-builds.cesium.com/cesium/";
```

- Edit the URL to match the URL of the S3 bucket specified in the previous step.
- Edit the URL to match the URL hosting the S3 bucket specified in the previous step.

### Configure S3 Credentials

Expand Down
Loading