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

          No builds found.
          athornton Adam Thornton created issue -
          athornton Adam Thornton made changes -
          Field Original Value New Value
          Epic Link DM-8475 [ 28107 ]
          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.
          frossie Frossie Economou made changes -
          Status To Do [ 10001 ] In Progress [ 3 ]
          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.
          athornton Adam Thornton made changes -
          Reviewers J Matt Peterson [ jmatt ]
          Status In Progress [ 3 ] In Review [ 10004 ]
          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.
          jmatt J Matt Peterson [X] (Inactive) made changes -
          Status In Review [ 10004 ] Reviewed [ 10101 ]
          Hide
          athornton Adam Thornton added a comment -

          Deployed and functioning.

          Show
          athornton Adam Thornton added a comment - Deployed and functioning.
          athornton Adam Thornton made changes -
          Story Points 6
          athornton Adam Thornton made changes -
          Resolution Done [ 10000 ]
          Status Reviewed [ 10101 ] Done [ 10002 ]

            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:

                Jenkins

                No builds found.