Skip to content

CI Deploy: moved workspace to absolute path #193

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

Merged
merged 5 commits into from
Sep 2, 2019
Merged
Show file tree
Hide file tree
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
21 changes: 13 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,32 @@ commands:
paths:
- deps
key: v1-dependencies-{{ checksum "get_deps.sh" }}
- run:
name: Set up workspace
command: |
sudo mkdir -p /workspace
sudo chown `whoami` /workspace
- run:
name: Build
command: make -C opt all SHOW=1
- run:
name: Test
command: |
mkdir -p ~/workspace/tests
mkdir -p /workspace/tests
make -C opt test SHOW=1
cp test/logs/* ~/workspace/tests
cp test/logs/* /workspace/tests
- run:
name: Package
command: make -C opt pack BRANCH="${CIRCLE_BRANCH//[^A-Za-z0-9._-]/_}" INTO=~/workspace/packages SHOW=1
command: make -C opt pack BRANCH="${CIRCLE_BRANCH//[^A-Za-z0-9._-]/_}" INTO=/workspace/packages SHOW=1
- persist_to_workspace:
root: ~/workspace
root: /workspace
paths:
- 'packages/release/*.zip'
- 'packages/release/*.tgz'
- 'packages/branch/*.zip'
- 'packages/branch/*.tgz'
- store_test_results:
path: ~/workspace/tests
path: /workspace/tests
deploy:
parameters:
from:
Expand Down Expand Up @@ -80,11 +85,11 @@ jobs:
- image: 'redislabsmodules/rmbuilder:latest'
steps:
- attach_workspace:
at: ~/workspace
at: /workspace
- deploy:
from: ~/workspace/packages/<<parameters.package>>
from: /workspace/packages/<<parameters.package>>
- store_artifacts:
path: ~/workspace/packages/<<parameters.package>>
path: /workspace/packages/<<parameters.package>>

deploy_docs:
docker:
Expand Down
11 changes: 6 additions & 5 deletions opt/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,16 @@ pack_ramp
[[ $DEPS == 1 ]] && pack_deps

if [[ ! -z $INTO ]]; then
mkdir -p $INTO/release $INTO/branch
cd $INTO/release
mkdir -p $INTO
cd $INTO
mkdir release branch

for f in $RELEASE_ARTIFACTS; do
[[ -f $BINDIR/$f ]] && ln -sf $(realpath --relative-to . $BINDIR/$f) $(basename $f)
[[ -f $BINDIR/$f ]] && cp $BINDIR/$f release/
done

cd $INTO/branch
for f in $DEV_ARTIFACTS; do
[[ -f $BINDIR/$f ]] && ln -sf $(realpath --relative-to . $BINDIR/$f) $(basename $f)
[[ -f $BINDIR/$f ]] && cp $BINDIR/$f branch/
done
fi

Expand Down