Skip to content

Commit

Permalink
Merge pull request #145 from wavefrontHQ/osspi-pipeline
Browse files Browse the repository at this point in the history
Osspi pipeline
  • Loading branch information
suprajanarasimhan authored Aug 16, 2023
2 parents ba496f3 + 2b9fff3 commit 6f4652d
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 1.19.x, 1.20.x ]
go-version: [ 1.19.x, 1.20.x, 1.21.x]
name: Go ${{ matrix.go-version }}
steps:
- uses: actions/checkout@v3
Expand Down
68 changes: 68 additions & 0 deletions ci/pipelines/osspi-wavefront-sdk-go/pipeline.yml
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: .*
27 changes: 27 additions & 0 deletions ci/pipelines/osspi-wavefront-sdk-go/set_pipeline.sh
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

0 comments on commit 6f4652d

Please sign in to comment.