-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* allow using environment variable to override binary name * update plugin version to 1.1.3 * refactor code and run test * update helper script to run tests * add pipeline config and tasks * remove tag_regex * fix path refs * update script perms * fix list * update pipeline * update step for creating release artifacts * comment out * fix paths * stub out release * add scripts to prepare release * update release stub * fix script perms * fix script path * update release artifacts * simplify pipeline * update pipeline * add note for windows
- Loading branch information
Showing
10 changed files
with
178 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
jobs: | ||
|
||
- name: set-self | ||
plan: | ||
- get: cf-service-connect-repo | ||
trigger: true | ||
- set_pipeline: self | ||
file: cf-service-connect-repo/ci/pipeline.yml | ||
|
||
- name: run-tests | ||
plan: | ||
- get: cf-service-connect-repo | ||
passed: [set-self] | ||
trigger: true | ||
- task: run-tests | ||
file: cf-service-connect-repo/ci/run-tests.yml | ||
|
||
- name: create-release | ||
plan: | ||
- get: cf-service-connect-repo | ||
passed: [run-tests] | ||
trigger: true | ||
- task: prepare-release | ||
file: cf-service-connect-repo/ci/prepare-release.yml | ||
# - put: cf-service-connect-release | ||
# params: | ||
# name: cf-service-connect-repo/tag | ||
# tag: cf-service-connect-repo/tag | ||
# body: cf-service-connect-repo/releaselog.md | ||
# globs: | ||
# - cf-service-connect-repo/cf-service-connect_* | ||
on_failure: | ||
put: slack | ||
params: | ||
text: | | ||
:x: FAILED to release cf-service-connect | ||
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details> | ||
channel: ((slack-failure-channel)) | ||
username: ((slack-username)) | ||
icon_url: ((slack-icon-url)) | ||
on_success: | ||
put: slack | ||
params: | ||
text: | | ||
:white_check_mark: Successfully released cf-service-connect | ||
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details> | ||
channel: ((slack-success-channel)) | ||
username: ((slack-username)) | ||
icon_url: ((slack-icon-url)) | ||
|
||
resources: | ||
# this resource is this repo | ||
# NOTE: we only execute on tag changes not commits, see tag_regex | ||
- name: cf-service-connect-repo | ||
type: git | ||
source: | ||
uri: https://github.com/cloud-gov/cf-service-connect.git | ||
# only run on new tags matching pattern like: v0.1.5 | ||
tag_regex: '^v([0-9]+\.){0,2}(\*|[0-9]+)$' | ||
commit_verification_keys: ((cloud-gov-pgp-keys)) | ||
|
||
# This resource for posting to slack | ||
- name: slack | ||
type: slack-notification | ||
source: | ||
url: ((slack-webhook-url)) | ||
|
||
# Resource for creating a new release | ||
# - name: cf-service-connect-release | ||
# type: github-release | ||
# source: | ||
# owner: cloud-gov | ||
# repository: cf-service-connect | ||
# access_token: ((cg-ci-bot-ghtoken)) | ||
|
||
resource_types: | ||
|
||
- name: slack-notification | ||
type: docker-image | ||
source: | ||
repository: cfcommunity/slack-notification-resource | ||
|
||
- name: github-release | ||
type: registry-image | ||
source: | ||
repository: concourse/github-release-resource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
TAG=$(git describe --tags) | ||
echo "$TAG" > tag | ||
|
||
LAST_TAG=$(git describe --tags --abbrev=0) | ||
git log "$LAST_TAG..HEAD" --oneline --no-decorate > releaselog.md | ||
|
||
# Create release binaries | ||
./bin/create-release-binaries.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
platform: linux | ||
|
||
image_resource: | ||
type: registry-image | ||
source: | ||
aws_access_key_id: ((ecr_aws_key)) | ||
aws_secret_access_key: ((ecr_aws_secret)) | ||
repository: harden-concourse-task | ||
aws_region: us-gov-west-1 | ||
tag: ((harden-concourse-task-tag)) | ||
|
||
inputs: | ||
- name: cf-service-connect-repo | ||
|
||
outputs: | ||
- name: cf-service-connect-repo | ||
|
||
run: | ||
dir: cf-service-connect-repo | ||
path: ci/prepare-release.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
go test ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
platform: linux | ||
|
||
image_resource: | ||
type: registry-image | ||
source: | ||
aws_access_key_id: ((ecr_aws_key)) | ||
aws_secret_access_key: ((ecr_aws_secret)) | ||
repository: harden-concourse-task | ||
aws_region: us-gov-west-1 | ||
tag: ((harden-concourse-task-tag)) | ||
|
||
inputs: | ||
- name: cf-service-connect-repo | ||
|
||
run: | ||
dir: cf-service-connect-repo | ||
path: ci/run-tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package launcher | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
) | ||
|
||
func TestGetCFBinaryName(t *testing.T) { | ||
cfBinaryName := getCFBinaryName() | ||
if cfBinaryName != "cf" { | ||
t.Fatalf("expected CF binary named 'cf', got %s", cfBinaryName) | ||
} | ||
|
||
os.Setenv("CF_BINARY_NAME", "cf7") | ||
cfBinaryName = getCFBinaryName() | ||
if cfBinaryName != "cf7" { | ||
t.Fatalf("expected CF binary named 'cf7', got %s", cfBinaryName) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters