-
-
Notifications
You must be signed in to change notification settings - Fork 410
Add support for JFrog artifactory. #1553
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
base: master
Are you sure you want to change the base?
Changes from all commits
4ae7781
b2ac6d4
5740048
69183aa
6fd65d7
f691b3a
5e7a6e4
18e5d35
551c6d2
859d70c
7f665bf
27e107c
3d29e16
b667687
614ce1a
84bb9eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package api | ||
|
|
||
| import ( | ||
| "github.com/gin-gonic/gin" | ||
| ) | ||
|
|
||
| // @Summary JFrog repositories | ||
| // @Description **Get list of JFrog repositories** | ||
| // @Description | ||
| // @Description List configured JFrog publish endpoints. | ||
| // @Tags Status | ||
| // @Produce json | ||
| // @Success 200 {array} string "List of JFrog publish endpoints" | ||
| // @Router /api/jfrog [get] | ||
| func apiJFrogList(c *gin.Context) { | ||
| keys := []string{} | ||
| for k := range context.Config().JFrogPublishRoots { | ||
| keys = append(keys, k) | ||
| } | ||
| c.JSON(200, keys) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -193,6 +193,29 @@ filesystem_publish_endpoints: | |
| # | ||
| # `aptly publish snapshot wheezy-main s3:test:` | ||
| # | ||
|
|
||
| # JFrog Artifactory Endpoint Support | ||
| # | ||
| # aptly can be configured to publish repositories directly to JFrog Artifactory. First, | ||
| # publishing endpoints should be described in the aptly configuration file. | ||
| # | ||
| # In order to publish to JFrog, specify endpoint as `jfrog:endpoint-name:` before | ||
| # publishing prefix on the command line, e.g.: | ||
| # | ||
| # `aptly publish snapshot wheezy-main jfrog:test:` | ||
| # | ||
| jfrog_publish_endpoints: | ||
| # # Endpoint Name | ||
| # test: | ||
| # # JFrog URL | ||
| # url: "https://artifactory.example.com/artifactory/" | ||
| # # Repository | ||
| # repository: apt-local | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should make it clear that this is intended for a "generic" Jfrog repo, and detail any other settings/setup that were needed on the Artifactory side if any. |
||
| # # Username | ||
| # username: admin | ||
| # # Password | ||
| # password: password | ||
|
|
||
| s3_publish_endpoints: | ||
| # # Endpoint Name | ||
| # test: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| module github.com/aptly-dev/aptly | ||
|
|
||
| go 1.24.0 | ||
| go 1.24.6 | ||
|
|
||
| require ( | ||
| github.com/AlekSi/pointer v1.1.0 | ||
|
|
@@ -13,8 +13,8 @@ require ( | |
| github.com/h2non/filetype v1.1.3 | ||
| github.com/jlaffaye/ftp v0.2.0 // indirect | ||
| github.com/kjk/lzma v0.0.0-20120628231508-2a7c55cad4a2 | ||
| github.com/klauspost/compress v1.17.9 | ||
| github.com/klauspost/pgzip v1.2.5 | ||
| github.com/klauspost/compress v1.17.11 | ||
| github.com/klauspost/pgzip v1.2.6 | ||
| github.com/mattn/go-colorable v0.1.13 // indirect | ||
| github.com/mattn/go-runewidth v0.0.15 // indirect | ||
| github.com/mattn/go-shellwords v1.0.12 | ||
|
|
@@ -42,10 +42,14 @@ require ( | |
|
|
||
| require ( | ||
| cloud.google.com/go/compute/metadata v0.3.0 // indirect | ||
| dario.cat/mergo v1.0.1 // indirect | ||
| github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect | ||
| github.com/CycloneDX/cyclonedx-go v0.9.2 // indirect | ||
| github.com/KyleBanks/depth v1.2.1 // indirect | ||
| github.com/Microsoft/go-winio v0.6.2 // indirect | ||
| github.com/PuerkitoBio/purell v1.1.1 // indirect | ||
| github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect | ||
| github.com/andybalholm/brotli v1.1.1 // indirect | ||
| github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect | ||
| github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20 // indirect | ||
| github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 // indirect | ||
|
|
@@ -66,9 +70,16 @@ require ( | |
| github.com/cloudflare/circl v1.6.1 // indirect | ||
| github.com/coreos/go-semver v0.3.0 // indirect | ||
| github.com/coreos/go-systemd/v22 v22.5.0 // indirect | ||
| github.com/cyphar/filepath-securejoin v0.4.1 // indirect | ||
| github.com/dsnet/compress v0.0.1 // indirect | ||
| github.com/emirpasic/gods v1.18.1 // indirect | ||
| github.com/fatih/color v1.17.0 // indirect | ||
| github.com/forPelevin/gomoji v1.3.0 // indirect | ||
| github.com/gabriel-vasile/mimetype v1.4.2 // indirect | ||
| github.com/gin-contrib/sse v0.1.0 // indirect | ||
| github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect | ||
| github.com/go-git/go-billy/v5 v5.6.2 // indirect | ||
| github.com/go-git/go-git/v5 v5.14.0 // indirect | ||
| github.com/go-openapi/jsonpointer v0.19.5 // indirect | ||
| github.com/go-openapi/jsonreference v0.19.6 // indirect | ||
| github.com/go-openapi/spec v0.20.4 // indirect | ||
|
|
@@ -77,33 +88,52 @@ require ( | |
| github.com/go-playground/universal-translator v0.18.1 // indirect | ||
| github.com/goccy/go-json v0.10.2 // indirect | ||
| github.com/gogo/protobuf v1.3.2 // indirect | ||
| github.com/golang-jwt/jwt/v4 v4.5.2 // indirect | ||
| github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect | ||
| github.com/golang/protobuf v1.5.4 // indirect | ||
| github.com/golang/snappy v0.0.4 // indirect | ||
| github.com/gookit/color v1.5.4 // indirect | ||
| github.com/hashicorp/errwrap v1.1.0 // indirect | ||
| github.com/hashicorp/go-multierror v1.1.1 // indirect | ||
| github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect | ||
| github.com/jfrog/archiver/v3 v3.6.1 // indirect | ||
| github.com/jfrog/build-info-go v1.11.0 // indirect | ||
| github.com/jfrog/gofrog v1.7.6 // indirect | ||
| github.com/josharian/intern v1.0.0 // indirect | ||
| github.com/json-iterator/go v1.1.12 // indirect | ||
| github.com/klauspost/cpuid/v2 v2.2.4 // indirect | ||
| github.com/kevinburke/ssh_config v1.2.0 // indirect | ||
| github.com/klauspost/cpuid/v2 v2.2.9 // indirect | ||
| github.com/kr/pretty v0.3.1 // indirect | ||
| github.com/kr/text v0.2.0 // indirect | ||
| github.com/leodido/go-urn v1.2.4 // indirect | ||
| github.com/mailru/easyjson v0.7.6 // indirect | ||
| github.com/mattn/go-isatty v0.0.20 // indirect | ||
| github.com/minio/sha256-simd v1.0.1 // indirect | ||
| github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
| github.com/modern-go/reflect2 v1.0.2 // indirect | ||
| github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
| github.com/nwaples/rardecode v1.1.3 // indirect | ||
| github.com/pelletier/go-toml/v2 v2.1.0 // indirect | ||
| github.com/pierrec/lz4/v4 v4.1.22 // indirect | ||
| github.com/pjbgf/sha1cd v0.3.2 // indirect | ||
| github.com/prometheus/client_model v0.6.1 // indirect | ||
| github.com/prometheus/common v0.59.1 // indirect | ||
| github.com/prometheus/procfs v0.15.1 // indirect | ||
| github.com/rivo/uniseg v0.4.7 // indirect | ||
| github.com/rogpeppe/go-internal v1.12.0 // indirect | ||
| github.com/rogpeppe/go-internal v1.14.1 // indirect | ||
| github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect | ||
| github.com/skeema/knownhosts v1.3.1 // indirect | ||
| github.com/twitchyliquid64/golang-asm v0.15.1 // indirect | ||
| github.com/ulikunitz/xz v0.5.15 // indirect | ||
| github.com/xanzy/ssh-agent v0.3.3 // indirect | ||
| github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect | ||
| github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect | ||
| go.etcd.io/etcd/api/v3 v3.5.15 // indirect | ||
| go.etcd.io/etcd/client/pkg/v3 v3.5.15 // indirect | ||
| go.uber.org/multierr v1.10.0 // indirect | ||
| go.uber.org/zap v1.26.0 // indirect | ||
| golang.org/x/arch v0.3.0 // indirect | ||
| golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect | ||
| golang.org/x/net v0.47.0 // indirect | ||
| golang.org/x/sync v0.18.0 // indirect | ||
| golang.org/x/text v0.31.0 // indirect | ||
|
|
@@ -112,19 +142,21 @@ require ( | |
| google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect | ||
| google.golang.org/grpc v1.64.1 // indirect | ||
| gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect | ||
| gopkg.in/warnings.v0 v0.1.2 // indirect | ||
| gopkg.in/yaml.v2 v2.4.0 // indirect | ||
| ) | ||
|
|
||
| require ( | ||
| github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 | ||
| github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.1 | ||
| github.com/ProtonMail/go-crypto v1.0.0 | ||
| github.com/ProtonMail/go-crypto v1.1.6 | ||
| github.com/aws/aws-sdk-go-v2 v1.32.5 | ||
| github.com/aws/aws-sdk-go-v2/config v1.28.5 | ||
| github.com/aws/aws-sdk-go-v2/credentials v1.17.46 | ||
| github.com/aws/aws-sdk-go-v2/service/s3 v1.67.1 | ||
| github.com/aws/smithy-go v1.22.1 | ||
| github.com/google/uuid v1.6.0 | ||
| github.com/jfrog/jfrog-client-go v1.55.0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe if we add a new dependency, it should also be added to
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess what I can do is gate JFrog support out of Debian builds for now (build tags / packaging split), so Debian source builds remain reproducible. Let me know how to proceed. |
||
| github.com/swaggo/files v1.0.1 | ||
| github.com/swaggo/gin-swagger v1.6.0 | ||
| github.com/swaggo/swag v1.16.3 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily blocking this MR, but what would it look like to get an Artifactory instance running for these integration tests? It's not clear what their free/OSS offering would take to host or if it supports the functionality we need here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I forgot to clean this out.
Unfortunately only a 30 day trial is available for JFrog as far as I am aware, and i don't think it would be usable in ci .
I would understand if you didn't think adding support for this was very interesting. I needed this feature for a project and thought I would share.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I think it's very interesting, having used Artifactory's built in "Debian Snapshots" before, this would be a welcome improvement :)
I was wondering how we could see it in action, but if it's worked for your personal needs, that's a good vote of confidence.