AWS CodeBuild Buildspec.yml example for Gradle and a Micronaut Application
I often use AWS CodeBuild as my continuous integration service.
I use such a
A buildspec is a collection of build commands and related settings, in YAML format, that CodeBuild uses to run a build.
version: 0.2 phases: install: runtime-versions: java: corretto11 build: commands: - ./gradlew build --scan post_build: finally: - rm -f /root/.gradle/caches/modules-2/modules-2.lock - rm -fr /root/.gradle/caches/*/plugin-resolution/ artifacts: files: - '*-all.jar' base-directory: 'build/libs' cache: paths: - '/root/.gradle/caches/**/*' - '/root/.gradle/wrapper/**/*'
My builds include the Gradle Scan plugin.
Because of that I can include the argument
--scan which publishes a build scan. An available build scan makes easy to investigate build failures (access tests reports etc).
My next events:
🗓 May 27 09:00 AWS Dublin - Micronaut and AWS Lambda
🗓 Jul 20 09:00 Workshop Security in the Micronaut Framework
🗓 Sep 20 09:00 JCON Online 2022 - Getting Started with the Micronaut Framework
🗓 Sep 23 09:00 JCON Online 2022 - Micronaut® Framework and Microstream Java-native persistence engine