Commit f30bdef4 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Merge branch 'fix/release-uploads' into 'master'

Fix S3 and packagecloud uploads step in release process

Closes #2072

See merge request !455
parents 25fb7833 23f48ab1
......@@ -22,6 +22,10 @@ before_script:
tags:
- docker
#
# Prebuild stage
#
bindata:
<<: *docker
stage: prebuild
......@@ -48,6 +52,10 @@ clone test repo:
- tmp/gitlab-test
expire_in: 7d
#
# Test stage
#
code style:
stage: test
script:
......@@ -97,6 +105,10 @@ integration windows:
- integration
- windows
#
# Build stage
#
binaries:
stage: build
script:
......@@ -110,6 +122,10 @@ binaries:
tags:
- docker
#
# Package stage
#
packages:
stage: package
script:
......@@ -124,6 +140,10 @@ packages:
tags:
- docker
#
# Release stage
#
docker_images:
<<: *docker
stage: release
......@@ -142,29 +162,57 @@ docker_images:
.release: &release
stage: release
script:
before_script:
- apt-get update -yqqq >/dev/null
- apt-get install -yqqq ruby ruby-dev >/dev/null
- source ci/touch_make_dependencies
- make release
tags:
- release
development:
.release_s3: &release_s3
<<: *release
script:
- make release_s3
.release_packagecloud: &release_packagecloud
<<: *release
script:
- make release_packagecloud
.release_development: &release_development
only:
- [email protected]/gitlab-ci-multi-runner
except:
- [email protected]/gitlab-ci-multi-runner
environment: bleeding_edge
environment: development
bleeding:
<<: *release
.release_bleeding_edge: &release_bleeding_edge
only:
- [email protected]/gitlab-ci-multi-runner
- /\Av[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+\Z/@gitlab-org/gitlab-ci-multi-runner
environment: bleeding_edge
stable:
<<: *release
.release_stable: &release_stable
only:
- /\Av[0-9]+\.[0-9]+\.[0-9]+\Z/@gitlab-org/gitlab-ci-multi-runner
environment: stable_release
development S3:
<<: *release_s3
<<: *release_development
bleeding edge S3:
<<: *release_s3
<<: *release_bleeding_edge
bleeding edge packagecloud:
<<: *release_packagecloud
<<: *release_bleeding_edge
stable S3:
<<: *release_s3
<<: *release_bleeding_edge
stable packagecloud:
<<: *release_packagecloud
<<: *release_bleeding_edge
......@@ -346,16 +346,24 @@ s3-upload:
--permissions public-read \
--working-dir out \
--target-paths "$(S3_UPLOAD_PATH)/" \
--max-size $(shell du -bs out/ | cut -f1) \
$(shell cd out/; find . -type f)
@echo "\n\033[1m==> Download index file: \033[36mhttps://$$ARTIFACTS_S3_BUCKET.s3.amazonaws.com/$$S3_UPLOAD_PATH/index.html\033[0m\n"
release:
@./ci/release "$$CI_BUILD_NAME"
release_packagecloud:
# Releasing to https://packages.gitlab.com/runner/
@./ci/release_packagecloud "$$CI_BUILD_NAME"
release_s3: prepare_index
# Releasing to S3
@./ci/release_s3
prepare_index:
# Preparing index file
@./ci/prepare_index
release_docker_images:
# Releasing Docker images
@./ci/release_docker_images
check-tags-in-changelog:
......
......@@ -2,24 +2,18 @@
set -eo pipefail
apt-get install -yqqq ruby ruby-dev
make prepare_index
make s3-upload "S3_UPLOAD_PATH=$CI_BUILD_REF_NAME"
case "$1" in
development)
;;
target=$(echo ${1} | cut -f 1 -d ' ')
case "${target}" in
bleeding)
make packagecloud PACKAGE_CLOUD="runner/unstable" \
DEB_PLATFORMS="debian/jessie ubuntu/trusty ubuntu/xenial" \
RPM_PLATFORMS="el/7 fedora/23"
;;
stable)
if [[ -n "${IS_LATEST}" ]]; then
make s3-upload "S3_UPLOAD_PATH=latest"
fi
make packagecloud
;;
*)
echo "Unkown packagecloud upload target: '${target}'"
exit 1
;;
esac
#!/bin/bash
set -eo pipefail
make s3-upload "S3_UPLOAD_PATH=${CI_BUILD_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