Browse Source

Standalone branch for pipeline to create docker image

master
Drew Short 5 years ago
commit
7676fb2f2a
  1. 47
      pipeline.yml
  2. 11
      upload_pipeline.sh

47
pipeline.yml

@ -0,0 +1,47 @@
---
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

11
upload_pipeline.sh

@ -0,0 +1,11 @@
#!/usr/bin/env bash
TEAM=docker
PIPELINE=linx
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
pushd "${DIR}"
fly -t ${TEAM} set-pipeline --pipeline ${PIPELINE} --config pipeline.yml
popd
Loading…
Cancel
Save