New pipelines...
This commit is contained in:
14
.woodpecker/build.yaml
Normal file
14
.woodpecker/build.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
# PR pipeline: lint, build, test on the branch (separate steps, shared workspace).
|
||||
# Runs when a pull request is opened or updated.
|
||||
# Does not build Docker image or deploy.
|
||||
when:
|
||||
event: pull_request
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: node:20-alpine
|
||||
commands:
|
||||
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
||||
- pnpm run build
|
||||
depends_on:
|
||||
- lint
|
||||
@@ -6,17 +6,7 @@ when:
|
||||
event: [push, tag, manual]
|
||||
|
||||
steps:
|
||||
- name: build-and-test
|
||||
image: node:20-alpine
|
||||
commands:
|
||||
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
||||
- pnpm install --frozen-lockfile || pnpm install
|
||||
- pnpm run lint
|
||||
- pnpm run lint:css
|
||||
- pnpm run build
|
||||
- pnpm test
|
||||
|
||||
- name: build
|
||||
- name: 'Docker image build'
|
||||
image: docker:latest
|
||||
environment:
|
||||
REGISTRY_REPO: git.mifi.dev/mifi-ventures/landing
|
||||
@@ -36,9 +26,11 @@ steps:
|
||||
.
|
||||
- echo "✓ Docker image built successfully"
|
||||
depends_on:
|
||||
- build-and-test
|
||||
- lint
|
||||
- build
|
||||
- test
|
||||
|
||||
- name: push
|
||||
- name: 'Push to registry'
|
||||
image: docker:latest
|
||||
environment:
|
||||
REGISTRY_URL: git.mifi.dev
|
||||
@@ -62,9 +54,9 @@ steps:
|
||||
- docker push $REGISTRY_REPO:latest
|
||||
- echo "✓ Images pushed successfully"
|
||||
depends_on:
|
||||
- build
|
||||
- 'Docker image build'
|
||||
|
||||
- name: deploy
|
||||
- name: 'Trigger Portainer stack redeploy'
|
||||
image: curlimages/curl:latest
|
||||
environment:
|
||||
PORTAINER_WEBHOOK_URL:
|
||||
@@ -82,4 +74,4 @@ steps:
|
||||
fi
|
||||
echo "✓ Portainer redeploy triggered (HTTP $code)"
|
||||
depends_on:
|
||||
- push
|
||||
- 'Push to registry'
|
||||
|
||||
@@ -17,15 +17,3 @@ steps:
|
||||
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
||||
- pnpm run lint
|
||||
- pnpm run lint:css
|
||||
|
||||
- name: build
|
||||
image: node:20-alpine
|
||||
commands:
|
||||
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
||||
- pnpm run build
|
||||
|
||||
- name: test
|
||||
image: node:20-alpine
|
||||
commands:
|
||||
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
||||
- pnpm test
|
||||
15
.woodpecker/test.yaml
Normal file
15
.woodpecker/test.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# PR pipeline: lint, build, test on the branch (separate steps, shared workspace).
|
||||
# Runs when a pull request is opened or updated.
|
||||
# Does not build Docker image or deploy.
|
||||
when:
|
||||
event: pull_request
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: node:20-alpine
|
||||
commands:
|
||||
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
||||
- pnpm test
|
||||
depends_on:
|
||||
- lint
|
||||
- build
|
||||
Reference in New Issue
Block a user