fix(drone): add rustfmt, fix apt-get, remove deploy-configmap step
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
28156bdda4
commit
a8af6a0558
36
.drone.yml
36
.drone.yml
@ -3,6 +3,7 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
disable: true
|
disable: true
|
||||||
|
|
||||||
@ -30,46 +31,43 @@ steps:
|
|||||||
- name: rust-fmt
|
- name: rust-fmt
|
||||||
image: rust:1.94
|
image: rust:1.94
|
||||||
commands:
|
commands:
|
||||||
|
- rustup component add rustfmt
|
||||||
- cargo fmt --all -- --check
|
- cargo fmt --all -- --check
|
||||||
|
|
||||||
- name: rust-clippy
|
- name: rust-clippy
|
||||||
image: rust:1.94
|
image: rust:1.94
|
||||||
commands:
|
commands:
|
||||||
- apt-get update && apt-get install -y --no-install-recommends \
|
- apt-get update && apt-get install -y --no-install-recommends pkg-config libssl-dev libclang-dev libgit2-dev zlib1g-dev
|
||||||
pkg-config libssl-dev libclang-dev libgit2-dev zlib1g-dev
|
|
||||||
- rustup component add clippy
|
- rustup component add clippy
|
||||||
- cargo clippy --workspace --all-targets -- -D warnings
|
- cargo clippy --workspace --all-targets -- -D warnings
|
||||||
|
|
||||||
- name: rust-test
|
- name: rust-test
|
||||||
image: rust:1.94
|
image: rust:1.94
|
||||||
commands:
|
commands:
|
||||||
- apt-get update && apt-get install -y --no-install-recommends \
|
- apt-get update && apt-get install -y --no-install-recommends pkg-config libssl-dev libclang-dev libgit2-dev zlib1g-dev
|
||||||
pkg-config libssl-dev libclang-dev libgit2-dev zlib1g-dev
|
|
||||||
- cargo test --workspace --all-features
|
- cargo test --workspace --all-features
|
||||||
|
|
||||||
- name: frontend-deps
|
- name: frontend-deps
|
||||||
image: node:22-alpine
|
image: node:22-alpine
|
||||||
commands:
|
commands:
|
||||||
- corepack enable
|
- cd apps/frontend && corepack enable && corepack prepare pnpm@10 --activate && pnpm install --frozen-lockfile
|
||||||
- corepack prepare pnpm@10 --activate
|
|
||||||
- pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: frontend-lint
|
- name: frontend-lint
|
||||||
image: node:22-alpine
|
image: node:22-alpine
|
||||||
commands:
|
commands:
|
||||||
- pnpm lint
|
- cd apps/frontend && pnpm lint
|
||||||
depends_on: [ frontend-deps ]
|
depends_on: [ frontend-deps ]
|
||||||
|
|
||||||
- name: frontend-typecheck
|
- name: frontend-typecheck
|
||||||
image: node:22-alpine
|
image: node:22-alpine
|
||||||
commands:
|
commands:
|
||||||
- pnpm tsc -b --noEmit
|
- cd apps/frontend && pnpm tsc -b --noEmit
|
||||||
depends_on: [ frontend-lint ]
|
depends_on: [ frontend-lint ]
|
||||||
|
|
||||||
- name: frontend-build
|
- name: frontend-build
|
||||||
image: node:22-alpine
|
image: node:22-alpine
|
||||||
commands:
|
commands:
|
||||||
- pnpm build
|
- cd apps/frontend && pnpm build
|
||||||
depends_on: [ frontend-typecheck ]
|
depends_on: [ frontend-typecheck ]
|
||||||
|
|
||||||
- name: docker-login
|
- name: docker-login
|
||||||
@ -119,22 +117,6 @@ steps:
|
|||||||
- echo "${KUBECONFIG}" | base64 -d > ~/.kube/config
|
- echo "${KUBECONFIG}" | base64 -d > ~/.kube/config
|
||||||
- chmod 600 ~/.kube/config
|
- chmod 600 ~/.kube/config
|
||||||
|
|
||||||
- name: create-namespace
|
|
||||||
image: bitnami/kubectl:latest
|
|
||||||
commands:
|
|
||||||
- kubectl create namespace gitdataai --dry-run=client -o yaml | kubectl apply -f -
|
|
||||||
depends_on: [ prepare-kubeconfig ]
|
|
||||||
when:
|
|
||||||
branch: [ main ]
|
|
||||||
|
|
||||||
- name: deploy-configmap
|
|
||||||
image: bitnami/kubectl:latest
|
|
||||||
commands:
|
|
||||||
- kubectl apply -f deploy/configmap.yaml
|
|
||||||
depends_on: [ create-namespace ]
|
|
||||||
when:
|
|
||||||
branch: [ main ]
|
|
||||||
|
|
||||||
- name: helm-deploy
|
- name: helm-deploy
|
||||||
image: alpine/helm:latest
|
image: alpine/helm:latest
|
||||||
commands:
|
commands:
|
||||||
@ -159,7 +141,7 @@ steps:
|
|||||||
--wait \
|
--wait \
|
||||||
--timeout 5m \
|
--timeout 5m \
|
||||||
--atomic
|
--atomic
|
||||||
depends_on: [ deploy-configmap ]
|
depends_on: [ prepare-kubeconfig ]
|
||||||
when:
|
when:
|
||||||
status: [ success ]
|
status: [ success ]
|
||||||
branch: [ main ]
|
branch: [ main ]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user