commit 7676fb2f2a62d012854746965b37d2e6220be2d4 Author: Drew Short Date: Sun Dec 15 22:51:50 2019 -0600 Standalone branch for pipeline to create docker image diff --git a/pipeline.yml b/pipeline.yml new file mode 100644 index 0000000..2ddb12f --- /dev/null +++ b/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 diff --git a/upload_pipeline.sh b/upload_pipeline.sh new file mode 100755 index 0000000..9dc165e --- /dev/null +++ b/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