Skip to content

Commit

Permalink
chore: Update Woodpecker configuration and pipeline steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Codycody31 committed Oct 4, 2023
1 parent 78c275a commit c168300
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
when:
event: [push, tag, pull_request]
branch:
- main
- release/*
path:
exclude: ["README.md", "LICENSE", ".github", ".gitignore"]

variables:
- &node_image "node:18"
- &buildx_image "woodpeckerci/plugin-docker-buildx"
Expand All @@ -12,27 +20,27 @@ services:
ports:
- 27017:27017

pipeline:
- name: Generate version file
steps:
Generate version file:
image: alpine/git
commands:
- git describe --always --tags > version

- name: Install Backend Dependencies
Install Backend Dependencies:
image: *node_image
commands:
- cd backend
- npm install
- cd ..

- name: Install Frontend Dependencies
Install Frontend Dependencies:
image: *node_image
commands:
- cd frontend
- npm install
- cd ..

- name: Test Backend
Test Backend:
image: *node_image
environment:
SESSION_SECRET: 64ee54e91d5ea65c2fff46f7bf0d6b2c
Expand All @@ -47,28 +55,28 @@ pipeline:
- npm test
- cd ..

- name: Test Frontend
Test Frontend:
image: *node_image
commands:
- cd frontend
- npm run test:unit
- cd ..

- name: Lint Backend
Lint Backend:
image: *node_image
commands:
- cd backend
- npm run lint
- cd ..

- name: Lint Frontend
Lint Frontend:
image: *node_image
commands:
- cd frontend
- npm run lint
- cd ..

- name: Deploy to Docker Hub
Deploy to Docker Hub:
image: *buildx_image
secrets: [docker_username, docker_password]
settings:
Expand All @@ -79,7 +87,7 @@ pipeline:
when:
event: push

- name: Deploy Tagged Version
Deploy Tagged Version:
image: *buildx_image
secrets: [docker_username, docker_password]
settings:
Expand All @@ -90,7 +98,7 @@ pipeline:
when:
event: tag

- name: Deploy Pull Request
Deploy Pull Request:
image: *buildx_image
secrets: [docker_username, docker_password]
settings:
Expand All @@ -100,6 +108,3 @@ pipeline:
tag: pull_${CI_COMMIT_PULL_REQUEST}
when:
event: pull_request

branches: [main]
ignore_paths: [README.md, LICENSE, .github, .gitignore]

0 comments on commit c168300

Please sign in to comment.