build-kubo-release.dhall 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. let Concourse = ../lib/dhall-concourse/types.dhall
  2. let Defaults = ../lib/dhall-concourse/defaults.dhall
  3. let Helpers = ../lib/dhall-concourse/helpers.dhall
  4. let Prelude = ../lib/prelude/package.dhall
  5. let getKuboDeployment =
  6. ../steps/get-kubo-deployment.dhall
  7. (Some True)
  8. (Some [ ./run-unit-tests.dhall ])
  9. let getKuboRelease =
  10. ../steps/get-kubo-release.dhall
  11. (Some True)
  12. (Some [ ./run-unit-tests.dhall ])
  13. let getGafferSourceJSON =
  14. Helpers.getStep
  15. ( Defaults.GetStep
  16. ⫽ { resource = ../resources/gaffer-source-json.dhall }
  17. )
  18. let getKuboVersion =
  19. Helpers.getStep
  20. ( Defaults.GetStep
  21. ⫽ { resource = ../resources/kubo-version.dhall
  22. , params = Some [ Prelude.JSON.keyText "pre" "dev" ]
  23. }
  24. )
  25. let buildKuboRelease =
  26. Helpers.taskStep
  27. ( Defaults.TaskStep
  28. ⫽ { task = "build-kubo-release"
  29. , config =
  30. Concourse.TaskSpec.File "git-kubo-ci/tasks/build-kubo-release"
  31. }
  32. )
  33. let generateCompilationManifest =
  34. Helpers.taskStep
  35. ( Defaults.TaskStep
  36. ⫽ { task = "generate-compilation-manifest"
  37. , config =
  38. Concourse.TaskSpec.File
  39. "git-kubo-ci/tasks/generate-compilation-manifest.yml"
  40. }
  41. )
  42. let putCompilationDeployment =
  43. Helpers.putStep
  44. ( Defaults.PutStep
  45. ⫽ { resource = ../resources/compilation-deployment.dhall
  46. , params =
  47. Some
  48. [ Prelude.JSON.keyText
  49. "manifest"
  50. "compilation-manifest/manifest.yml"
  51. , Prelude.JSON.keyText
  52. "source_file"
  53. "gaffer-source-json/source.json"
  54. , Prelude.JSON.keyText
  55. "releases"
  56. "kubo-release/kubo-release-*.tgz"
  57. ]
  58. }
  59. )
  60. let export =
  61. Helpers.taskStep
  62. ( Defaults.TaskStep
  63. ⫽ { task = "export"
  64. , config =
  65. Concourse.TaskSpec.File "git-kubo-ci/tasks/export-release.yml"
  66. , params = Some [ Prelude.JSON.keyText "RELEASE_LIST" "kubo" ]
  67. , input_mapping =
  68. Some
  69. [ Prelude.JSON.keyText "gcs-source-json" "gaffer-source-json" ]
  70. }
  71. )
  72. let putKuboVersion =
  73. Helpers.putStep
  74. ( Defaults.PutStep
  75. ⫽ { resource = ../resources/kubo-version.dhall
  76. , params = Some [ Prelude.JSON.keyText "pre" "dev" ]
  77. }
  78. )
  79. let putKuboReleaseTarballUntested =
  80. Helpers.putStep
  81. ( Defaults.PutStep
  82. ⫽ { resource = ../resources/gcs-kubo-release-tarball-untested.dhall
  83. , params =
  84. Some
  85. [ Prelude.JSON.keyText "file" "compiled-releases/kubo-*.tgz" ]
  86. }
  87. )
  88. in Defaults.Job
  89. ⫽ { name = "build-kubo-release"
  90. , plan =
  91. [ Helpers.aggregateStep
  92. [ ../steps/get-slackers.dhall
  93. , ../steps/get-kubo-ci.dhall
  94. , getKuboDeployment
  95. , getKuboRelease
  96. , getKuboVersion
  97. ]
  98. , buildKuboRelease
  99. , generateCompilationManifest
  100. , putCompilationDeployment
  101. , export
  102. , putKuboVersion
  103. , putKuboReleaseTarballUntested
  104. ]
  105. }