-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from wavefrontHQ/osspi-pipeline
Osspi pipeline
- Loading branch information
Showing
3 changed files
with
96 additions
and
1 deletion.
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,68 @@ | ||
--- | ||
resource_types: | ||
- name: slack-alert | ||
type: docker-image | ||
source: | ||
repository: harbor-repo.vmware.com/dockerhub-proxy-cache/arbourd/concourse-slack-alert-resource | ||
|
||
resources: | ||
- name: osspi-tool | ||
type: git | ||
icon: gitlab | ||
source: | ||
uri: git@gitlab.eng.vmware.com:source-insight-tooling/norsk-to-osspi.git | ||
private_key: ((tas2to-osspi.norsk-to-osspi-private-key)) | ||
branch: main | ||
- name: slack-notify | ||
type: slack-alert | ||
source: | ||
url: ((tas2to-osspi.slack-webhook)) | ||
channel: tas2to-build-alerts | ||
- name: wavefront-sdk-go | ||
type: git | ||
source: | ||
uri: git@github.com:wavefrontHQ/wavefront-sdk-go | ||
branch: master | ||
private_key: ((tas2to-osspi.github-private-key)) | ||
|
||
jobs: | ||
- name: wavefront-sdk-go-scan | ||
on_failure: | ||
put: slack-notify | ||
params: | ||
alert_type: failed | ||
on_error: | ||
put: slack-notify | ||
params: | ||
alert_type: errored | ||
serial: true | ||
plan: | ||
- in_parallel: | ||
- get: osspi-tool | ||
- get: wavefront-sdk-go | ||
trigger: true | ||
params: { submodules: all } | ||
- in_parallel: | ||
- task: osspi-scan-wavefront-sdk-go | ||
file: osspi-tool/tasks/osspi/run-osspi-source.yaml | ||
input_mapping: | ||
repo1: osspi-tool | ||
repo2: wavefront-sdk-go | ||
params: | ||
REPO: repo2 | ||
OSM_ENVIRONMENT: ((osm-environment)) | ||
API_KEY: ((tas2to-osspi.apikey-((osm-environment)))) | ||
USERNAME: ((tas2to-osspi.user-((osm-environment)))) | ||
PRODUCT: wavefront-sdk-go | ||
VERSION: ((version)) | ||
OSM_PACKAGE_GROUP_NAME: wavefront-sdk-go | ||
PREPARE: | | ||
go mod vendor | ||
OSSPI_SCANNING_PARAMS: | | ||
enable: true | ||
include_bomtools: "go_mod" | ||
search_depth: 5 | ||
go_mod.path: "/go/bin/go" | ||
OSSPI_IGNORE_RULES: | | ||
- name_regex: stretchr/testify | ||
version_regex: .* |
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,27 @@ | ||
#!/usr/bin/env bash | ||
set -efuo pipefail | ||
|
||
which fly || ( | ||
echo "This requires fly to be installed" | ||
echo "Download the binary from https://github.com/concourse/concourse/releases or from the Runway Concourse: https://runway-ci.eng.vmware.com" | ||
exit 1 | ||
) | ||
|
||
fly -t runway sync || ( | ||
echo "This requires the runway target to be set" | ||
echo "Create this target by running 'fly -t runway login -c https://runway-ci.eng.vmware.com -n tobs-k8s-group'" | ||
exit 1 | ||
) | ||
|
||
pipeline_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
VERSION=${VERSION:-"0.14.0"} | ||
OSM_ENVIRONMENT=${OSM_ENVIRONMENT:-"production"} | ||
echo "using OSM_ENVIRONMENT: ${OSM_ENVIRONMENT}. Valid environments are beta and production" | ||
|
||
fly --target runway set-pipeline \ | ||
--pipeline "osspi-wavefront-sdk-go-${VERSION}" \ | ||
--config "${pipeline_dir}/pipeline.yml" \ | ||
--var osm-environment="${OSM_ENVIRONMENT}" \ | ||
--var version="${VERSION}" | ||
|
||
fly -t runway order-pipelines --alphabetical > /dev/null |