Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Adjust snapshot branch to build distribution Docker image #88

Merged
merged 2 commits into from
Jun 29, 2020

Conversation

ruflin
Copy link
Contributor

@ruflin ruflin commented Jun 25, 2020

This adds a Dockerfile to the package-storage branch based on which a distribution of the package-registry with packages is built.

This adds a Dockerfile to the package-storage branch based on which a distribution of the package-registry with packages is built.
@ruflin ruflin requested a review from kuisathaverat June 25, 2020 08:29
@ruflin ruflin self-assigned this Jun 25, 2020
@@ -10,6 +10,8 @@ pipeline {
DOCKER_REGISTRY_SECRET = 'secret/observability-team/ci/docker-registry/prod'
PIPELINE_LOG_LEVEL='INFO'
GO_VERSION = '1.13.12'
DOCKER_IMG = "${env.DOCKER_REGISTRY}/package-registry/distribution"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kuisathaverat for now, I just made this up. Not sure if this is going to work.

The goal is that as soon as this PR is merged, it pushes to docker.elastic.co/package-registry/distribution:snapshot.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently, the pipeline uses the BRANCH_NAME as tag so it will push to docker.elastic.co/package-registry/distribution:master, we push for every branch or tag.

if we want to change it to docker.elastic.co/package-registry/distribution:snapshot for the master branch it is easy to make, Do we want to publish other branches to that namespace (docker.elastic.co/package-registry)?

I see that there is a branch name snapshot, it push to docker.elastic.co/package-registry/distribution:snapshot but is not the master branch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is against the snapshot branch. Does this mean it is just going to work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch!!, I didn't realize that the PR is against the snapshot branch, yep it makes the thing

@@ -0,0 +1,15 @@
# Here the version of the registry is specified this storage branch uses.
# It should always be a specific version to make sure builds are reproducible.
ARG PACKAGE_REGISTRY=57d417a84fa038cfb50a0cd661372c194199b3fd
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsoriano Registry version is fixed. Here it is a commit hash but i expect it will become a released version soon.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 25, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #88 updated]

  • Start Time: 2020-06-25T20:37:58.311+0000

  • Duration: 7 min 57 sec

Test stats 🧪

Test Results
Failed 0
Passed 12
Skipped 0
Total 12

@ruflin
Copy link
Contributor Author

ruflin commented Jun 29, 2020

Somehow if the 0.1.0 version of the base package was around, the base package was not loaded by the registry at all. I couldn't find out yet why but without it works, so leaving it as is.

@ruflin ruflin marked this pull request as ready for review June 29, 2020 07:41
@ruflin
Copy link
Contributor Author

ruflin commented Jun 29, 2020

@kuisathaverat If you are ok with this, I suggest we get this in.

As a follow up, I will create the other branches for staging and production off this and then we can start to adjust the services running to point to the right place.

@ruflin
Copy link
Contributor Author

ruflin commented Jun 29, 2020

@mtojek At one stage, we should then switch over the release script to this branch and push directly instead of using a release script. We will then need additional script(s) to move things to staging and open pr to production for packages.

@ruflin ruflin merged commit 62b612b into elastic:snapshot Jun 29, 2020
@ruflin ruflin deleted the get-snapshot-ready branch June 29, 2020 11:36
@ruflin
Copy link
Contributor Author

ruflin commented Jun 29, 2020

@kuisathaverat I hoped after this got merged that docker pull docker.elastic.co/package-registry/distribution:snapshot would work but it seems the image is not available?

@kuisathaverat
Copy link
Contributor

I have opened a PR to add the stages to build the Docker images

cachedout pushed a commit to kuisathaverat/package-storage that referenced this pull request Aug 4, 2020
This adds a Dockerfile to the package-storage branch based on which a distribution of the package-registry with packages is built.
thomasneirynck pushed a commit to thomasneirynck/package-storage that referenced this pull request Sep 28, 2021
To show which versions of a package exist, the `/search` endpoint must support filtering by a package and then return all versions of this package.

This introduces the parameter `package` with which queries like `/search?package=mysql` can be created.

These results can be used for showing a drop down when upgrading a version to show which other versions exist.

To have an example package for testing this, the `multiversion` package was added. It can be queried with `/search?package=multiversion`.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants