You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.9 KiB

kind: pipeline
type: docker
name: AOC2021
environment:
REGISTRY_URL: 192.168.68.63:3000
steps:
- name: init
image: busybox
commands:
- echo 'Starting build pipeline for AOC2021'
- name: test
image: mcr.microsoft.com/dotnet/sdk:5.0
commands:
- dotnet build AOC2021.Test
- cp -a AOC2021.Test/Input/. /drone/src/AOC2021.Test/bin/Debug/net5.0/
- ls /drone/src/AOC2021.Test/bin/Debug/net5.0/
- dotnet test AOC2021.Test --logger "console;verbosity=detailed"
- name: docker-tag-demo
image: debian:stable-slim
commands:
- echo "The current branch is ${DRONE_BRANCH}"
- echo "The current commit hash is ${DRONE_COMMIT_SHA}"
- echo "The image tag is ${DRONE_BRANCH//\//-}-${DRONE_COMMIT_SHA:0:8}"
- echo "The url is $REGISTRY_URL"
- echo "The url is ${REGISTRY_URL}"
- echo "The url is $${REGISTRY_URL}"
- export REPO_URL=$${REGISTRY_URL}/97waterpolo/aoc-2021-2-0821
- echo "The repo url is $REPO_URL"
- echo "The repo url is ${REPO_URL}"
- echo "The repo url is $${REPO_URL}"
- name: build-aoc-2021-2
image: plugins/docker
settings:
username:
from_secret: gitea_user
password:
from_secret: gitea_password
#registry: 192.168.68.63:3000
registry:
from_secret: gitea_registry_url
#repo: 192.168.68.63:3000/97waterpolo/aoc-2021-2-0821
repo: $${REPO_URL}/97waterpolo/aoc-2021-2-0821
dockerfile: AOC2021/Dockerfile
insecure: true
environment:
REGISTRY_URL:
from_secret: gitea_registry_url
depends_on:
- docker-tag-demo
- name: build-aoc-2021
image: plugins/docker
settings:
username:
from_secret: gitea_user
password:
from_secret: gitea_password
registry: git.siglerdev.us/97waterpolo
repo: git.siglerdev.us/97waterpolo/aoc-2021-2-23-25
dockerfile: AOC2021/Dockerfile
depends_on:
- test
- name: finish
image: busybox
commands:
- echo 'Finished deployment for AOC2021'
depends_on:
- build-aoc-2021