Add pipeline stuff.

This commit is contained in:
Jeremy Wood 2021-08-25 09:37:22 -04:00
parent 1a8a97daf1
commit 719ade19f7
No known key found for this signature in database
GPG Key ID: D2E08EC4CC47CCCE
3 changed files with 90 additions and 0 deletions

8
ci/_set_pipeline.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "Unable to parse target. Run fly targets to check for what this could be."
exit -1
fi
fly -t "$1" sp -c ./ci/pipelines/pipeline.yml -p multiverse-core

46
ci/pipelines/pipeline.yml Normal file
View File

@ -0,0 +1,46 @@
---
# We care when the source, ci/scripts, and ci/tasks code changes.
resources:
- name: main
icon: github
type: git
source:
paths:
- src/**
- ci/scripts/**
- ci/tasks/**
branch: main
uri: https://github.com/dumptruckman/multiverse-core-testing
groups:
- name: deployments
jobs:
# - unit-tests
- package
jobs:
#####################
## TESTING ##
#####################
# commented out due to kernel bug
# - name: unit-tests
# serial_groups: [staging]
# plan:
# - get: gls-api-src
# trigger: true
# - task: unit-tests
# file: gls-api-src/ci/tasks/unit-tests.yml
#####################
## BUILD ##
#####################
- name: package
build_logs_to_retain: 50
plan:
- get: main
trigger: true
# passed: [unit-tests]
- task: maven-package
file: ./ci/tasks/maven-package.yml

View File

@ -0,0 +1,36 @@
---
# A task to build a Docker image for a Java app with Jib
# Task definition
platform: linux
container_limits: {}
# Use the 'maven:3.6.3' image from Docker Hub
image_resource:
type: registry-image
source:
repository: maven
tag: 3.6.3
# Cache Maven artifacts so we don't download the internet again
# Caches are scoped to a particular task name inside of a pipeline's job.
caches:
- path: $HOME/.m2/repository
# We will provide an input called 'git' to this Task
# This causes Concourse to git checkout a specific commit.
# It also allows us to execute this step independently, for a specific Git commit.
# However, the parent pipeline only runs this task when the previous 'unit' job has passed.
inputs:
- name: main
outputs:
- name: jar
run:
path: /bin/sh
args:
- -c
- |
mvn -B -f main/pom.xml package