Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDPS-1086: Installing RDS root cert into java truststore #4

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 25 additions & 20 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ jobs:
secrets: inherit
with:
environment: ${{ matrix.environments }}

kotlin_validate:
name: Validate the kotlin
uses: ministryofjustice/hmpps-github-actions/.github/workflows/kotlin_validate.yml@v2 # WORKFLOW_VERSION
secrets: inherit

build:
name: Build docker image from hmpps-github-actions
if: github.ref == 'refs/heads/main'
Expand All @@ -53,6 +55,7 @@ jobs:
additional_docker_tag: ${{ inputs.additional_docker_tag }}
push: ${{ inputs.push || true }}
docker_multiplatform: true

deploy_dev:
name: Deploy to the development environment
needs:
Expand All @@ -63,23 +66,25 @@ jobs:
with:
environment: 'development'
app_version: '${{ needs.build.outputs.app_version }}'
# deploy_preprod:
# name: Deploy to pre-production environment
# needs:
# - build
# - deploy_dev
# uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2 # WORKFLOW_VERSION
# secrets: inherit
# with:
# environment: 'preprod'
# app_version: '${{ needs.build.outputs.app_version }}'
# deploy_prod:
# name: Deploy to production environment
# needs:
# - build
# - deploy_preprod
# uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2 # WORKFLOW_VERSION
# secrets: inherit
# with:
# environment: 'production'
# app_version: '${{ needs.build.outputs.app_version }}'

deploy_preprod:
name: Deploy to pre-production environment
needs:
- build
- deploy_dev
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2 # WORKFLOW_VERSION
secrets: inherit
with:
environment: 'preprod'
app_version: '${{ needs.build.outputs.app_version }}'

deploy_prod:
name: Deploy to production environment
needs:
- build
- deploy_preprod
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2 # WORKFLOW_VERSION
secrets: inherit
with:
environment: 'production'
app_version: '${{ needs.build.outputs.app_version }}'
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" > /etc/timezo
RUN addgroup --gid 2000 --system appgroup && \
adduser --uid 2000 --system appuser --gid 2000

# Install AWS RDS Root cert into Java truststore
RUN mkdir /home/appuser/.postgresql
ADD --chown=appuser:appgroup https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem /home/appuser/.postgresql/root.crt

WORKDIR /app
COPY --from=builder --chown=appuser:appgroup /app/build/libs/hmpps-health-and-medication-api*.jar /app/app.jar
COPY --from=builder --chown=appuser:appgroup /app/build/libs/applicationinsights-agent*.jar /app/agent.jar
Expand Down
Loading