Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a gradle build using buildspec.yml

Tags:

yaml

gradle

build

Is there any way to run a gradle build using buildspec.yml file. buildspec.yml file contains a list of gradle build commands.

like image 584
itgeek Avatar asked Jun 21 '18 01:06

itgeek


1 Answers

Yes its possible, PFB buildspec.yml

version: 0.1

phases:
  install:
   commands:
     - echo Entering install phase...
     - echo Nothing to do now
  build:
    commands:
     - echo Build started on `date`
     - gradle build
artifacts:
  type: zip
  files:
    - 'build/libs/*.jar'

For reference: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html

like image 161
Anksss Avatar answered Nov 15 '22 03:11

Anksss