Skip to content

Latest commit

 

History

History
125 lines (82 loc) · 4.06 KB

File metadata and controls

125 lines (82 loc) · 4.06 KB

Legacy local application setup

These notes formed part of the README before we moved towards using devcontainers for development. They'll be kept here for a while until our devcontainer workflow has fully been bedded in and we decide we don't need them anymore.

Setup

Welcome! 🎉 🎆 🐯

By now you should be onboarded.

The first thing to do is to install the required development tools. If you are on a Mac, this script will install Homebrew, Git, asdf-vm, Ruby, Bundler, Node.js, npm, Yarn, Postgres, Redis and other useful utilities.

Then, clone the project with SSH:

git clone git@github.com:DFE-Digital/teaching-vacancies.git

If you are on a new device, remember to generate a new SSH key.

Dependencies

  • Ruby
  • NodeJS
  • shared-mime-info (installed using Homebrew or other package manager of your choice, the mimemagic gem depends on this)

A tool like asdf-vm can help you install the required versions of Ruby and Node.js. Current versions that match production ones are specified in .tool-versions.

If asdf-vm is installed correctly, from the project repository you can just execute:

asdf install

If asdf install fails with the below message, and you are on a Mac, install GPG Suite.

You must install GnuPG to verify the authenticity of the downloaded archives before continuing with the install: https://www.gnupg.org/

Services

Make sure you have the following services configured and running on your development background:

If using Homebrew to install PostgreSQL, run brew services start postgresql in order to have launchd start PostgreSQL and restart whenever you log in.

ChromeDriver

To install

brew install --cask chromedriver

To update

brew upgrade --cask chromedriver

On macOS you might need to "un-quarantine" chromedriver too

which chromedriver
xattr -d com.apple.quarantine /path/to/chromedriver

Install dependencies

Install Ruby dependency libraries

bundle

Install the version of Bundler that created the lockfile if prompted to do so.

Install Javascript dependency libraries

Install Yarn via Corepack. You'll need to enable Corepack first:

corepack enable

If corepack enable fails with "command not found", install it via npm first:

npm install -g corepack
corepack enable

Then install dependencies:

yarn

Troubleshooting

  • I see Page Not Found when I log in and try to create a job listing.

Try seeding the database (quick) or importing the school data (slow) if you have not already. When your sign in account was created, it was assigned to a school via a URN, and you may not have a school in your database with the same URN.


Misc

Integration between Jira and Github

The integration allows to see the status of development from within the jira issue. You can see the status of branches, commits and pull requests as well as navigate to them to show the detail in Github.

To enable this, the following formatting must be used:

  • Branch: Prefix with the issue id. Ex: TEVA-1155-test-jira-github-integration
  • Commit: Prefix with the issue id between square bracket. Ex: [TEVA-1155] Update Readme
  • Pull request: Prefix with the issue id between square bracket. If the branch was prefixed correctly, this should be automatically added for you. Ex: [TEVA-1155] Document Jira-Github integration

The branch, commit or pull request will then appear in the Development side panel within the issue.