|
@@ -1,66 +0,0 @@
|
|
-kind: pipeline
|
|
|
|
-name: default
|
|
|
|
-
|
|
|
|
-clone:
|
|
|
|
- skip_verify: true
|
|
|
|
-
|
|
|
|
-volumes:
|
|
|
|
-- name: output
|
|
|
|
- host:
|
|
|
|
- path: /var/www/Website
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-steps:
|
|
|
|
-- name: build and publish
|
|
|
|
- image: mcr.microsoft.com/dotnet/core/sdk:3.1
|
|
|
|
- volumes:
|
|
|
|
- - name: output
|
|
|
|
- path: /output
|
|
|
|
- environment:
|
|
|
|
- ConnectionString:
|
|
|
|
- from_secret: ConnectionString
|
|
|
|
- BlogEndpoint:
|
|
|
|
- from_secret: BlogEndpoint
|
|
|
|
- GitEndpoint:
|
|
|
|
- from_secret: GitEndpoint
|
|
|
|
- AuthEndpoint:
|
|
|
|
- from_secret: AuthEndpoint
|
|
|
|
- AuthApiKey:
|
|
|
|
- from_secret: AuthApiKey
|
|
|
|
- MailboxEndpoint:
|
|
|
|
- from_secret: MailboxEndpoint
|
|
|
|
- commands:
|
|
|
|
- - curl -sL https://deb.nodesource.com/setup_18.x | bash -
|
|
|
|
- - apt-get install -y nodejs
|
|
|
|
- - chmod +x ./build.sh
|
|
|
|
- - ./build.sh
|
|
|
|
- - sed -i "s/<DatabaseConnectionString>/$ConnectionString/g" output/appsettings.json
|
|
|
|
- - sed -i "s/<BlogEndpoint>/$BlogEndpoint/g" output/appsettings.json
|
|
|
|
- - sed -i "s/<GitEndpoint>/$GitEndpoint/g" output/appsettings.json
|
|
|
|
- - sed -i "s/<AuthEndpoint>/$AuthEndpoint/g" output/appsettings.json
|
|
|
|
- - sed -i "s/<AuthApiKey>/$AuthApiKey/g" output/appsettings.json
|
|
|
|
- - sed -i "s/<MailboxEndpoint>/$MailboxEndpoint/g" output/appsettings.json
|
|
|
|
- - cp Infrastructure/website.service output/
|
|
|
|
- - cp -r ./output/* /output
|
|
|
|
-- name: restart service
|
|
|
|
- privileged: true
|
|
|
|
- image: appleboy/drone-ssh
|
|
|
|
- settings:
|
|
|
|
- host: 192.168.1.3
|
|
|
|
- username:
|
|
|
|
- from_secret: ssh_user
|
|
|
|
- password:
|
|
|
|
- from_secret: ssh_password
|
|
|
|
- script:
|
|
|
|
- - systemctl daemon-reload
|
|
|
|
- - service website restart
|
|
|
|
-- name: notify
|
|
|
|
- image: drillster/drone-email
|
|
|
|
- settings:
|
|
|
|
- host: 192.168.1.3
|
|
|
|
- skip_verify: true
|
|
|
|
- from: build@robware.uk
|
|
|
|
- when:
|
|
|
|
- status:
|
|
|
|
- - changed
|
|
|
|
- - failure
|
|
|