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

Add release automation #6

Merged
merged 3 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .jfrog-pipelines/pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
resources:
- name: securityCliGit
type: GitRepo
configuration:
path: jfrog/jfrog-cli-security
branches:
include: dev
gitProvider: il_automation

pipelines:
- name: release_security_cli
configuration:
runtime:
type: image
image:
custom:
name: releases-docker.jfrog.io/jfrog-ecosystem-integration-env
tag: latest
environmentVariables:
readOnly:
NEXT_VERSION: 0.0.0

steps:
- name: Release
type: Bash
configuration:
inputResources:
- name: securityCliGit
trigger: false
integrations:
- name: il_automation
- name: ecosys_entplus_deployer
execution:
onExecute:
- cd $res_securityCliGit_resourcePath

# Set env
- export CI=true

# Make sure version provided
- echo "Checking variables"
- test -n "$NEXT_VERSION" -a "$NEXT_VERSION" != "0.0.0"

# Configure Git and merge from the dev
- git checkout main
- git remote set-url origin https://$int_il_automation_token@github.com/jfrog/jfrog-cli-security.git
- git merge origin/dev
- git tag v${NEXT_VERSION}

# Download JFrog CLI
- curl -fL https://install-cli.jfrog.io | sh
- jf c rm --quiet
- jf c add internal --url=$int_ecosys_entplus_deployer_url --user=$int_ecosys_entplus_deployer_user --password=$int_ecosys_entplus_deployer_apikey

# Audit
- jf audit --fail=false

# Push to main
- git clean -fd
- git push
- git push --tags

# Merge changes to dev
- git checkout dev
- git merge origin/main
- git push
onComplete:
- jf c rm --quiet
2 changes: 0 additions & 2 deletions audit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import (
"github.com/jfrog/jfrog-client-go/xray/services"
)

// XrayCli -> PlatformCli

func TestXrayAuditNpmJson(t *testing.T) {
output := testXrayAuditNpm(t, string(format.Json))
securityTestUtils.VerifyJsonScanResults(t, output, 0, 1, 1)
Expand Down
Loading