Skip to content

Commit

Permalink
Merge branch 'dev' into frogbot-google.golang.org/grpc-3787cdadfbbb12…
Browse files Browse the repository at this point in the history
…36909df9b08c0b5784
  • Loading branch information
omerzi authored Jul 6, 2023
2 parents 509c2bd + 9bcf74e commit 815e649
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 15 deletions.
11 changes: 2 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,29 +133,22 @@ def runRelease(architectures) {
}
}
if (identifier == "v2") {
createTagAndRelease()
createTag()
}
}
} finally {
cleanupRepo21()
}
}

def createTagAndRelease() {
def createTag() {
stage('Create a tag and a GitHub release') {
dir("$jfrogCliRepoDir") {
releaseTag = "v$RELEASE_VERSION"
withCredentials([string(credentialsId: 'ecosystem-github-automation', variable: 'GITHUB_ACCESS_TOKEN')]) {
sh """#!/bin/bash
git tag $releaseTag
git push "https://$GITHUB_ACCESS_TOKEN@github.com/jfrog/jfrog-cli.git" --tags
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_ACCESS_TOKEN"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/jfrog/jfrog-cli/releases \
-d '{"tag_name":"$releaseTag","target_commitish":"$BRANCH","name":"$RELEASE_VERSION","generate_release_notes":true}'
"""
}
}
Expand Down
7 changes: 7 additions & 0 deletions docs/general/login/help.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package login

var Usage = []string{"login"}

func GetDescription() string {
return "Log in to a JFrog Platform via your web browser. Available for Artifactory 7.63.1 and above"
}
14 changes: 14 additions & 0 deletions general/login/cli.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package login

import (
coreLogin "github.com/jfrog/jfrog-cli-core/v2/general/login"
"github.com/jfrog/jfrog-cli/utils/cliutils"
"github.com/urfave/cli"
)

func LoginCmd(c *cli.Context) error {
if c.NArg() > 0 {
return cliutils.WrongNumberOfArgumentsHandler(c)
}
return coreLogin.NewLoginCommand().Run()
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ require (

// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go

// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230629184314-ff61ffffba34
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230705084348-c7d33487e393

// replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27

// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20230629174113-81715f46ec0f
replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20230705083849-6fd087a5e228
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ github.com/jfrog/build-info-go v1.9.6 h1:lCJ2j5uXAlJsSwDe5J8WD7Co1f/hUlZvMfwfb5A
github.com/jfrog/build-info-go v1.9.6/go.mod h1:GbuFS+viHCKZYx9nWHYu7ab1DgQkFdtVN3BJPUNb2D4=
github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk=
github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0=
github.com/jfrog/jfrog-cli-core/v2 v2.37.1 h1:VE/6cagGor/5lWB7l+aU5FlhztoHM9q9M2FlWcn3ESo=
github.com/jfrog/jfrog-cli-core/v2 v2.37.1/go.mod h1:i62WcX9jQbH0dJjQdkmJAGridZgFVIK1B3yIPfXayHI=
github.com/jfrog/jfrog-client-go v1.31.0 h1:VIptdPkECaM0UDbKE2ZjFZh9i85W99xM65c6rFxDNj4=
github.com/jfrog/jfrog-client-go v1.31.0/go.mod h1:qEJxoe68sUtqHJ1YhXv/7pKYP/9p1D5tJrruzJKYeoI=
github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230705084348-c7d33487e393 h1:zIaBtAjalQ7HLwiYcR3OSU9Jglpmhtw8rg6piYervNU=
github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230705084348-c7d33487e393/go.mod h1:DnamqHWhKmrmWlCRG3i3z8Wn0JRtNFMC+Bu8TCFzSPY=
github.com/jfrog/jfrog-client-go v1.28.1-0.20230705083849-6fd087a5e228 h1:bkOkjb6sVqo6Jgw9eYSH58jIFPOJvFvwt+jIXvef7QM=
github.com/jfrog/jfrog-client-go v1.28.1-0.20230705083849-6fd087a5e228/go.mod h1:qEJxoe68sUtqHJ1YhXv/7pKYP/9p1D5tJrruzJKYeoI=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jszwec/csvutil v1.8.0 h1:G7vS2LGdpZZDH1HmHeNbxOaJ/ZnJlpwGFvOkTkJzzNk=
Expand Down
11 changes: 11 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ import (
"github.com/jfrog/jfrog-cli/distribution"
"github.com/jfrog/jfrog-cli/docs/common"
"github.com/jfrog/jfrog-cli/docs/general/cisetup"
loginDocs "github.com/jfrog/jfrog-cli/docs/general/login"
cisetupcommand "github.com/jfrog/jfrog-cli/general/cisetup"
"github.com/jfrog/jfrog-cli/general/envsetup"
"github.com/jfrog/jfrog-cli/general/login"
"github.com/jfrog/jfrog-cli/general/project"
"github.com/jfrog/jfrog-cli/missioncontrol"
"github.com/jfrog/jfrog-cli/pipelines"
Expand Down Expand Up @@ -266,6 +268,15 @@ func getCommands() []cli.Command {
fmt.Println(common.GetGlobalEnvVars())
},
},
{
Name: "login",
Usage: loginDocs.GetDescription(),
HelpName: corecommon.CreateUsage("login", loginDocs.GetDescription(), loginDocs.Usage),
BashComplete: corecommon.CreateBashCompletionFunc(),
Category: otherCategory,
Action: login.LoginCmd,
Hidden: true, // TODO remove when Artifactory 7.63.1 is released to self-hosted
},
}
allCommands := append(slices.Clone(cliNameSpaces), utils.GetPlugins()...)
allCommands = append(allCommands, scan.GetCommands()...)
Expand Down

0 comments on commit 815e649

Please sign in to comment.