853: Build information in every service/distribution

Test Case #: 853

Test Case Name: Build information in every service/distribution

System: OpenLMIS

Subsystem: Requisition, Template - service, Example, Auth

Test case designed by: Anna Czyrko

Design Date:24.08.2016

Short description

Acceptance

  • Propose build number format/scheme to community
  • Propose strategy to include the build # as part of the build output (e.g. in a "version" file). Build info should include a build #, branch and time stamp
  • Ensure that upon official builds (i.e. in Jenkins), the approved build info is recorded in the build artifacts
  • The build information should be retrievable via the API, either in the serviceSignature or separate endpoint

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

openlmis-example repository

1

open Jenkins: http://build.openlmis.org/. Search Project OpenLMIS-example.

 

2Open version.properties file, which in Last Successful Artifacts section.

Remember all data included inn version.properties file.
3

Run docker:

docker-compose run -e BUILD_NUMBER=10 -e GIT_BRANCH=master --service-ports example

  
4

then run:

gradle clean generateBuildInfo build

Remember data from version.properties from: build >> libs >> openlmis-example-0.0.1.jar >> version.properties.
5enter exit in console. In docker-compose.override.yml change from dev for example.  
6

Next change image in docker-compose.override from dev to requisition and run:

docker-compose -f docker-compose.builder.yml build image
docker-compose run --service-ports example


  
7Generate token in Postman.  
8In browser enter: localhost:8080/version?access_token= <generated token>Compere if generated data in steps 2,4 and 8 are these same.

openlmis-requisition repository

1

open Jenkins: http://build.openlmis.org/. Search Project OpenLMIS-requisition-service.

 
2Open version.properties file, which in Last Successful Artifacts section.

Remember all data included inn version.properties file.
3

Run docker:

docker-compose run -e BUILD_NUMBER=10 -e GIT_BRANCH=master --service-ports requisition

  
4

then run:

gradle clean generateBuildInfo build

Remember data from version.properties from: build >> libs >> openlmis-example-0.0.1.jar >> version.properties.
5enter exit in console. In docker-compose.override.yml change from dev for requisition.  
6

Next change image in docker-compose.override from dev to requisition and run:

docker-compose -f docker-compose.builder.yml build image
docker-compose run --service-ports requisition
  
7Generate token in Postman.  
8In browser enter: localhost:8080/version?access_token= <generated token>

Compere if generated data in steps 2,4 and 8 are these same.

openlmis-template-service repository

1

open Jenkins: http://build.openlmis.org/. Search Project OpenLMIS-template-service.

 
2Open version.properties file, which in Last Successful Artifacts section.

Remember all data included inn version.properties file.
3

Run docker:

docker-compose run -e BUILD_NUMBER=10 -e GIT_BRANCH=master --service-ports template-service

  
4

then run:

gradle clean generateBuildInfo build

Remember data from version.properties from: build >> libs >> openlmis-example-0.0.1.jar >> version.properties.
5enter exit in console. In docker-compose.override.yml change from dev for template-service.  
6

Next change image in docker-compose.override from dev to requisition and run:

docker-compose -f docker-compose.builder.yml build image
docker-compose run --service-ports template-service
  
7Generate token in Postman.  
8In browser enter: localhost:8080/version?access_token= <generated token>

Compere if generated data in steps 2,4 and 8 are these same.
openlmis-auth repository
1open Jenkins: http://build.openlmis.org/. Search Project OpenLMIS-auth-service.

 
2Open version.properties file, which in Last Successful Artifacts section.

Remember all data included inn version.properties file.
3

Run docker:

docker-compose run -e BUILD_NUMBER=10 -e GIT_BRANCH=master --service-ports template-service

  
4

then run:

gradle clean generateBuildInfo build

Remember data from version.properties from: build >> libs >> openlmis-example-0.0.1.jar >> version.properties.
5enter exit in console. In docker-compose.override.yml change from dev for template-service.  
6

Next change image in docker-compose.override from dev to requisition and run:

docker-compose -f docker-compose.builder.yml build image
docker-compose run --service-ports template-service
  
7Generate token in Postman.  
8In browser enter: localhost:8080/version?access_token= <generated token>

Compere if generated data in steps 2,4 and 8 are these same.

 

Post – conditions:

                                                                                                                   

OpenLMIS: the global initiative for powerful LMIS software