Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into semver-prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano committed Jan 26, 2022
2 parents 6fed326 + 5478947 commit 512535e
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .ci/jobs/package-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
discover-pr-forks-trust: permission
discover-pr-origin: merge-current
discover-tags: true
head-filter-regex: '(^master|^experimental|PR-.*|v\d+\.\d+\.\d+)'
head-filter-regex: '(^main|^experimental|PR-.*|v\d+\.\d+\.\d+)'
notification-context: 'package-registry'
repo: package-registry
repo-owner: elastic
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.3
1.17.6
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/elastic/package-registry/compare/v1.5.1...master)
## [Unreleased](https://github.com/elastic/package-registry/compare/v1.6.0...main)

### Breaking changes

### Bugfixes

### Added

### Deprecated

### Known Issues

## [v1.6.0](https://github.com/elastic/package-registry/compare/v1.5.1...v1.6.0)

### Breaking changes

Expand All @@ -16,14 +28,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Bugfixes

* Fix panic when opening specially crafted Zip file. [#764](https://github.com/elastic/package-registry/pull/764)
* Fix unbounded memory issue when handling HTTP/2 requests. [#788](https://github.com/elastic/package-registry/pull/788)

### Added

* Add the `prerelease` parameter in search requests to include in-development versions of packages. [#785](https://github.com/elastic/package-registry/pull/785)
* Update APM Go Agent to 1.14.0. [#759](https://github.com/elastic/package-registry/pull/759)
* Update Gorilla to 1.8.0. [#759](https://github.com/elastic/package-registry/pull/759)
* Support package signatures. [#760](https://github.com/elastic/package-registry/pull/760)
* Update Go runtime to 1.17.3. [#764](https://github.com/elastic/package-registry/pull/764)
* Update Go runtime to 1.17.6. [#788](https://github.com/elastic/package-registry/pull/788)
* Use Ubuntu LTS as base image instead of CentOS [#787](https://github.com/elastic/package-registry/pull/787)

### Deprecated

Expand Down
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# It expects packages to be mounted under /packages/package-registry or have a config file loaded into /package-registry/config.yml

# Build binary
ARG GO_VERSION=1.17.3
ARG GO_VERSION=1.17.6
FROM golang:${GO_VERSION} AS builder

ENV GO111MODULE=on
Expand All @@ -12,11 +12,12 @@ RUN go build .


# Run binary
FROM centos:7
FROM ubuntu:20.04

# Get dependencies
# mailcap - installs "/etc/mime.types" used by the package-registry binary
RUN yum install -y zip rsync mailcap && yum clean all
RUN apt-get update && \
apt-get install -y mime-support zip rsync curl && \
apt-get clean all

# Move binary from the builder image
COPY --from=builder /package-registry/package-registry /package-registry/package-registry
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Endpoints:
* `/package/{name}/{version}`: Info about a package
* `/epr/{name}/{name}-{version}.tar.gz`: Download a package

Examples for each API endpoint can be found here: https://github.com/elastic/package-registry/tree/master/docs/api
Examples for each API endpoint can be found here: https://github.com/elastic/package-registry/tree/main/docs/api

The `/search` API endpoint has few additional query parameters. More might be added in the future, but for now these are:

Expand Down Expand Up @@ -88,7 +88,7 @@ Additionally, the following **frozen** endpoints exist and are **no longer updat
* experimental, CDN: https://epr-experimental.elastic.co
* 7.9, CDN: https://epr-7-9.elastic.co

An dev registry is running on `https://epr-staging.elastic.co/`. This is updated from time to time to be in sync with master.
An dev registry is running on `https://epr-staging.elastic.co/`. This is updated from time to time to be in sync with main.

The deployment runs on an Elastic internal k8s cluster. To get all the deployments for the registry use the following command:

Expand All @@ -110,8 +110,8 @@ docker run -p 8080:8080 {image id from prior step}

**Commands ready to cut-and-paste**
```
docker build --rm -t docker.elastic.co/package-registry/package-registry:master .
docker run -it -p 8080:8080 $(docker images -q docker.elastic.co/package-registry/package-registry:master)
docker build --rm -t docker.elastic.co/package-registry/package-registry:main .
docker run -it -p 8080:8080 $(docker images -q docker.elastic.co/package-registry/package-registry:main)
```

**Listening on HTTPS**
Expand All @@ -122,7 +122,7 @@ docker run -it -p 8443:8443 \
-e EPR_ADDRESS=0.0.0.0:8443
-e EPR_TLS_KEY=/etc/ssl/package-registry.key \
-e EPR_TLS_CERT=/etc/ssl/package-registry.crt \
docker.elastic.co/package-registry/package-registry:master
docker.elastic.co/package-registry/package-registry:main
```

#### Docker images published
Expand All @@ -134,11 +134,11 @@ For each commit we have two docker image tags, one with the commit as tag

Another Docker tag with the git branch or tag name

* `docker.elastic.co/package-registry/package-registry:master`
* `docker.elastic.co/package-registry/package-registry:main`
* `docker.elastic.co/package-registry/package-registry:pr-111`
* `docker.elastic.co/package-registry/package-registry:v0.2.0`

If you want to run the most recent registry for development, run the master tag.
If you want to run the most recent registry for development, run the main tag.

These images contain only the package registry, they don't contain any package.

Expand All @@ -150,7 +150,7 @@ The Docker image of Package Registry is just an empty distribution without any p
0. Make sure you've built the Docker image for Package Registry:

```bash
docker build --rm -t docker.elastic.co/package-registry/package-registry:master .
docker build --rm -t docker.elastic.co/package-registry/package-registry:main .
```

1. Git clone latest `distribution:snapshot` from Git:
Expand All @@ -159,10 +159,10 @@ docker build --rm -t docker.elastic.co/package-registry/package-registry:master
git clone --branch snapshot https://github.com/elastic/package-storage.git
```

2. Open Dockerfile and change the base image for the Package Registry (use `master` instead of `v0.19.0`):
2. Open Dockerfile and change the base image for the Package Registry (use `main` instead of `v0.19.0`):

```
FROM docker.elastic.co/package-registry/package-registry:master
FROM docker.elastic.co/package-registry/package-registry:main
```

(Docker builder will use the custom image you've built in step 0.)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

const (
serviceName = "package-registry"
version = "1.5.2"
version = "1.6.1"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ info:
version: '1.0'
license:
name: Elastic-License
url: 'https://github.com/elastic/package-registry/blob/master/LICENSE.txt'
url: 'https://github.com/elastic/package-registry/blob/main/LICENSE.txt'
description: Elastic Package Registry
servers:
- url: 'https://epr.elastic.co'
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/index.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"service.name": "package-registry",
"service.version": "1.5.2"
"service.version": "1.6.1"
}

0 comments on commit 512535e

Please sign in to comment.