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.
47 lines
1.1 KiB
47 lines
1.1 KiB
---
|
|
resources:
|
|
- name: git-resource
|
|
type: git
|
|
icon: git
|
|
source:
|
|
uri: ssh://git@git.nulloctet.com:8437/Mirror/github-andreimarcu-linx-server.git
|
|
private_key: |
|
|
((pull_key))
|
|
branch: master
|
|
tag_filter: v*
|
|
- name: git-resource-image
|
|
type: docker-image
|
|
icon: docker
|
|
source:
|
|
repository: ((nexus_docker_write.host))/sothr/linx
|
|
username: ((nexus_docker_write.username))
|
|
password: ((nexus_docker_write.password))
|
|
|
|
jobs:
|
|
- name: build-image
|
|
plan:
|
|
- get: git-resource
|
|
trigger: true
|
|
- task: generate-tags
|
|
config:
|
|
platform: linux
|
|
image_resource:
|
|
type: registry-image
|
|
source: { repository: alpine/git }
|
|
inputs:
|
|
- name: git-resource
|
|
outputs:
|
|
- name: image-tags
|
|
run:
|
|
path: /bin/sh
|
|
args:
|
|
- -c
|
|
- |
|
|
cd git-resource
|
|
git describe --tags --abbrev=0 > ../image-tags/tag
|
|
cat ../image-tags/tag
|
|
- put: git-resource-image
|
|
params:
|
|
build: git-resource
|
|
tag_file: image-tags/tag
|
|
tag_as_latest: true
|