Date

Attendees

Goals

  • Complete the setup to get:
    • git-server hook to trigger a Jenkins deploy and test multipage code changes
    • Jenkins project deploys the multipage branch to the tssgTechMultipage endpoint
    • Jenkins dev chromeTest project to run automatically after a successful run of the project tssgTech Deploy multipage to nc-nginx tssgTechMultipage

Discussion items

ComponentItemWhoNotes
JoelJoel got a job! Congratulations!
MeetingsNext MeetingAll

Next meeting of Geb and Spock Workshop 18 will be on  at 10:00 AM

Jenkins

Create project to deploy multipage branch


Create project to deploy multipage branch

Copy project from tssgTech Deploy master to nc-nginx:

  • tssgTech Deploy multipage to nc-nginx tssgTechMultipage

    curl http:///ralph:TOKEN@jenkins.technologynursery.org/view/Deploys/job/tssgTech%20Deploy%20multipage%20to%20nc-nginx%20tssgTechMultipage/config.xml >"tssgTech Deploy multipage to nc-nginx tssgTechMultipage.xml"

    • tssgTech Deploy multipage to nc-nginx tssgTechMultipage.xml

      <?xml version='1.1' encoding='UTF-8'?>

      <project>

        <actions/>

        <description>Deploy tssgTech multipage branch to dev environment on nc-nginx:tssgTechMultipage endpoint.</description>

        <keepDependencies>false</keepDependencies>

        <properties/>

        <scm class="hudson.plugins.git.GitSCM" plugin="git@4.0.0-rc">

          <configVersion>2</configVersion>

          <userRemoteConfigs>

            <hudson.plugins.git.UserRemoteConfig>

              <url>ssh://git@technologynursery.org:2222/git-server/repos/tssgTech.git</url>

              <credentialsId>4408849f-5b8b-4a48-842d-1e7d8a86205b</credentialsId>

            </hudson.plugins.git.UserRemoteConfig>

          </userRemoteConfigs>

          <branches>

            <hudson.plugins.git.BranchSpec>

              <name>*/multipage</name>

            </hudson.plugins.git.BranchSpec>

          </branches>

          <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>

          <submoduleCfg class="list"/>

          <extensions>

            <hudson.plugins.git.extensions.impl.WipeWorkspace/>

          </extensions>

        </scm>

        <canRoam>true</canRoam>

        <disabled>false</disabled>

        <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>

        <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>

        <authToken>buildMe</authToken>

        <triggers/>

        <concurrentBuild>false</concurrentBuild>

        <builders>

          <hudson.tasks.Shell>

            <command>echo &quot;*** Deploy the multipage branch to tssgTechMultipage endpoint&quot;


      targetSite=&quot;tssgTechMultipage&quot;


      # Return the md5sum of the targetSite directory in nc-nginx

      md5sumTargetSite () {

        # $1 = targetSite

        ssh s14 &quot;docker exec nc-nginx find /usr/share/nginx/html/$1 \

                   -type f \

                   -exec md5sum {} \; | md5sum&quot; | gawk &apos;{print $1}&apos;

      }


      git status

      mv site ${targetSite}

      tree


      echo &quot;*** Copy source to a /tmp/ folder&quot;

      rsync -a ${targetSite} s14:/tmp/


      echo &quot;*** Get md5sum of old folder&quot;

      oldTargetSum=$( md5sumTargetSite ${targetSite} )


      echo &quot;*** Clean target folder by removing the old folder&quot;

      ssh s14 &quot;docker exec nc-nginx rm -rf /usr/share/nginx/html/${targetSite}&quot;


      echo &quot;*** Copy source to nc-nginx&quot;

      ssh s14 &quot;docker cp /tmp/${targetSite} nc-nginx:/usr/share/nginx/html/&quot;


      echo &quot;*** Get md5sum of new folder&quot;

      newTargetSum=$( md5sumTargetSite ${targetSite} )


      echo &quot;*** Cleanup tmp folder&quot;

      ssh s14 &quot;cd /tmp ; rm -rf ${targetSite} ; ls /tmp/&quot;


      echo &quot;*** Compare that the old and new md5sums are different&quot;

      [ &quot;${oldTargetSum}&quot; != &quot;${newTargetSum}&quot; ]</command>

          </hudson.tasks.Shell>

        </builders>

        <publishers>

          <hudson.tasks.Mailer plugin="mailer@1.23">

            <recipients>ralph@navarrocomputing.com</recipients>

            <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>

            <sendToIndividuals>false</sendToIndividuals>

          </hudson.tasks.Mailer>

        </publishers>

        <buildWrappers/>

      </project>

 s14Disable publishing the multipage branch within cron job script tssgTech.deploy

tssgTech.deploy

  • Comment out deploy multipage branch to tssgTechMultipage endpoint

    This prevents deploying every 5 minutes.

  • Commit tools/tssgTech.deploy changes to multipage branch
git-server

Trigger Jenkins deploy project in git hook repos/tssgTech.git/hooks/post-receive

  • Modify post-receive hook to trigger Jenkins Project tssgTech Deploy multipage to nc-nginx tssgTechMultipage
  • Commit to multipage branch
    • tools/git-hooks/post-receive
Jenkins

Modify Geb and Spock project to trigger after upstream deploy project completes successfully

dev chromeTest

References

Action items

  • Create project to deploy multipage branch
  • Disable publishing the multipage branch within cron job script tssgTech.deploy
  • Trigger Jenkins deploy project in git hook repos/tssgTech.git/hooks/post-receive
  • Modify Geb and Spock project to trigger after upstream deploy project completes successfully