Skip to content

Improvement for deployment script#1614

Draft
arteymix wants to merge 1 commit intohotfix-1.32.6from
deployment-script-improvements
Draft

Improvement for deployment script#1614
arteymix wants to merge 1 commit intohotfix-1.32.6from
deployment-script-improvements

Conversation

@arteymix
Copy link
Copy Markdown
Member

@arteymix arteymix commented Feb 14, 2026

  •  make it possible to deploy a custom CLI build (i.e. gemma-cli-custom-build) with completion
  • deploy Maven site from the command line with the fixes for permissions and symlinks for baseCode and Gemma website

@arteymix arteymix force-pushed the deployment-script-improvements branch from e83d3d4 to 86f6d48 Compare February 14, 2026 19:16
@arteymix arteymix self-assigned this Feb 14, 2026
@arteymix arteymix requested a review from oganm February 14, 2026 19:20
@arteymix arteymix force-pushed the deployment-script-improvements branch from 86f6d48 to e8556d5 Compare February 14, 2026 19:28
[confirm('Deploying to production manually is very dangerous. Proceed?')]
deploy-web-production:
just --justfile "{{justfile()}}" --set GEMMA_WEB_DEPLOY_SERVER {{PRODUCTION_DEPLOY_SERVER}} deploy-web 'gemma'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@oganm I've added some tasks with confirmation in case you need to deploy to production manually.

@arteymix arteymix force-pushed the deployment-script-improvements branch from e8556d5 to 29deb31 Compare February 14, 2026 19:34

maven_site_dir=$($MAVEN help:evaluate -Dexpression=pavlab.siteDir -q -DforceStdout)
gemma_version=$($MAVEN help:evaluate -Dexpression=project.version -q -DforceStdout)
basecode_version=$($MAVEN help:evaluate -Dartifact=baseCode:baseCode -Dexpression=project.version -q -DforceStdout)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

One important caveat here, mvnd does not appear to be capable of evaluating expression, or at least not with this syntax, so we need to make sure that we're using vanilla Maven.

else
# TODO: default to local deployment
deploy_server=$($MAVEN help:evaluate -Dexpression=pavlab.server -q -DforceStdout)
fi
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

To mimic what maven does, we need to check if a local deployment is performed and then only use the maven_site_dir as-is. Otherwise, it needs to be used through ssh.

[confirm('Deploying to production manually is very dangerous. Proceed?')]
deploy-web-production:
just --justfile "{{justfile()}}" --set GEMMA_WEB_DEPLOY_SERVER {{PRODUCTION_DEPLOY_SERVER}} deploy-web 'gemma'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

A deployment to production should probably include a call to clean-web for safety.

deploy-cli ref: build-cli update-completion-scripts
./gemma-cli/deploy.sh "{{ref}}"

[confirm('Deploying to production manually is very dangerous. Proceed?')]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Include a clean-cli when deploying to production.

@arteymix arteymix assigned arteymix and unassigned arteymix Feb 16, 2026
@arteymix arteymix force-pushed the deployment-script-improvements branch 3 times, most recently from ac18387 to 4e08605 Compare February 17, 2026 01:42
Relocate deployment scripts in a single scripts/ location.
@arteymix arteymix force-pushed the deployment-script-improvements branch from 4e08605 to c38172c Compare February 17, 2026 01:48
# This is the general deployment server
DEPLOY_SERVER := "frink.pavlab.msl.ubc.ca"
PRODUCTION_DEPLOY_SERVER := "moe.pavlab.msl.ubc.ca"
DEVELOPMENT_DEPLOY_SERVER := "chalmers.pavlab.msl.ubc.ca"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These should be defined externally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant