diff --git a/build/ci/pipeline.yml b/build/ci/pipeline.yml deleted file mode 100644 index 561b556..0000000 --- a/build/ci/pipeline.yml +++ /dev/null @@ -1,133 +0,0 @@ ---- -jobs: -- name: test - serial: true - plan: - - aggregate: - - get: repo - trigger: true - - task: test - config: - platform: linux - image_resource: &golang - type: docker-image - source: - repository: golang - tag: "1.13" - inputs: - - name: repo - path: src/github.com/dpb587/slack-delegate-bot - run: - path: bash - args: - - -c - - GOPATH=$PWD exec ./src/github.com/dpb587/slack-delegate-bot/scripts/test -- name: publish - serial: true - plan: - - aggregate: - - get: repo - passed: - - test - - get: version - - task: build - config: - platform: linux - image_resource: *golang - inputs: - - name: repo - path: src/github.com/dpb587/slack-delegate-bot - - name: version - outputs: - - name: release - run: - path: bash - args: - - -c - - | - set -eu - export GOPATH=$PWD - task_dir=$PWD - release_dir=$task_dir/release - - wget -O /usr/bin/meta4 https://github.com/dpb587/metalink/releases/download/v0.3.0/meta4-0.3.0-linux-amd64 - echo "e276ccff74cbe9a85eda17e5955df0b0b06ee68fcdb67d860f691d41b34f65cf /usr/bin/meta4" | shasum -c - chmod +x /usr/bin/meta4 - - version=$( cat "version/version" ) - - cd src/github.com/dpb587/slack-delegate-bot - - git rev-parse HEAD > "$release_dir/commit" - - ./scripts/build "$version" - mv tmp/build "$release_dir/artifacts" - - cd "$release_dir" - - echo "$version" > version - echo "v$version" > tag - echo "Release v$version" > title - - meta4 create - for file in $( cd artifacts ; ls ); do - meta4 import-file --version="$version" "artifacts/$file" - meta4 file-set-url --file="$file" https://github.com/dpb587/slack-delegate-bot/releases/download/v$version/$file - done - - put: version - params: - version: version/version - bump: minor - - put: repo - params: - annotate: release/title - repository: repo - only_tag: true - tag: release/tag - - put: github-release - params: - commitish: release/commit - name: release/tag - tag: release/tag - globs: - - release/artifacts/* - get_params: - globs: - - none - - put: repo-artifacts - params: - metalink: release/metalink.meta4 - get_params: - skip_download: true -resources: -- name: repo - type: git - source: - uri: git@github.com:dpb587/slack-delegate-bot.git - branch: master - private_key: ((git_private_key)) -- name: repo-artifacts - type: metalink-repository - source: - uri: git+ssh://git@github.com:dpb587/slack-delegate-bot.git//published#artifacts - options: - private_key: ((git_private_key)) -- name: github-release - type: github-release - source: - owner: dpb587 - repository: slack-delegate-bot - access_token: ((access_token)) -- name: version - type: semver - source: - uri: git@github.com:dpb587/slack-delegate-bot.git - branch: ci-state - driver: git - file: version/master - private_key: ((git_private_key)) -resource_types: -- name: metalink-repository - type: docker-image - source: - repository: dpb587/metalink-repository-resource diff --git a/scripts/build b/scripts/build deleted file mode 100755 index 8e2023f..0000000 --- a/scripts/build +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# args: [version] - -set -eu - -cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.." -version="${1:-0.0.0}" - -if [ -z "${bin_list:-}" ]; then - bin_list="$( ls cmd )" -fi - -if [ -z "${os_list:-}" ]; then - os_list="darwin linux windows" -fi - -if [ -z "${arch_list:-}" ]; then - arch_list="amd64" -fi - -rm -fr tmp/build/* -mkdir -p tmp/build - -commit=$( git rev-parse HEAD | cut -c-10 )$( git diff-index --quiet HEAD -- || echo "+dirty" ) -built=$( date -u +%Y-%m-%dT%H:%M:%S+00:00 ) - -export CGO_ENABLED=0 - -for name in $bin_list ; do - for os in $os_list ; do - for arch in $arch_list ; do - filename=$name-$version-$os-$arch - - if [ "$os" == "windows" ]; then - filename=$filename.exe - fi - - echo "$filename" - GOOS=$os GOARCH=$arch go build \ - -ldflags " - -X github.com/dpb587/slack-delegate-bot/pkg/cli/app.name=$name \ - -X github.com/dpb587/slack-delegate-bot/pkg/cli/app.semver=$version \ - -X github.com/dpb587/slack-delegate-bot/pkg/cli/app.commit=$commit \ - -X github.com/dpb587/slack-delegate-bot/pkg/cli/app.built=$built \ - " \ - -o tmp/build/$filename \ - ./cmd/$name - done - done -done diff --git a/scripts/test b/scripts/test deleted file mode 100755 index dfdbd6a..0000000 --- a/scripts/test +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -set -eu - -base=$( cd "$( dirname "$0" )/.." && pwd ) - -cd "$base" - -go run github.com/onsi/ginkgo/ginkgo -r -race -keepGoing -trace -skipPackage="vendor" "$@"