Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(SIGINT-2310): CICD setup for new extension repo update changes needed in existing template pipeline #7

Merged
merged 8 commits into from
Oct 15, 2024
70 changes: 4 additions & 66 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ include:
- project: altair/altair-build-common
ref: master
file: gitlab/ci/altair_common.yml
- project: qa-automation/test-integrations
ref: main
file: _ci/e2e_azure.yml


# List of job stages in their order of execution.
Expand All @@ -24,10 +21,6 @@ stages:
- versioning
- analysis
- sbom
- e2e-publish
- e2e-setup
- e2e
- e2e-cleanup
- notification

variables:
Expand Down Expand Up @@ -59,11 +52,11 @@ unit_test_and_coverage_job:
before_script:
- export EXT_VERSION=$(cat vss-extension.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
- export ARTIFACTORY_UPLOAD_REPO=1
- export SBOM_ART_TOKEN_VAULT_PATH=sbom/integrations/synopsys-extension-ci-cd
- export SBOM_ART_TOKEN_VAULT_PATH=sbom/integrations/github-actions
- export PRODUCT=Integrations
- export GENERATE_CONFIGURATION_FILE=1
- export PRODUCT_ADDON_SBOM_OPTIONS="--output-zipfile synopsys-extension-ci-cd-$EXT_VERSION.zip --debug"
- export GENERATION_OPTIONS="--entry integrations/mirrored-repos/synopsys-extension-ci-cd:synopsys-extension-ci-cd-$EXT_VERSION"
- export PRODUCT_ADDON_SBOM_OPTIONS="--output-zipfile blackduck-security-extension-$EXT_VERSION.zip --debug"
- export GENERATION_OPTIONS="--entry integrations/mirrored-repos/blackduck-security-extension:blackduck-security-extension-$EXT_VERSION"

generate_sbom:
extends:
Expand All @@ -89,59 +82,4 @@ pop_blackduck:
apt-get update -y
apt-get install -y rsync make jq python3 python3-pip
pip3 install blackduck requests
export RELEASE_VERSION=$(cat vss-extension.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')

e2e-publish:
stage: e2e-publish
tags:
- linux
extends: .extension-publish

e2e-setup:
stage: e2e-setup
dependencies: [e2e-publish]
tags:
- linux
extends: .e2e-setup

e2e-linux:
stage: e2e
dependencies: [e2e-publish,e2e-setup]
tags:
- linux
extends: .e2e-extension
variables:
XML_PATH_IN_JAR: $XML
RUNNER_NAME: "Linux"
RUNNER_OS: "Linux"

e2e-mac:
stage: e2e
dependencies: [e2e-publish,e2e-setup]
tags:
- linux
extends: .e2e-extension
variables:
XML_PATH_IN_JAR: $XML
RUNNER_NAME: "Darwin"
RUNNER_OS: "Mac"

e2e-windows:
stage: e2e
dependencies: [e2e-publish,e2e-setup]
tags:
- linux
extends: .e2e-extension
variables:
XML_PATH_IN_JAR: $XML
RUNNER_NAME: "Windows_NT"
RUNNER_OS: "Windows"

e2e-clean-up:
stage: e2e-cleanup
dependencies: [e2e-publish,e2e-setup,e2e-linux,e2e-mac,e2e-windows]
tags:
- linux
extends: .e2e-clean-up
rules:
- when: always
export RELEASE_VERSION=$(cat vss-extension.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ build:
echo "Provide the Build command like mvn install / go build / npm "

dependencies:
echo "change directory to synopsys-task"
echo "change directory to blackduck-security-task"
ifdef POP_BLACKDUCK_INPROGRESS
cd synopsys-task
cd blackduck-security-task
endif

image_scan:
Expand Down
2 changes: 1 addition & 1 deletion vss-extension-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"files": [
{
"path": "synopsys-task"
"path": "blackduck-security-extension"
}
],
"content": {
Expand Down