-
Notifications
You must be signed in to change notification settings - Fork 14
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
Release using github actions #294
base: main
Are you sure you want to change the base?
Changes from 2 commits
49b7c16
47263e7
1c298ad
9f910ff
3cbda4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
on: | ||
push: | ||
tags: | ||
- ccdscan/* | ||
|
||
jobs: | ||
release-base-image: | ||
uses: concordium/.github/.github/workflows/docker-release-workflow.yaml@main | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer not to have this sort of abstraction, since it is moving logic somewhere else, and it now adds requirements on how secrets are named. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do not have to fix the entire organisations release flow using this generalisation. We have certain release flow, they seem much alike, lets ensure consistency. I do want us to come into a repository and know how we release in this repository. We have not been consistent in the past. Furthermore such generalisation would ease the use of shared components in the future such as smoke test etc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want the content which differ: And yes fixing secrets namings helps us. The next thing I am going to do is to automate this secrets generation from within terraform. Then it helps that we have fixed docker secrets so I do not have to guess on the name. https://github.com/Concordium/concordium-infra-terraform/blob/main/iam/ghactions.tf We can extend the repository with the docker repositories that we need access to from within a git repository. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would much rather have the release flow in this repo rather than code golfing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on the talk we had we came to the conclusion that the already migrated jobs would be reusable workflows and the new ones would be copy pasting. That means that this should be fine for now. |
||
with: | ||
SERVICE_NAME: "ccdscan" | ||
BUILD_ARGS: | | ||
DOTNET_VERSION=6.0 | ||
DOCKER_FILE_PATH: backend/Dockerfile | ||
secrets: inherit |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bookworm-slim AS base | ||
ARG DOTNET_VERSION | ||
FROM mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-bookworm-slim AS base | ||
WORKDIR /app | ||
EXPOSE 5000 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim AS publish | ||
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-bookworm-slim AS publish | ||
RUN apt-get update && apt-get install -y build-essential | ||
# Installing Rust to build Concordium.Sdk. | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.80 --profile minimal -y | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
WORKDIR /src | ||
COPY . . | ||
COPY ./backend . | ||
RUN dotnet publish Application -c Release -o /app/publish | ||
|
||
FROM base AS final | ||
# Install 'ca-certificates' for supporting HTTPS. | ||
RUN apt-get update && apt-get install ca-certificates && rm -rf /var/lib/apt/lists/* | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
LABEL dotnet_version=${DOTNET_VERSION} | ||
ENV ASPNETCORE_URLS=http://+:5000 | ||
ENTRYPOINT ["dotnet", "Application.dll"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far we have tagged backend releases using
backend/*
.But I see the consistency in tags being named the same as the tag on the image.