Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-9086

Add post-repository-creation hooks to cookiecutter services

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      For instance, adding a technote needs to register it with keeper. We need a generic plugin mechanism to do it for arbitrary processes. Fortunately, we have just the thing....

        Attachments

          Activity

          Hide
          jsick Jonathan Sick added a comment -

          Here's a summary of the procedure I apply to fully hook up a technote:

          1. Use GET https://keeper.lsst.codes/token to get a token (using the travis user account in keeper.lsst.codes).
          2. Use POST https://keeper.lsst.codes/products/ to register the product with LTD Keeper.
          3. Activate the GitHub repository with Travis.
          4. Use travis encrypt to encrypt and add LTD_MASON_AWS_ID, LTD_MASON_AWS_SECRET, LTD_KEEPER_URL, LTD_KEEPER_USER, and LTD_KEEPER_PASSWORD to the env.global section of .travis.yml. Note that the travis encrypt ruby gem seems to mess up the indentation of lists in YAML, so if possible, it'd be nice to have a way of adding the secrets to YAML. travis encrypt also removes the comments in YAML, so yeah, lets not use that to directly add fields to YAML. I see there are some Python packages for Travis like https://pypi.python.org/pypi/TravisPy/0.3.5 or https://pypi.python.org/pypi/travis-encrypt/0.4.6 that might help.
          5. Push the updated .travis.yml to GitHub.
          6. Enable GitHub protected branches so that a passing test is required and the branch must be up-to-date to merge to master.

          It'd also be good to add a TEST series to https://github.com/lsst-sqre/lsst-technote-bootstrap/blob/master/cookiecutter.json (constrained to the lsst-sqre organization) for testing technote creation and registration.

          Thanks Adam Thornton! This will save me a tonne of time.

          Show
          jsick Jonathan Sick added a comment - Here's a summary of the procedure I apply to fully hook up a technote: Use GET https://keeper.lsst.codes/token to get a token (using the travis user account in keeper.lsst.codes). Use POST https://keeper.lsst.codes/products/ to register the product with LTD Keeper. Activate the GitHub repository with Travis. Use travis encrypt to encrypt and add LTD_MASON_AWS_ID , LTD_MASON_AWS_SECRET , LTD_KEEPER_URL , LTD_KEEPER_USER , and LTD_KEEPER_PASSWORD to the env.global section of .travis.yml . Note that the travis encrypt ruby gem seems to mess up the indentation of lists in YAML, so if possible, it'd be nice to have a way of adding the secrets to YAML. travis encrypt also removes the comments in YAML, so yeah, lets not use that to directly add fields to YAML. I see there are some Python packages for Travis like https://pypi.python.org/pypi/TravisPy/0.3.5 or https://pypi.python.org/pypi/travis-encrypt/0.4.6 that might help. Push the updated .travis.yml to GitHub. Enable GitHub protected branches so that a passing test is required and the branch must be up-to-date to merge to master. It'd also be good to add a TEST series to https://github.com/lsst-sqre/lsst-technote-bootstrap/blob/master/cookiecutter.json (constrained to the lsst-sqre organization) for testing technote creation and registration. Thanks Adam Thornton ! This will save me a tonne of time.
          Hide
          athornton Adam Thornton added a comment -

          This is now implemented and in review. Working on kubernetes settings.

          Show
          athornton Adam Thornton added a comment - This is now implemented and in review. Working on kubernetes settings.
          Hide
          jmatt J Matt Peterson [X] (Inactive) added a comment -

          GitHub PR Reviewed. Good to go after addressing recommendations in the PR.

          Show
          jmatt J Matt Peterson [X] (Inactive) added a comment - GitHub PR Reviewed. Good to go after addressing recommendations in the PR.
          Hide
          athornton Adam Thornton added a comment -

          Deployed and functioning.

          Show
          athornton Adam Thornton added a comment - Deployed and functioning.

            People

            Assignee:
            athornton Adam Thornton
            Reporter:
            athornton Adam Thornton
            Reviewers:
            J Matt Peterson [X] (Inactive)
            Watchers:
            Adam Thornton, J Matt Peterson [X] (Inactive), Jonathan Sick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: