Commit 693e653d authored by Tomasz Maczukin's avatar Tomasz Maczukin

Go back to CI_COMMIT_REF_NAME in release scripts

parent 87e3f6d3
......@@ -211,14 +211,14 @@ development S3:
<<: *release_development
environment:
name: development/s3/${CI_COMMIT_REF_NAME}
url: https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_SLUG}/index.html
url: https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
bleeding edge S3:
<<: *release_s3
<<: *release_bleeding_edge
environment:
name: bleeding_edge/s3
url: https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_SLUG}/index.html
url: https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
bleeding edge packagecloud:
<<: *release_packagecloud
......@@ -239,7 +239,7 @@ stable S3:
<<: *release_stable
environment:
name: stable/s3
url: https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_SLUG}/index.html
url: https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
stable packagecloud:
<<: *release_packagecloud
......
......@@ -3,14 +3,15 @@
require 'digest'
class ReleaseIndexer
attr_reader :name, :version, :sources_url, :workdir
attr_reader :name, :sources_url, :version, :revision, :workdir
attr_reader :index_file, :checksum_file
attr_reader :files, :created_at
def initialize(name, version, sources_url, workdir)
def initialize(name, sources_url, version, revision, workdir)
@name = name
@version = version
@sources_url = sources_url
@version = version
@revision = revision
@workdir = workdir
@index_file = "#{workdir}/index.html"
......@@ -82,6 +83,7 @@ class ReleaseIndexer
<body>
<h1>#{title}</h1>
<p><span>Sources:</span> <a href="#{sources_url}" target="_blank">#{sources_url}</a></p>
<p><span>Revision:</span> #{revision}</p>
<p><span>Created at:</span> #{created_at}</p>
<ul>
EOS
......@@ -104,6 +106,8 @@ EOS
end
end
ReleaseIndexer.new('GitLab Runner', ENV['VERSION'],
"#{ENV['CI_PROJECT_URL']}/tree/#{ENV['CI_COMMIT_REF_SLUG']}", 'out')
.generate!
ReleaseIndexer.new('GitLab Runner',
"#{ENV['CI_PROJECT_URL']}/tree/#{ENV['CI_COMMIT_REF_NAME']}",
ENV['VERSION'],
ENV['CI_COMMIT_SHA'],
'out').generate!
......@@ -3,7 +3,7 @@
set -eo pipefail
IS_LATEST=${IS_LATEST:-}
ref_tag=${CI_COMMIT_REF_SLUG:-master}
ref_tag=${CI_COMMIT_REF_NAME:-master}
REVISION=${REVISION:-}
if [[ -z "${REVISION}" ]]; then
......
......@@ -2,7 +2,7 @@
set -eo pipefail
make s3-upload "S3_UPLOAD_PATH=${CI_COMMIT_REF_SLUG}"
make s3-upload "S3_UPLOAD_PATH=${CI_COMMIT_REF_NAME}"
if [[ -n "${IS_LATEST}" ]]; then
make s3-upload "S3_UPLOAD_PATH=latest"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment