Skip to content

Commit

Permalink
Add release automation (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas authored Jan 21, 2024
1 parent d44be67 commit 3c9b0b7
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 2 deletions.
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://[email protected]/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

0 comments on commit 3c9b0b7

Please sign in to comment.