106 lines
2.1 KiB
YAML
106 lines
2.1 KiB
YAML
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: Synchronization Nginx-Images
|
||
|
|
||
|
trigger:
|
||
|
event:
|
||
|
include:
|
||
|
- custom
|
||
|
|
||
|
steps:
|
||
|
- name: 同步 Nginx-Images
|
||
|
image: docker:dind
|
||
|
volumes:
|
||
|
- name: dockersock
|
||
|
path: /var/run/docker.sock
|
||
|
environment:
|
||
|
DOCKER_USERNAME:
|
||
|
from_secret: DOCKER_USERNAME
|
||
|
DOCKER_PASSWORD:
|
||
|
from_secret: DOCKER_PASSWORD
|
||
|
REGISTRY:
|
||
|
from_secret: REGISTRY
|
||
|
REPO:
|
||
|
from_secret: REPO
|
||
|
BUILD:
|
||
|
from_secret: BUILD
|
||
|
commands:
|
||
|
- |
|
||
|
docker pull nginx:alpine-slim \
|
||
|
&& docker login $REGISTRY -u $DOCKER_USERNAME -p $DOCKER_PASSWORD \
|
||
|
&& docker tag nginx:alpine-slim $REPO:nginx-alpine-slim \
|
||
|
&& docker push $REPO:nginx-alpine-slim
|
||
|
volumes:
|
||
|
- name: dockersock
|
||
|
host:
|
||
|
path: /var/run/docker.sock
|
||
|
---
|
||
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: Synchronization Twikoo-Images
|
||
|
|
||
|
trigger:
|
||
|
event:
|
||
|
include:
|
||
|
- custom
|
||
|
|
||
|
steps:
|
||
|
- name: 同步 Twikoo-Images
|
||
|
image: docker:dind
|
||
|
volumes:
|
||
|
- name: dockersock
|
||
|
path: /var/run/docker.sock
|
||
|
environment:
|
||
|
DOCKER_USERNAME:
|
||
|
from_secret: DOCKER_USERNAME
|
||
|
DOCKER_PASSWORD:
|
||
|
from_secret: DOCKER_PASSWORD
|
||
|
REGISTRY:
|
||
|
from_secret: REGISTRY
|
||
|
REPO:
|
||
|
from_secret: REPO
|
||
|
BUILD:
|
||
|
from_secret: BUILD
|
||
|
commands:
|
||
|
- |
|
||
|
docker pull imaegoo/twikoo:latest \
|
||
|
&& docker login $REGISTRY -u $DOCKER_USERNAME -p $DOCKER_PASSWORD \
|
||
|
&& docker tag imaegoo/twikoo:latest $REPO:twikoo \
|
||
|
&& docker push $REPO:twikoo
|
||
|
volumes:
|
||
|
- name: dockersock
|
||
|
host:
|
||
|
path: /var/run/docker.sock
|
||
|
---
|
||
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: Build Hexo-Images
|
||
|
|
||
|
trigger:
|
||
|
event:
|
||
|
include:
|
||
|
- custom
|
||
|
|
||
|
steps:
|
||
|
- name: 同步 Node-Alpine-Image
|
||
|
image: docker:dind
|
||
|
volumes:
|
||
|
- name: dockersock
|
||
|
path: /var/run/docker.sock
|
||
|
environment:
|
||
|
DOCKER_USERNAME:
|
||
|
from_secret: DOCKER_USERNAME
|
||
|
DOCKER_PASSWORD:
|
||
|
from_secret: DOCKER_PASSWORD
|
||
|
REGISTRY:
|
||
|
from_secret: REGISTRY
|
||
|
REPO:
|
||
|
from_secret: REPO
|
||
|
BUILD:
|
||
|
from_secret: BUILD
|
||
|
commands:
|
||
|
- |
|
||
|
docker pull node:alpine \
|
||
|
&& docker login $REGISTRY -u $DOCKER_USERNAME -p $DOCKER_PASSWORD \
|
||
|
&& docker tag node:alpine $REPO:node-alpine \
|
||
|
&& docker push $REPO:node-alpine
|