Stream: IG creation
Topic: continuous integration
Brian Reinhold (Oct 31 2018 at 14:16):
I am using Lloyd's framework and configured github according to this
https://github.com/hl7-fhir/auto-ig-builder/blob/master/README.md
but all I get at the build site is the project, not a built version
Lloyd McKenzie (Oct 31 2018 at 14:41):
Did the CI build say it was successful?
Brian Reinhold (Oct 31 2018 at 14:43):
Did the CI build say it was successful?
I did not see anything happen. My understanding is that the build happens on commits to github.
Ahh.. Looking at the build log. It says
Load Configuration from /scratch/ig-build-temp-BZZ2HT/repo/ig.json (00.0006sec) Redirecting to Configuration from /scratch/ig-build-temp-BZZ2HT/repo/src-generated/PhdImplementationGuide.json (00.0032sec) Publishing Content Failed: /scratch/ig-build-temp-BZZ2HT/repo/src-generated/PhdImplementationGuide.json (No such file or directory) (00.0032sec) (00.0032sec) Use -? to get command line help (00.0032sec) (00.0033sec) Stack Dump (for debugging): (00.0033sec) java.io.FileNotFoundException: /scratch/ig-build-temp-BZZ2HT/repo/src-generated/PhdImplementationGuide.json (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at org.hl7.fhir.utilities.TextFile.fileToString(TextFile.java:132) at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:965) at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:944) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:523) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4925) Exception in thread "main" java.lang.NullPointerException at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4935)
Do I have to commit all these generated files?
Lloyd McKenzie (Oct 31 2018 at 14:46):
You must commit everything in src-generated, yes.
Lloyd McKenzie (Oct 31 2018 at 14:46):
And you must run a local build before committing changes.
Brian Reinhold (Oct 31 2018 at 14:47):
You must commit everything in src-generated, yes.
Anything else? That means I need to build on my local system before committing correct?
Lloyd McKenzie (Oct 31 2018 at 14:48):
Just framework, src and src-generated. And yes, you need to build locally before committing and pushing.
Brian Reinhold (Oct 31 2018 at 14:50):
Okay, the Framework is there. The only thing missing from the list was the src-generated.
Brian Reinhold (Oct 31 2018 at 15:19):
Now I am getting these errors. The build can't find my resource files
Load Content (20.0453sec) Publishing Content Failed: Unable to find the source file for StructureDefinition/phdServerCapabilityStatement: not specified, so tried structuredefinition-phdServerCapabilityStatement.xml, phdServerCapabilityStatement.structuredefinition.xml, structuredefinition-phdServerCapabilityStatement.json, structuredefinition/phdServerCapabilityStatement.xml, structuredefinition/phdServerCapabilityStatement.json, phdServerCapabilityStatement.xml, and phdServerCapabilityStatement.json in dirs [/scratch/ig-build-temp- UF1NV9/repo/src-generated/resources, /scratch/ig-build-temp-UF1NV9/repo/src-generated/resources, /scratch/ig-build- temp-UF1NV9/repo/src/resources, /scratch/ig-build-temp-UF1NV9/repo/src/vocabulary, /scratch/ig-build-temp- UF1NV9/repo/src/examples] (21.0551sec)
The src-generated/resources on my local system has none of my resources in it. Yet it builds fine locally.
Lloyd McKenzie (Oct 31 2018 at 16:08):
Try wiping your local src-generated, temp and output and re-running the build locally. If that runs fine, try committing and pushing again
Brian Reinhold (Nov 01 2018 at 16:37):
The src-generated/resources on my local system has none of my resources in it. Yet it builds fine locally.
The reason for this appears to be case insensitivity on Windows. I assume the remote build is on Linux.
Lloyd McKenzie (Nov 01 2018 at 17:36):
Correct
Eric Haas (Nov 01 2018 at 19:22):
another gotcha is that github does not recognize case changes on file names . so need to be explicit
git mv old_filename new_filename
Lloyd McKenzie (Nov 01 2018 at 19:39):
That was true in SVN too, so not strictly a github annoyance.
Last updated: Apr 12 2022 at 19:14 UTC