Skip to content
Snippets Groups Projects
  • Cam Saul's avatar
    3c980639
    Build script overhaul 2023 (#28767) · 3c980639
    Cam Saul authored
    * Build Script overhaul
    
    * Remove stray deps.edn
    
    * Include :ci profile for build and release tests
    
    * Fix release script
    
    * Update markdown dox
    
    * Update another dox
    
    * Tweakz
    
    * Don't pin new version of data.xml to core project, just for build scripts
    
    * Ignore unrecognized options
    
    * Fix i18n/enumerate
    Build script overhaul 2023 (#28767)
    Cam Saul authored
    * Build Script overhaul
    
    * Remove stray deps.edn
    
    * Include :ci profile for build and release tests
    
    * Fix release script
    
    * Update markdown dox
    
    * Update another dox
    
    * Tweakz
    
    * Don't pin new version of data.xml to core project, just for build scripts
    
    * Ignore unrecognized options
    
    * Fix i18n/enumerate
Code owners
Assign users and groups as approvers for specific file changes. Learn more.

Metabase Release Script 3.0

Prereqs

  1. Install Clojure CLI -- see [https://clojure.org/guides/getting_started]. Don't use apt install clojure as this installs a version that doesn't understand deps.edn.

  2. Install git, node, yarn, awscli, docker, java, and `wget``

    1. For installing Docker on macOS you should use Docker Desktop. Make sure docker ps works from the terminal

    2. Java version must be Java 8. For managing different Java versions, I recommend Jabba. Use adopt@1.8.0-<latest-version>. Before running the script, I do

      jabba use adopt@1.8.0-252
    3. Configure AWS Credentials for metabase profile (used to upload artifacts to S3)

      You'll need credentials that give you permission to write the metabase-osx-releases S3 bucket. You just need the access key ID and secret key; use the defaults for locale and other options.

      aws configure --profile metabase
  3. Export the following env vars: DOCKERHUB_EMAIL, DOCKERHUB_USERNAME, DOCKERHUB_PASSWORD, GITHUB_TOKEN, SLACK_WEBHOOK_URL, and AWS_DEFAULT_PROFILE.

    1. DockerHub credentials need to have permissions to push new Docker images to our DockerHub org.

    2. GitHub token needs to have push permissions

    3. You can get the Slack Webhook URL by asking Cam

    4. AWS_DEFAULT_PROFILE should be set to metabase

  4. Run the script

Running

./bin/release.sh

or

clojure -X:drivers:build:build/release
  1. Debugging

If you're running into issues running the release script, it's helpful to first check that you can run ./bin/build.sh -- this is the real meat and potatoes of the release process and more likely to be the cause of your issues. If you can run that but still need help, talk to Cam.

To start an nREPL (ex: to run and debug tests), use:

clojure -MnREPL

Add any JVM options (individually) by prefixing each with -J before the -M, and any additional nREPL options after it as outlined here.