Skip to content

Commit

Permalink
Update config.yml
Browse files Browse the repository at this point in the history
Shifted common executors. Updated comments.
  • Loading branch information
nhkhai committed Apr 30, 2024
1 parent 593fa31 commit c8815a5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ orbs:
maven: circleci/[email protected]
snyk: snyk/[email protected]

jobs:
build_and_test: # Job name.
executors: # Executors define the environment in which the steps of a job will be run, allowing you to reuse a single executor definition across multiple jobs.
openjdk-with-postgres:
docker: # Environment.
- image: cimg/openjdk:21.0.2
environment:
Expand All @@ -17,6 +17,10 @@ jobs:
POSTGRES_PASSWORD: password # Must not be empty or undefined. It is trust authentication locally (inside the same container) so the password is not actually used.
POSTGRES_DB: the_review_room # This optional environment variable defines the default database created when the image is first started (default is postgres).

jobs:
build_and_test: # Job name.
executor: openjdk-with-postgres

steps:
- checkout # Check out source code to the working directory.
- run: |
Expand All @@ -29,7 +33,7 @@ jobs:
path: target/the-review-room-0.0.1-SNAPSHOT.jar

publish: # Also known as the build-and-push.
executor: docker/docker # Define the execution environment in which the steps of a job will run.
executor: docker/docker

steps:
- checkout
Expand All @@ -44,7 +48,7 @@ jobs:

scan:
docker:
- image: cimg/base:current
- image: cimg/base:current # Define the execution environment in which the steps of a job will run.

environment: # The environment allows us to create an environment for the job and allows us to create custom environment variables.
IMAGE_NAME: nhkhai/the-review-room
Expand Down

0 comments on commit c8815a5

Please sign in to comment.