conventionschedule-pwa/.drone.yml

65 lines
2.1 KiB
YAML
Raw Permalink Normal View History

2020-08-30 10:57:12 +00:00
kind: pipeline
2023-08-10 01:22:44 +00:00
type: exec
2020-08-30 10:57:12 +00:00
name: default
clone:
depth: 50
steps:
2023-08-10 01:22:44 +00:00
- name: analyze
environment:
SONAR_TOKEN:
from_secret: sonar_token
commands:
- if [[ -z "$(curl -s https://qa.adlerneves.com | grep '502 Bad Gateway')" ]]; then /opt/sonar-scanner/bin/sonar-scanner -Dsonar.login=$$SONAR_TOKEN ; fi
2020-08-30 10:57:12 +00:00
- name: submodules
2023-08-10 01:22:44 +00:00
depends_on:
- analyze
2020-08-30 10:57:12 +00:00
commands:
2023-08-10 01:22:44 +00:00
- git config --global url.https://git.adlerneves.com/.insteadOf "gitea@git.adlerneves.com:"
- git submodule update --init --recursive --remote
2023-08-23 23:59:41 +00:00
- name: devclean
2020-08-30 10:57:12 +00:00
depends_on:
- submodules
2023-08-23 23:59:41 +00:00
commands:
- rm nextjs/public/*.ico
- rm nextjs/public/*.png
2023-08-24 17:16:06 +00:00
- rm nextjs/public/own-config.json
2023-08-23 23:59:41 +00:00
- name: build
depends_on:
- devclean
2020-08-30 10:57:12 +00:00
commands:
- echo "Nothing to do..."
2023-08-21 02:05:17 +00:00
- static-site-server-rs -c local/sites/site_furmeet_pwa/files/index.htmltpl
2023-08-23 23:59:41 +00:00
- static-site-server-rs -c nextjs/public/own-config.jsontpl
- static-site-server-rs -c nextjs/public/manifest.jsontpl
- rm local/sites/site_furmeet_pwa/files/index.htmltpl
- rm nextjs/public/own-config.jsontpl
- rm nextjs/public/manifest.jsontpl
2023-08-24 00:07:37 +00:00
- cd nextjs
- npm install
- npm run build
- cd ..
2020-08-30 10:57:12 +00:00
- name: deploy
depends_on:
- build
commands:
2023-08-21 02:05:17 +00:00
- sudo rm -rf /var/lib/static-site-server-rs/sites/site_furmeet_pwa
2023-08-10 01:22:44 +00:00
- sudo mkdir -p /var/lib/static-site-server-rs/sites/site_furmeet_pwa/files
- sudo cp -R local/sites/site_furmeet_pwa/files/. /var/lib/static-site-server-rs/sites/site_furmeet_pwa/files/.
- sudo install -m 644 -T local/sites/site_furmeet_pwa/site.yaml /var/lib/static-site-server-rs/sites/site_furmeet_pwa/site.yaml
2023-08-23 23:59:41 +00:00
- sudo rm -rf /var/lib/static-site-server-rs/sites/site_furmeet_pwa/files
- sudo mkdir -p /var/lib/static-site-server-rs/sites/site_furmeet_pwa/files
- sudo cp -R nextjs/out/. /var/lib/static-site-server-rs/sites/site_furmeet_pwa/files/.
2023-08-10 01:22:44 +00:00
- sudo chown http:http -R /var/lib/static-site-server-rs/sites/site_furmeet_pwa
2020-08-30 10:57:12 +00:00
- name: reload
depends_on:
- deploy
commands:
- sudo touch /var/lib/static-site-server-rs/routes.yaml