I have an existing buildspec file to be used in a code pipeline. It's using gradle to generate the JAR file. In codebuild, the artifacts are zipped up to be placed into S3.
I saw an article that says if we provide a metadata called "codepipeline-artifact-revision-summary" it will provide a more helpful output in the code pipeline display.
The buildspec reference syntax doesn't seem to provide this option.
How should I get the metadata in the artifacts stage?
version: 0.2
phases:
install:
runtime-versions:
java: corretto8
commands:
- echo Entered the install phase...
- apt-key adv --refresh-keys --keyserver hkp://keyserver.ubuntu.com:80
- apt-get update -y
- wget https://services.gradle.org/distributions/gradle-5.0-bin.zip -P /tmp
- mkdir /opt/gradle
- unzip -d /opt/gradle /tmp/gradle-*.zip
build:
commands:
- echo Build commands started on `date`
- /opt/gradle/gradle-5.0/bin/gradle clean build bootJar -x test -Pprofile=prod --refresh-dependencies
- echo Build commands completed on `date`
post_build:
commands:
- echo Post build commands started on `date`
- pwd
- echo Post build commands completed on `date`
artifacts:
files:
- appspec.yml
- build/libs/*.jar
- scripts/**
discard-paths: yes
cache:
paths:
- '/root/.gradle/caches/**/*'