From 603e01d744593d3ea5c4451a1fd3a248ad8d9db6 Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 18 Jan 2025 02:00:49 -0600 Subject: [PATCH] Website: add support for optional `onTargetEarnings` value in open positions YAML. (#25576) Closes: https://github.com/fleetdm/confidential/issues/9378 Changes: - Added support for `onTargetEarnings` in open-positons.yml - Updated the build-static-content script to validate `onTargetEarnings` values, and to replace the default compensation range on the page template with an `onTargetEarnings` value if one is provided. - Updated the "Creating a new position" section of the leadership handbook to document the new key in the open positions yaml --- handbook/company/leadership.md | 2 +- handbook/company/open-positions.yml | 1 + website/scripts/build-static-content.js | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/handbook/company/leadership.md b/handbook/company/leadership.md index 893050307acc..a129d97b54f3 100644 --- a/handbook/company/leadership.md +++ b/handbook/company/leadership.md @@ -230,7 +230,7 @@ Want to hire? Use these steps to hire a [fleetie, not a consultant](https://flee - `hiringManagerLinkedInUrl`: The url of the hiring manger's LinkedIn profile. People applying for this position will be asked to reach out to the manager on LinkedIn. - `responsibilities`: A Markdown list of the responsibilities of this proposed position. - `experience`: A Markdown list of the experience that applicants should have when applying for the proposed position. - + - If needed, you can override the default compensation range ($48,000 - $480,000) in the open position template page by adding a `onTargetEarnings` value to the open position. If provided, `onTargetEarnings` values should be a string containing the salary range for the the proposed position. A completed open position entry should look something like this: diff --git a/handbook/company/open-positions.yml b/handbook/company/open-positions.yml index 90ccd33d8d5c..c0b103126001 100644 --- a/handbook/company/open-positions.yml +++ b/handbook/company/open-positions.yml @@ -4,6 +4,7 @@ # hiringManagerName: # hiringManagerLinkedInUrl: # hiringManagerGithubUsername: +# onTargetEarnings: (Optional) A range of on target earnings for this role. If provided, this will replace the default range ('$48,000 - $480,000') on the page for this position. # responsibilities: | # Add markdown content to this field. # experience: | diff --git a/website/scripts/build-static-content.js b/website/scripts/build-static-content.js index add39a8c1d41..a40e9a78aca7 100644 --- a/website/scripts/build-static-content.js +++ b/website/scripts/build-static-content.js @@ -645,10 +645,14 @@ module.exports = { if(!openPosition.experience){ throw new Error(`Error: could not build open position handbook pages from ${RELATIVE_PATH_TO_OPEN_POSITIONS_YML_IN_FLEET_REPO}. An open position in the YAML is missing an "experience" value. To resolve, add an "experience" value to the "${openPosition.jobTitle}" position and try running this script again.`); } - + if(openPosition.onTargetEarnings){ + if(typeof openPosition.onTargetEarnings !== 'string') { + throw new Error(`Error: could not build open position handbook pages from ${RELATIVE_PATH_TO_OPEN_POSITIONS_YML_IN_FLEET_REPO}. An open position in the YAML has an invalid "onTargetEarnings" value. (expected a strong, but instead got a ${typeof openPosition.onTargetEarnings}) To resolve, change the "onTargetEarnings" value of the "${openPosition.jobTitle}" position to be a string that contains the on target earnings for this position and try running this script again.`); + } + } let pageTitle = openPosition.jobTitle; - let mdStringForThisOpenPosition = `# ${openPosition.jobTitle}\n\n## Let's start with why we exist. πŸ“‘\n\nEver wondered if your employer is monitoring your work computer?\n\nOrganizations make huge investments every year to keep their laptops and servers online, secure, compliant, and usable from anywhere. This is called "device management".\n\nAt Fleet, we think it's time device management became [transparent](https://fleetdm.com/transparency) and [open source](https://fleetdm.com/handbook/company#open-source).\n\n\n## About the company 🌈\n\nYou can read more about the company in our [handbook](https://fleetdm.com/handbook/company), which is public and open to the world.\n\ntldr; Fleet Device Management Inc. is a [recently-funded](https://techcrunch.com/2022/04/28/fleet-nabs-20m-to-enable-enterprises-to-manage-their-devices/) Series A startup founded and backed by the same people who created osquery, the leading open source security agent. Today, osquery is installed on millions of laptops and servers, and it is especially popular with [enterprise IT and security teams](https://www.linuxfoundation.org/press/press-release/the-linux-foundation-announces-intent-to-form-new-foundation-to-support-osquery-community).\n\n\n## Your primary responsibilities πŸ”­\n${openPosition.responsibilities}\n\n## Are you our new team member? πŸ§‘β€πŸš€\nIf most of these qualities sound like you, we would love to chat and see if we're a good fit.\n\n${openPosition.experience}\n\n## Why should you join us? πŸ›Έ\n\nLearn more about the company and [why you should join us here](https://fleetdm.com/handbook/company#is-it-any-good).\n\n
Deloitte logo

β€œOne of the best teams out there to go work for and help shape security platforms.”

Dhruv Majumdar

Director Of Cyber Risk & Advisory

\n\n\n## Want to join the team?\n\nWant to join the team?\n\nMessage us on [LinkedIn](https://www.linkedin.com/company/fleetdm/). \n\n\n >The salary range for this role is $48,000 - $480,000. Fleet provides competitive compensation based on our [compensation philosophy](https://fleetdm.com/handbook/company/communications#compensation), as well as comprehensive [benefits](https://fleetdm.com/handbook/company/communications#benefits).`; + let mdStringForThisOpenPosition = `# ${openPosition.jobTitle}\n\n## Let's start with why we exist. πŸ“‘\n\nEver wondered if your employer is monitoring your work computer?\n\nOrganizations make huge investments every year to keep their laptops and servers online, secure, compliant, and usable from anywhere. This is called "device management".\n\nAt Fleet, we think it's time device management became [transparent](https://fleetdm.com/transparency) and [open source](https://fleetdm.com/handbook/company#open-source).\n\n\n## About the company 🌈\n\nYou can read more about the company in our [handbook](https://fleetdm.com/handbook/company), which is public and open to the world.\n\ntldr; Fleet Device Management Inc. is a [recently-funded](https://techcrunch.com/2022/04/28/fleet-nabs-20m-to-enable-enterprises-to-manage-their-devices/) Series A startup founded and backed by the same people who created osquery, the leading open source security agent. Today, osquery is installed on millions of laptops and servers, and it is especially popular with [enterprise IT and security teams](https://www.linuxfoundation.org/press/press-release/the-linux-foundation-announces-intent-to-form-new-foundation-to-support-osquery-community).\n\n\n## Your primary responsibilities πŸ”­\n${openPosition.responsibilities}\n\n## Are you our new team member? πŸ§‘β€πŸš€\nIf most of these qualities sound like you, we would love to chat and see if we're a good fit.\n\n${openPosition.experience}\n\n## Why should you join us? πŸ›Έ\n\nLearn more about the company and [why you should join us here](https://fleetdm.com/handbook/company#is-it-any-good).\n\n
Deloitte logo

β€œOne of the best teams out there to go work for and help shape security platforms.”

Dhruv Majumdar

Director Of Cyber Risk & Advisory

\n\n\n## Want to join the team?\n\nWant to join the team?\n\nMessage us on [LinkedIn](https://www.linkedin.com/company/fleetdm/). \n\n\n >The salary range for this role is ${openPosition.onTargetEarnings ? openPosition.onTargetEarnings : '$48,000 - $480,000'}. Fleet provides competitive compensation based on our [compensation philosophy](https://fleetdm.com/handbook/company/communications#compensation), as well as comprehensive [benefits](https://fleetdm.com/handbook/company/communications#benefits).`; let htmlStringForThisPosition = await sails.helpers.strings.toHtml.with({mdString: mdStringForThisOpenPosition});