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

feat(ci): include build numbers in container envars #1528

Merged
merged 6 commits into from
Aug 16, 2024
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
4 changes: 4 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN ./mvnw -B package -Pnative -DskipTests
FROM gcr.io/distroless/java-base:nonroot AS deploy
ARG PORT=8090

# Receive build number as argument, retain as environment variable
ARG BUILD_NUMBER
ENV BUILD_NUMBER=${BUILD_NUMBER}

# Copy
WORKDIR /app
COPY --from=build /app/target/nr-spar-backend ./nr-spar-backend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,9 @@ public SeedlotAclassFormDto getAclassSeedlotFormInfo(@NonNull String seedlotNumb
owner.getOriginalPercentageOwned(),
owner.getOriginalPercentageReserved(),
owner.getOriginalPercentageSurplus(),
owner.getMethodOfPayment().getMethodOfPaymentCode(),
owner.getMethodOfPayment() != null
? owner.getMethodOfPayment().getMethodOfPaymentCode()
: null,
owner.getFundingSourceCode()))
.collect(Collectors.toList());

Expand All @@ -598,9 +600,7 @@ public SeedlotAclassFormDto getAclassSeedlotFormInfo(@NonNull String seedlotNumb
seedlotOrchards.stream().filter(so -> so.getIsPrimary()).toList();

primaryOrchardId =
filteredPrimaryOrchard.isEmpty()
? null
: filteredPrimaryOrchard.get(0).getOrchardId();
filteredPrimaryOrchard.isEmpty() ? null : filteredPrimaryOrchard.get(0).getOrchardId();
}

Optional<String> secondaryOrchardId = Optional.empty();
Expand Down
4 changes: 4 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ RUN npm ci --ignore-scripts --no-update-notifier --omit=dev && \
FROM caddy:2.8.4-alpine
RUN apk add --no-cache ca-certificates curl

# Receive build number as argument, retain as environment variable
ARG BUILD_NUMBER
ENV BUILD_NUMBER=${BUILD_NUMBER}

# Copy files and run formatting
COPY --from=build /app/build/ /app/dist
COPY Caddyfile /etc/caddy/Caddyfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,8 @@ const SeedlotReviewContent = () => {
: null
}
{
// this and its related code such as createDraftForPendMutation
// needs to be deleted in the future
(luxon.local().setZone('America/Vancouver').toISODate() ?? '' < '2024-08-17')
? (
<Row className="action-button-row">
Expand Down
4 changes: 4 additions & 0 deletions oracle-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ RUN ./mvnw package -Pnative -DskipTests -Dskip.unit.tests=true && \
### Deployer
FROM eclipse-temurin:17.0.11_9-jdk-jammy AS deploy

# Receive build number as argument, retain as environment variable
ARG BUILD_NUMBER
ENV BUILD_NUMBER=${BUILD_NUMBER}

# Java vars
ENV LANG=en_CA.UTF-8
ENV LANGUAGE=en_CA.UTF-8
Expand Down
Loading