-
Notifications
You must be signed in to change notification settings - Fork 343
Refactor template, especially for 5+ #124
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
Conversation
majorVersion="${version%%.*}" | ||
repoBase="http://packages.elasticsearch.org/elasticsearch/${majorVersion}.x/debian" | ||
case "$majorVersion" in | ||
5) repoBase="https://artifacts.elastic.co/packages/${majorVersion}.x-prerelease/apt" ;; |
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.
Since this is -prerelease
, I wonder if we should rename the 5.0
folder to 5.0-rc
like we do in other repos (such as docker
) to explicitly denote that it's tracking the pre-releases instead of just doing version-based hacking like this. Thoughts?
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.
Depends on if you want to have to rename the folder on the release. We don't name the folder special in mysql, postgres, or mongodb, but some of their versions don't have beta or rc in the name. Though this is a specific apt repo just for pre-releases so it makes some sort of sense.
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.
Yeah, we'll have to make changes at release time anyhow (to adjust the repo), so IMO renaming the directory is simpler than looking for this line in update.sh
(and then if there's a pre-release of 5.0.x later that we want to pull in, we can do that too).
Ok, I'll update.
This accounts for the changes in docker-library#123
7416d6a
to
e9c56dd
Compare
Updated: $ ./update.sh
+ cp docker-entrypoint.sh 1.5/
+ sed '
s/%%ELASTICSEARCH_VERSION%%/1.5.2/g;
s!%%ELASTICSEARCH_REPO_BASE%%!http://packages.elasticsearch.org/elasticsearch/1.5/debian!g;
' Dockerfile.template
+ cp docker-entrypoint.sh 1.6/
+ sed '
s/%%ELASTICSEARCH_VERSION%%/1.6.2/g;
s!%%ELASTICSEARCH_REPO_BASE%%!http://packages.elasticsearch.org/elasticsearch/1.6/debian!g;
' Dockerfile.template
+ cp docker-entrypoint.sh 1.7/
+ sed '
s/%%ELASTICSEARCH_VERSION%%/1.7.5/g;
s!%%ELASTICSEARCH_REPO_BASE%%!http://packages.elasticsearch.org/elasticsearch/1.7/debian!g;
' Dockerfile.template
+ cp docker-entrypoint.sh 2.0/
+ sed '
s/%%ELASTICSEARCH_VERSION%%/2.0.2/g;
s!%%ELASTICSEARCH_REPO_BASE%%!http://packages.elasticsearch.org/elasticsearch/2.x/debian!g;
' Dockerfile.template
+ cp docker-entrypoint.sh 2.1/
+ sed '
s/%%ELASTICSEARCH_VERSION%%/2.1.2/g;
s!%%ELASTICSEARCH_REPO_BASE%%!http://packages.elasticsearch.org/elasticsearch/2.x/debian!g;
' Dockerfile.template
+ cp docker-entrypoint.sh 2.2/
+ sed '
s/%%ELASTICSEARCH_VERSION%%/2.2.2/g;
s!%%ELASTICSEARCH_REPO_BASE%%!http://packages.elasticsearch.org/elasticsearch/2.x/debian!g;
' Dockerfile.template
+ cp docker-entrypoint.sh 2.3/
+ sed '
s/%%ELASTICSEARCH_VERSION%%/2.3.5/g;
s!%%ELASTICSEARCH_REPO_BASE%%!http://packages.elasticsearch.org/elasticsearch/2.x/debian!g;
' Dockerfile.template
+ cp docker-entrypoint.sh 2.4/
+ sed '
s/%%ELASTICSEARCH_VERSION%%/2.4.1/g;
s!%%ELASTICSEARCH_REPO_BASE%%!http://packages.elasticsearch.org/elasticsearch/2.x/debian!g;
' Dockerfile.template
+ cp docker-entrypoint.sh 5.0-rc/
+ sed '
s/%%ELASTICSEARCH_VERSION%%/5.0.0-rc1/g;
s!%%ELASTICSEARCH_REPO_BASE%%!https://artifacts.elastic.co/packages/5.x-prerelease/apt!g;
' Dockerfile.template $ ./generate-stackbrew-library.sh
# this file is generated via https://github.com/docker-library/elasticsearch/blob/f5abb68ac066bfedae3822f43894cfbdbc99f4c2/generate-stackbrew-library.sh
Maintainers: Tianon Gravi <[email protected]> (@tianon),
Joseph Ferguson <[email protected]> (@yosifkit)
GitRepo: https://github.com/docker-library/elasticsearch.git
Tags: 1.5.2, 1.5
GitCommit: e9c56dda865977051c5eceea99eeb1af9ffa4408
Directory: 1.5
Tags: 1.6.2, 1.6
GitCommit: e9c56dda865977051c5eceea99eeb1af9ffa4408
Directory: 1.6
Tags: 1.7.5, 1.7, 1
GitCommit: e9c56dda865977051c5eceea99eeb1af9ffa4408
Directory: 1.7
Tags: 2.0.2, 2.0
GitCommit: e9c56dda865977051c5eceea99eeb1af9ffa4408
Directory: 2.0
Tags: 2.1.2, 2.1
GitCommit: e9c56dda865977051c5eceea99eeb1af9ffa4408
Directory: 2.1
Tags: 2.2.2, 2.2
GitCommit: e9c56dda865977051c5eceea99eeb1af9ffa4408
Directory: 2.2
Tags: 2.3.5, 2.3
GitCommit: e9c56dda865977051c5eceea99eeb1af9ffa4408
Directory: 2.3
Tags: 2.4.1, 2.4, 2, latest
GitCommit: e9c56dda865977051c5eceea99eeb1af9ffa4408
Directory: 2.4
Tags: 5.0.0-rc1, 5.0.0, 5.0, 5
GitCommit: e9c56dda865977051c5eceea99eeb1af9ffa4408
Directory: 5.0-rc |
if [ "${version%%.*}" -ge 2 ]; then | ||
repoBase="http://packages.elasticsearch.org/elasticsearch/${version%%.*}.x/debian" | ||
|
||
rcVersion="${version%-rc}" |
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.
Do you think we should generalize this to include beta/alpha or just name their folders -rc
as well?
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.
In the other places we've used -rc
to mean "pre-release" generally, which IMO is reasonably sane (since most upstreams don't seem to treat different types of pre-releases much differently).
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.
Also, when it comes down to it, we only care whether it's a pre-release or not since we don't usually want to add latest
to a pre-release. 😄
- `celery`: 4.0.0rc5 - `elasticsearch`: refactor template (docker-library/elasticsearch#124) - `golang`: add `nanoserver` variants (docker-library/golang#116) - `java`: debian 9~b140-1 - `kibana`: fix `server.host` in 5+ (docker-library/kibana#60) - `mariadb`: 5.5.53+maria-1~wheezy - `openjdk`: debian 9~b140-1 - `php`: 5.6.27; template refactor for better pre-releases support (docker-library/php#314) - `ruby`: bundler 1.13.5
This commit was created by the elastic-dockerfiles-publisher.
This accounts for the changes in #123