|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: AdventOfCode
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: init
|
|
|
|
image: busybox
|
|
|
|
commands:
|
|
|
|
- echo 'Starting build pipeline for AdventOfCode'
|
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: mcr.microsoft.com/dotnet/sdk:5.0
|
|
|
|
commands:
|
|
|
|
- dotnet build AdventOfCode.Tests
|
|
|
|
- cp -a AdventOfCode.Tests/Data/. /drone/src/AdventOfCode.Tests/bin/Debug/net5.0/
|
|
|
|
- dotnet test AdventOfCode.Tests --logger "console;verbosity=detailed"
|
|
|
|
|
|
|
|
# - name: build-advent-of-code
|
|
|
|
# image: plugins/docker
|
|
|
|
# settings:
|
|
|
|
# username:
|
|
|
|
# from_secret: gitlab_username
|
|
|
|
# password:
|
|
|
|
# from_secret: gitlab_password
|
|
|
|
# registry: registry.gitlab.com/sig14
|
|
|
|
# repo: registry.gitlab.com/sig14/advent-of-code
|
|
|
|
# dockerfile: AdventOfCode/Dockerfile
|
|
|
|
# depends_on:
|
|
|
|
# - test
|
|
|
|
|
|
|
|
- name: build-advent-of-code
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
username:
|
|
|
|
from_secret: gitea_user
|
|
|
|
password:
|
|
|
|
from_secret: gitea_password
|
|
|
|
registry: git.siglerdev.us/97waterpolo
|
|
|
|
repo: git.siglerdev.us/97waterpolo/advent-of-code
|
|
|
|
dockerfile: AdventOfCode/Dockerfile
|
|
|
|
depends_on:
|
|
|
|
- test
|
|
|
|
|
|
|
|
- name: deploy-containers
|
|
|
|
image: curlimages/curl
|
|
|
|
commands:
|
|
|
|
- "curl -H \"Authorization: Bearer $WATCHTOWER_TOKEN\" 192.168.68.114:8080/v1/update"
|
|
|
|
environment:
|
|
|
|
WATCHTOWER_TOKEN:
|
|
|
|
from_secret: watchtower_secret
|
|
|
|
depends_on:
|
|
|
|
- build-advent-of-code
|
|
|
|
|
|
|
|
- name: finish
|
|
|
|
image: busybox
|
|
|
|
commands:
|
|
|
|
- echo 'Finished container registry push for Advent of Code'
|
|
|
|
depends_on:
|
|
|
|
- deploy-containers
|