build: 支持构建并上传网页到景安虚机。x2
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Ivan Li 2023-02-26 13:53:59 +00:00
parent 16d5d1f32e
commit 864085ea4a

View File

@ -119,7 +119,7 @@ kind: pipeline
type: docker type: docker
name: deploy name: deploy
clone: clone:
disable: true disable: false
depends_on: depends_on:
- linux-amd64 - linux-amd64
@ -177,36 +177,48 @@ kind: pipeline
type: docker type: docker
name: deploy-to-zzidc name: deploy-to-zzidc
clone: clone:
disable: true disable: false
depends_on: depends_on:
- linux-amd64 - linux-amd64
trigger:
branch:
- master
- develop
steps: steps:
- name: export - name: export
image: plugins/docker image: plugins/docker
settings: settings:
registry: docker-registry.ivanli.cc registry: docker-registry.ivanli.cc
username: username:
from_secret: ivan-docker-username from_secret: ivan-docker-username
password: password:
from_secret: ivan-docker-password from_secret: ivan-docker-password
repo: docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-upload repo: docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-upload
dockerfile: Dockerfile dockerfile: Dockerfile
target: upload target: upload
cache_from: cache_from:
- docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-upload:${DRONE_BRANCH}${DRONE_TAG}-amd64 - docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-upload:${DRONE_BRANCH}${DRONE_TAG}-amd64
tags: tags:
- '${DRONE_COMMIT_SHA:0:8}' - '${DRONE_COMMIT_SHA:0:8}'
- '${DRONE_BRANCH}${DRONE_TAG}' - '${DRONE_BRANCH}${DRONE_TAG}'
- name: upload - name: upload
image: docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-upload:${DRONE_COMMIT_SHA:0:8} image: docker:dind
environment: volumes:
FTP_ACCOUNT: - name: dockersock
from_secret: zzidc_ftp_account path: /var/run/docker.sock
FTP_PASSWORD: commands:
from_secret: zzidc_ftp_password - docker run --rm -it -e FTP_ACCOUNT=${FTP_ACCOUNT} -e FTP_PASSWORD=${FTP_PASSWORD} -e FTP_HOST=${FTP_HOST} docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-upload:${DRONE_COMMIT_SHA:0:8}
FTP_HOST: environment:
from_secret: zzidc_ftp_host FTP_ACCOUNT:
from_secret: zzidc_ftp_account
FTP_PASSWORD:
from_secret: zzidc_ftp_password
FTP_HOST:
from_secret: zzidc_ftp_host
- name: notify - name: notify
image: appleboy/drone-telegram image: appleboy/drone-telegram
when: when:
@ -237,4 +249,5 @@ steps:
{{commit.message}} {{commit.message}}
``` ```
🌐 {{ build.link }} 🌐 {{ build.link }}
{{/success}} {{/success}}