👷 Use of the CI to deliver a new image on each commit (temp)
All checks were successful
ci/woodpecker/push/dockerize Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful

This commit is contained in:
2024-04-15 22:04:25 +02:00
parent d4af06d687
commit 6f95e0f57b
4 changed files with 53 additions and 10 deletions

5
.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
# .git directory is not filtered here: we need to copy the .git directory in the builder image to compute the version.
dist
medias
README.md
target

25
.woodpecker/.deploy.yaml Normal file
View File

@@ -0,0 +1,25 @@
steps:
deploy:
image: euryecetelecom/woodpeckerci-kubernetes
settings:
kubernetes_server:
from_secret: kubernetes_server
kubernetes_token:
from_secret: kubernetes_token
kubernetes_cert:
from_secret: kubernetes_cert
namespace: bg92
wait: true
wait_timeout: 60s
force: true
deployment: beau-gosse-du-92-web
repo: rg.fr-par.scw.cloud/asr-projects/beau-gosse-du-92-web
container: beau-gosse-du-92-web
tag: ${CI_COMMIT_SHA}
secrets:
- kubernetes_cert
- kubernetes_server
- kubernetes_token
depends_on:
- dockerize

View File

@@ -0,0 +1,14 @@
# when:
# - branch: ${CI_REPO_DEFAULT_BRANCH}
steps:
dockerize:
image: woodpeckerci/plugin-kaniko
settings:
registry: rg.fr-par.scw.cloud
repo: asr-projects/beau-gosse-du-92-web
tags: ${CI_COMMIT_SHA}
auto_tag: true
username: nologin
password:
from_secret: registry-password

View File

@@ -1,18 +1,17 @@
FROM rust:latest AS builder FROM rust:latest AS builder
ARG JOBS_NB=${JOBS_NB:-default}
# Disable incremental compilation
# Cf. https://doc.rust-lang.org/cargo/reference/profiles.html#incremental
ARG CARGO_INCREMENTAL=0
WORKDIR /usr/src/beau-gosse-du-92 WORKDIR /usr/src/beau-gosse-du-92
RUN cargo install dioxus-cli COPY . .
COPY Cargo.* . RUN cargo install -j ${JOBS_NB} dioxus-cli
COPY ./src ./src RUN dx build -r --platform web -- -j ${JOBS_NB}
COPY ./public ./public
COPY ./Dioxus.toml .
COPY ./build.rs .
COPY ./.cargo ./.cargo
RUN ln -s ./public/index.html ./index.html \
&& dx build -r --platform web
FROM nginx:mainline-alpine-slim FROM nginx:mainline-alpine-slim