https://github.com/blairnangle/openjdk-gradle-terraform
OpenJDK Docker image with Python 3, pip, Gradle, Terraform, Checkov and the AWS CLI tool.
https://github.com/blairnangle/openjdk-gradle-terraform
checkov circleci docker gradle openjdk11 terraform
Last synced: 2 months ago
JSON representation
OpenJDK Docker image with Python 3, pip, Gradle, Terraform, Checkov and the AWS CLI tool.
- Host: GitHub
- URL: https://github.com/blairnangle/openjdk-gradle-terraform
- Owner: blairnangle
- License: mit
- Created: 2020-05-18T17:44:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-19T10:17:00.000Z (about 5 years ago)
- Last Synced: 2025-01-25T11:41:56.558Z (4 months ago)
- Topics: checkov, circleci, docker, gradle, openjdk11, terraform
- Language: Dockerfile
- Homepage: https://hub.docker.com/repository/docker/blairnangle/openjdk-gradle-terraform
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# openjdk-gradle-terraform
[](https://app.circleci.com/pipelines/github/blairnangle/openjdk-gradle-terraform)
OpenJDK Docker image with Python 3, pip, Gradle, Terraform, Checkov and the AWS CLI tool. See [`Dockerfile`](./Dockerfile)
for exact versions.Written with the intention of creating a single, consistent CircleCI container image for Java applications that
deploy their infrastructure with Terraform in the same pipeline (but are not necessarily deployed as containerized
applications).Published via CircleCI to [Docker Hub](https://hub.docker.com/repository/docker/blairnangle/openjdk-gradle-terraform).
## Usage
Simple example of a CircleCI pipeline for a Gradle project `dummy` with a `terraform` subdirectory containing its
infrastructure code that makes use of the [aws-cli orb](https://circleci.com/orbs/registry/orb/circleci/aws-cli) to set
up credentials (using default environment variables configured in CircleCI):```yaml
version: 2.1executors:
openjdk-gradle-terraform:
docker:
- image: blairnangle/openjdk-gradle-terraform:latestorbs:
aws-cli: circleci/[email protected]workflows:
version: 2
build_and_later_some_other_stuff:
jobs:
- build
- infrajobs:
build:
executor: openjdk-gradle-terraform
steps:
- checkout
- run:
name: Build
command: gradle build
infra:
executor: openjdk-gradle-terraform
working_directory: ~/dummy/terraform
steps:
- checkout:
path: ~/dummy
- aws-cli/setup
- run:
name: Initialize
command: terraform init
- run:
name: Validate
command: terraform validate
- run:
name: Check
command: checkov -d .
- run:
name: Plan
command: terraform plan --out plan.tf
- run:
name: Apply
command: terraform apply plan.tf
```The pipeline is basic (does not actually deploy an artifact, for example) and the planning and application of the
Terraform infrastructure should probably be split into separate jobs, but it illustrates the tools that are made
available to CircleCI by using the `blairnangle/openjdk-gradle-terraform` image.## License
Distributed under [MIT License](./LICENSE).