Skip to content
Snippets Groups Projects
Commit 8376d2ea authored by Jonas Gröger's avatar Jonas Gröger :palm_tree:
Browse files

Merge branch 'feature/346-pipeline-config' into 'main'

feat(planning#346): Added minimal ci/cd config

See merge request fit-connect/entwicklungsportal/poc-nextjs!1
parents fc141d6b 4bd88959
No related branches found
No related tags found
1 merge request!1feat(planning#346): Added minimal ci/cd config
.pre-deploy-uber-space-setup: &pre-deploy-uber-space-setup
- apk add rsync openssh-client
- eval $(ssh-agent -s)
- echo "$CI_DEPLOYMENT_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir --mode 700 -p ~/.ssh
- echo "$UBERSPACE_KNOWN_HOST" >> ~/.ssh/known_hosts
cache:
paths:
- node_modules/
stages:
- test
- build
- deploy
.trivy:filesystem:
stage: test
image:
name: $DOCKER_PULL_REGISTRY/aquasec/trivy:latest
entrypoint: [""]
script:
- trivy filesystem --security-checks vuln,config --severity HIGH,CRITICAL --exit-code 1 .
- trivy filesystem --security-checks vuln,config --severity UNKNOWN,LOW,MEDIUM .
build:
stage: build
image: node:lts-alpine
before_script:
- yarn install
script:
- yarn export
artifacts:
paths:
- out/
expire_in: 1 hour
deploy:
stage: deploy
image:
name: alpine:latest
dependencies:
- build
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
before_script:
- *pre-deploy-uber-space-setup
script:
- rsync -rLvz --delete --checksum -e "ssh -o CheckHostIP=no" --ipv4 --progress ./out/. fitko@dorado.uberspace.de:docs-preview.fitko.dev
......@@ -8,7 +8,8 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"preview": "next build && next start"
"preview": "next build && next start",
"export": "next build && next export"
},
"dependencies": {
"@contentful/rich-text-html-renderer": "^15.11.1",
......@@ -27,8 +28,8 @@
"@types/node": "^17.0.12",
"@types/react": "^17.0.38",
"autoprefixer": "^10.4.2",
"contentful-cli": "^1.10.0",
"contentful-migration": "^4.6.1",
"contentful-cli": "^1.12.4",
"contentful-migration": "^4.8.1",
"eslint": "^8.7.0",
"eslint-config-next": "^12.0.9",
"postcss": "^8.4.5",
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment