2023-08-24 16:07:40 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: backend_check
|
|
|
|
image: rust
|
|
|
|
commands:
|
2024-05-14 17:39:35 +00:00
|
|
|
- apt update && apt install -y cmake
|
2023-08-24 16:07:40 +00:00
|
|
|
- rustup component add clippy
|
|
|
|
- cd geneit_backend
|
2023-08-24 16:14:40 +00:00
|
|
|
- cargo clippy -- -D warnings
|
|
|
|
- cargo test
|
2023-08-24 16:07:40 +00:00
|
|
|
|
|
|
|
- name: app_deploy
|
2024-05-15 00:20:34 +00:00
|
|
|
image: node:22
|
2023-08-24 16:07:40 +00:00
|
|
|
environment:
|
|
|
|
AWS_ACCESS_KEY_ID:
|
|
|
|
from_secret: AWS_ACCESS_KEY_ID
|
|
|
|
AWS_SECRET_ACCESS_KEY:
|
|
|
|
from_secret: AWS_SECRET_ACCESS_KEY
|
|
|
|
AWS_DEFAULT_REGION: us-east-1
|
|
|
|
commands:
|
|
|
|
# Build website
|
|
|
|
- cd geneit_app
|
|
|
|
- npm install
|
|
|
|
- GENERATE_SOURCEMAP=false npm run build
|
|
|
|
# Install AWS
|
|
|
|
- curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
|
|
|
- unzip awscliv2.zip
|
|
|
|
- ./aws/install
|
|
|
|
- aws configure set default.s3.signature_version s3v4
|
|
|
|
# Upload to bucket
|
|
|
|
- bash upload_bucket.sh
|