mirror of
https://gitee.com/dcren/initializr.git
synced 2025-04-05 17:38:06 +08:00
Move the build to concourse
Closes gh-767
This commit is contained in:
parent
490778552a
commit
beefea77cf
11
ci/images/initializr-ci-image/Dockerfile
Normal file
11
ci/images/initializr-ci-image/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM ubuntu:bionic-20181018
|
||||||
|
|
||||||
|
ENV JAVA_HOME /opt/openjdk
|
||||||
|
ENV PATH $JAVA_HOME/bin:$PATH
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y curl
|
||||||
|
RUN mkdir -p /opt/openjdk && \
|
||||||
|
cd /opt/openjdk && \
|
||||||
|
curl https://java-buildpack.cloudfoundry.org/openjdk/bionic/x86_64/openjdk-1.8.0_192.tar.gz | tar xz
|
||||||
|
|
||||||
|
ADD https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh /opt/
|
8
ci/parameters.yml
Normal file
8
ci/parameters.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
github-repo: "https://github.com/spring-io/initializr.git"
|
||||||
|
github-repo-name: "spring-io/initializr"
|
||||||
|
docker-hub-organization: "springci"
|
||||||
|
artifactory-server: "https://repo.spring.io"
|
||||||
|
branch: "master"
|
||||||
|
build-name: "initializr"
|
||||||
|
pipeline-name: "initializr"
|
||||||
|
concourse-url: "https://ci.spring.io"
|
63
ci/pipeline.yml
Normal file
63
ci/pipeline.yml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
resource_types:
|
||||||
|
- name: artifactory-resource
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
repository: springio/artifactory-resource
|
||||||
|
tag: 0.0.4
|
||||||
|
resources:
|
||||||
|
- name: git-repo
|
||||||
|
type: git
|
||||||
|
source:
|
||||||
|
uri: ((github-repo))
|
||||||
|
branch: ((branch))
|
||||||
|
ignore_paths: ["ci/images/*"]
|
||||||
|
- name: ci-images-git-repo
|
||||||
|
type: git
|
||||||
|
source:
|
||||||
|
uri: ((github-repo)
|
||||||
|
branch: ((branch))
|
||||||
|
paths: ["ci/images/*"]
|
||||||
|
- name: initializr-ci-image
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
repository: springci/initializr-ci-image
|
||||||
|
username: ((docker-hub-username))
|
||||||
|
password: ((docker-hub-password))
|
||||||
|
tag: ((branch))
|
||||||
|
- name: artifactory-repo
|
||||||
|
type: artifactory-resource
|
||||||
|
source:
|
||||||
|
uri: ((artifactory-server))
|
||||||
|
username: ((artifactory-username))
|
||||||
|
password: ((artifactory-password))
|
||||||
|
build_name: ((build-name))
|
||||||
|
jobs:
|
||||||
|
- name: build-initializr-ci-image
|
||||||
|
plan:
|
||||||
|
- get: ci-images-git-repo
|
||||||
|
trigger: true
|
||||||
|
- put: initializr-ci-image
|
||||||
|
params:
|
||||||
|
build: ci-images-git-repo/ci/images/initializr-ci-image
|
||||||
|
- name: build
|
||||||
|
serial: true
|
||||||
|
plan:
|
||||||
|
- get: git-repo
|
||||||
|
- get: initializr-ci-image
|
||||||
|
- task: build-project
|
||||||
|
image: initializr-ci-image
|
||||||
|
file: git-repo/ci/tasks/build-project.yml
|
||||||
|
- put: artifactory-repo
|
||||||
|
params: &artifactory-params
|
||||||
|
repo: libs-snapshot-local
|
||||||
|
folder: distribution-repository
|
||||||
|
build_uri: "https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}"
|
||||||
|
build_number: "${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}"
|
||||||
|
disable_checksum_uploads: true
|
||||||
|
groups:
|
||||||
|
- name: "Build"
|
||||||
|
jobs:
|
||||||
|
- build
|
||||||
|
- name: "CI Images"
|
||||||
|
jobs:
|
||||||
|
- build-initializr-ci-image
|
8
ci/scripts/build-project.sh
Executable file
8
ci/scripts/build-project.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
repository=$(pwd)/distribution-repository
|
||||||
|
|
||||||
|
pushd git-repo > /dev/null
|
||||||
|
./mvnw clean deploy -U -Pfull -DaltDeploymentRepository=distribution::default::file://${repository}
|
||||||
|
popd > /dev/null
|
8
ci/tasks/build-project.yml
Normal file
8
ci/tasks/build-project.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
platform: linux
|
||||||
|
inputs:
|
||||||
|
- name: git-repo
|
||||||
|
outputs:
|
||||||
|
- name: distribution-repository
|
||||||
|
run:
|
||||||
|
path: git-repo/ci/scripts/build-project.sh
|
Loading…
Reference in New Issue
Block a user