Skip to content

IG build for Publication

John Moehrke edited this page Feb 18, 2022 · 48 revisions

This process that works today, might not work tomorrow. History proves this breaks often.

The formal process that HL7 uses will evolve, and that evolution will likely break things

Here is pseudo-code (shell code) for what seems to work

For the very first time you are publishing an IG

Given you have a target IG named "test-ig", in the XXX IHE domain, and it is at version "0.1.0"

  1. make local clone of the target github repo (e.g. test-ig)
  • if you already have a clone, make sure it is up-to-date (git pull)
  1. make local clones of the IHE fhir-ig-history-template https://github.com/IHE/fhir-ig-history-template
  git clone https://github.com/IHE/fhir-ig-history-template.git
  • if you already have a clone, make sure it is up-to-date (git pull)
  1. make fork of ig-registry and clone that branch locally
  $ git clone https://github.com/FHIR/ig-registry.git
  • if you already have a clone, make sure it is up-to-date (git pull)
  1. update the publisher tooling in your target IG clone. Both Sushi and Publisher need to be up-to-date. Update sushi using npm install as shown below. Update the publisher using _updatePublisher and answering "y" (second question you should also answer "y")
  $ npm install -g fsh-sushi
  $ _updatePublisher
  1. build your target IG as normal
  • make sure the version and releaseLabel are correct - sushi-config.yaml
  _genonce
  1. build your IG for publication
  _genonce -publish https://profiles.ihe.net/XXX/test-ig/0.1.0
  1. prepare a folder as if it was your web site
  1. First time, this is just a folder that is empty mkdir www
  2. else, grab everything for your IG as current publications github repo --> https://github.com/IHE/publications
  1. copy-recursively the contents of the clone from #2 above IHE ../fhir-ig-history-template/* www/

  2. prepare your package-list.json and put into the website directory (keep this file revision controlled in root of your github)

  1. create publish.ini; (keep this file revision controlled in root of your github)
  [website]
  style=fhir.layout
  server=apache
  url=https://profiles.ihe.net/XXX/test-ig
  org=IHE
  no-registry=1

  [feeds]
  package=package-feed.xml
  publication=publication-feed.xml
  • copy publish.ini www
  1. copy your build output to the website directory, overwriting
  • copy-recursively output/* www/
  1. make a directory for this version and copy the output there too
  • mkdir www/0.1.0
  • copy-recursively output/* www/0.1.0/
  1. do some more publisher magic
  java -jar input-cache/publisher.jar -publish-update -folder www -registry ../ig-registry/fhir-ig-list.json
  • confirm the build found your IG
  • "Y" to continue
  • make sure it succeeded. (note there is a known IOException in the dist-hist)
  1. copy the whole www website into the proper place in the publications repo for the profiles.ihe.net --> the Publications repo https://github.com/IHE/publications

  2. add your version specific sub-folder to the robots.txt at the root of profiles.ihe.net. This prevents searches (e.g., google) from recommending anything other than formal publication folder. --> https://github.com/IHE/publications

  3. add to the fhir/package-feed.xml the \<item\> from your www/package-feed.xml (the IG build creates this package-feed.xml). This enables simplifier IG registry to detect your new IG content.

  4. follow the publications process for quality checks and publication. (Any quality check failures, likely require changes to the IG build)

  • This must be done in concert with Mary.
  1. update appropriate domain index.html to reference properly the new release

  2. Commit all updates back to publications repo as necessary.

  3. When no further changes happen, then Mary will filezilla the content over to profiles.ihe.net web site

  4. tag the publications repo

  5. commit IG project changes to the IG project github repo

  6. tag the IG project repo with this version details -- https://github.com/IHE/publications/wiki/Revision-Management

  7. update the IG project to the next minor version and back to ci-build, and commit that to github. This prepares the ci-build as different than the release.

  8. commit the changes to ig-registry to your fork and create pull-request to HL7 authorities. Note look for the IGs you are adding, there might be old and now improper entries for original PDF versions.

history

This was transcribed from discussion on zulip chat

Alternate script https://confluence.hl7.org/pages/viewpage.action?pageId=104580055

TODO: Grahame would prefer we use -go-publish, but I can't get that working