Skip to content
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

Update distribution-scripts and publish nightly packages to bintray #9663

Merged
merged 3 commits into from
Aug 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 62 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
- run: |
git clone https://github.com/crystal-lang/distribution-scripts.git ~/distribution-scripts
cd ~/distribution-scripts
git checkout cb8f2c51a042609d7c45707ba8369b37d011037f
git checkout 44172615fa196fb8592046582471fdfc8d69472c
# persist relevant information for build process
- run: |
cd ~/distribution-scripts
Expand Down Expand Up @@ -225,12 +225,17 @@ jobs:
steps:
- attach_workspace:
at: /tmp/workspace
- checkout
- run: |
# We need CRYSTAL_VERSION in prepare_nightly to use src/VERSION so we publish them as x.y.z-dev in apt/rpm
#
# How to brand it
echo "export CRYSTAL_VERSION=$(cat src/VERSION)" >> /tmp/workspace/distribution-scripts/build.env
#
# TODO: We might want to do that on docker images also to support updates on multiple development versions the same date.
- run: |
cd /tmp/workspace/distribution-scripts

# How to brand it
export VERSION=nightly-$(date '+%Y%m%d')
echo "export CRYSTAL_VERSION=$VERSION" >> build.env
echo "export DOCKER_TAG=nightly" >> build.env

# Build from working directory (needed for omnibus and when version does not match branch/tag)
Expand Down Expand Up @@ -358,6 +363,24 @@ jobs:
paths:
- build

dist_bintray_nightly:
machine: true
steps:
- attach_workspace:
at: /tmp/workspace
- run:
no_output_timeout: 20m
command: |
cd /tmp/workspace/distribution-scripts
source build.env
cd bintray
./publish-nightly.sh $CRYSTAL_VERSION $(date '+%Y-%m-%d') \
/tmp/workspace/build/crystal-*-linux-x86_64.tar.gz \
/tmp/workspace/build/crystal-*-linux-i686.tar.gz
- store_artifacts:
path: /tmp/workspace/distribution-scripts/bintray/build/unsigned
destination: unsigned

dist_docker:
machine: true
steps:
Expand Down Expand Up @@ -522,6 +545,7 @@ workflows:
branches:
ignore:
- /release\/.+/
- /package\/.+/
- /.*\bci\b.*/
- test_linux32_std:
filters: *unless_maintenance
Expand Down Expand Up @@ -644,6 +668,10 @@ workflows:
- dist_darwin:
requires:
- prepare_nightly
- dist_bintray_nightly:
requires:
- dist_linux
- dist_linux32
- dist_docker:
requires:
- dist_linux
Expand Down Expand Up @@ -752,3 +780,33 @@ workflows:
- dist_darwin
- dist_snap
- dist_docs

package_build:
jobs:
- prepare_common:
filters: &package
branches:
only:
- /package\/.+/
- prepare_maintenance:
filters: *package
requires:
- prepare_common
- dist_linux:
filters: *package
requires:
- prepare_maintenance
- dist_linux32:
filters: *package
requires:
- prepare_maintenance
- dist_darwin:
filters: *package
requires:
- prepare_maintenance
- dist_artifacts:
filters: *package
requires:
- dist_linux
- dist_linux32
- dist_darwin