Lexical Tools

Lexical Tools - CI-CD Processes

This pages describes the high-level CI-CD commands and processes on Lexical Tools annual releases

  • Files
    • .gitlab-ci.yml
      => defines CI-CD pipeline process - build, packLite, packFull
    • Makefile
      => a file called by ./gitlab-ci to define tasks on all phases in the CI-CD pipeline
      • build: use maven to build lvg
      • packLite: pack lite (min.) Lvg to lvgLite${YEAR}.tgz
      • packFull: pack full Lvg to lvg${YEAR}.tgz
    • pom.xml
      => used by maven to build the software
    • build.xml
      => used by ant to build the software (used in the development build)

  • Variables
    • pom.xml
      • version:
        • use ${YEAR}.0-SNAPSHOT for snapshot build
        • use ${YEAR}.0 for official release build
          => delete artifact (*.jar) of ${YEAR}.0 in Nexus -> lhc-lexicon-maven-release -> gov -> nih -> nlm -> lvg -> ${YEAR}.0 (before use mvn for release build)
          => for snapshot development build is ok
    • packLite & packFull:
      • ${VERSION}
        • updated in the Makefile
      • Other enviroment variables. For use Git and CiCd, they are deinfed in the environment variables (for linux) or in Git-> Lexicon -> Setting -> CI/CD -> Variables -> Reveal Values
        Variable namefunctionNotes
        ${LVG_PACK}pack lvg${YEAR}lite.tgz and lvg${YEAR}.tgz
        • TRUE: default
        ${LVG_UPLOAD}upload to Nexus
        • FALSE: development (default)
        • TRUE: release
        • Used for Website download and WebLvg
          • if the *.tgz files exist in the Nexus, the upload will be failed.
          • delete artifact (*.tgz) of ${YEAR} in Nexus -> lhc-lexicon-raw -> www -> lvg -> ${YEAR} (before use mvn for release build)
          • delete artifacts of the *.jar (release files) for deploying the same release version.
          • for snapshot development build is ok
        ${LVG_MVN_SNAPSHOT}snapshot build
        • TRUE: development (default)
        • FALSE: release
        ${LVG_MVN_JAR}Use mvn to build
        • TRUE: maven build
        • FALSE: ant build (default)
    • Quick CiCd variable setup
      Variable nameDevelopmentRelease
      ${LVG_PACK}FALSETRUE
      ${LVG_UPLOAD}FALSETRUE
      ${LVG_MVN_SNAPSHOT}TRUEFALSE
      ${LVG_MVN_JAR}FALSETRUE

    • For the release, need to remove the following assets in the Nexus before a new (final) Ci-Cd build
      • ${NEXUS_URL}/repository/lhc-lexicon-cwmaven-releases/gov/nih/nlm/lvg/${YEAR}.0/
        • lvg-${YEAR}.0.jar
        • ...
      • ${NEXUS_URL}/repository/lhc-lexicon-raw/www/lvg/${YEAR}/lvg${YEAR}
        • lvg${YEAR}.tgz
        • lvg${YEAR}lite.tgz

  • Porcesses
    => for both development and master branches in git
    • shell> git branch
      • check which branch is on
    • shell> git checkout develop
      • Use "develop" for development
      • development uses snapshot build
    • shell> git checkout master
    • shell> git merge develop
    • For officeail relese, delete 2 folders in the LHC-nexus as described above

    • shell> git add -A
    • shell> git commit -m "LEX_.."
    • shell> git push origin
      • save the significant development and final offical release to master
    • shell> git tag -a v.${YEAR}.0.0.0 -m "msg" (tag the version)
    • shell> git tag (show all tags)
    • shell> git tag -a v.${YEAR}.0.0.0 -m "msg"
    • shell> git push origin tagName (push a tag to remote origin)
    • shell> git push origin -- tags (pushshow all tags to remote origin)
      • tag for offical release (v.${YEAR}.0.0.0)

    • shell> git add -A
    • shell> git commit -m "LEX_XXX, msg"
    • shell> git push
      => check if the Git CI/CD pipeline pass
      => use script downloadFiles ${YEAR} TRUE to download *.tgz
      • lvg${YEAR}.tgz => unit test, platform test, performance test, etc.
      • lvgLite${YEAR}.tgz => lite test