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

chore(build): remove build process from repo #319

Merged
merged 5 commits into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from 4 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
34 changes: 13 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,14 @@ jobs:
- RUN_UZFS_TESTS=0
- RUN_ZTESTS=1
- RELEASE_TAG_DOWNSTREAM=0
- os: linux
arch: arm64
env:
- ZFS_BUILD_TAGS=1
- RUN_UZFS_TESTS=0
- RUN_ZTESTS=0
- RELEASE_TAG_DOWNSTREAM=0

before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get install --yes -qq gcc-6 g++-6
- sudo apt-get install --yes -qq build-essential autoconf libtool gawk alien fakeroot libaio-dev jq
# linux-header package name is different on arm.
- if [ "$TRAVIS_CPU_ARCH" == "arm64" ]; then
sudo apt-get install --yes -qq linux-headers-generic;
else
sudo apt-get install --yes -qq linux-headers-$(uname -r);
fi
- sudo apt-get install --yes -qq linux-headers-$(uname -r);
- sudo apt-get install --yes -qq zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev libjson-c-dev
- sudo apt-get install --yes -qq lcov libjemalloc-dev
# packages for tests - only on amd64
- if [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then
sudo apt-get install --yes -qq parted lsscsi ksh attr acl nfs-kernel-server fio;
fi
Expand All @@ -74,7 +60,7 @@ install:
# we need fio repo to build zfs replica fio engine
- git clone https://github.com/axboe/fio
- cd fio
- git checkout fio-3.7
- git checkout fio-3.9
- ./configure
- make -j4
- cd ..
Expand All @@ -90,7 +76,7 @@ install:
sudo dpkg -i *.deb;
fi
- cd ..
# Build libcstor for uzfs feature
# Clone and build libcstor for uzfs feature
- git clone https://github.com/openebs/libcstor.git
- cd libcstor
- if [ ${TRAVIS_BRANCH} == "develop" ]; then git checkout master; else git checkout ${TRAVIS_BRANCH} || git checkout master; fi
Expand All @@ -110,6 +96,14 @@ install:
make --no-print-directory -s pkg-utils pkg-kmod || travis_terminate 1;
sudo dpkg -i *.deb || travis_terminate 1;
fi
# Return to libcstor code to complie zrepl which is responsible for uZFS feature.
# Save the current location to get back
- pushd .
# Go to zrepl directory to build zrepl
- cd ../libcstor/cmd/zrepl
- make
# return to cstor code
- popd
before_script:
- make cstyle;
script:
Expand All @@ -123,9 +117,7 @@ script:
sudo /sbin/modprobe zfs;
travis_wait 10 /sbin/ztest || travis_terminate 1;
fi
- if [ $ZFS_BUILD_TAGS = 1 ]; then
./build_image.sh || travis_terminate 1;
fi

# If this build is running due to travis release tag, and
# this job indicates to push the release downstream, then
# go ahead and tag the dependent repo.
Expand Down Expand Up @@ -169,7 +161,7 @@ script:

REL_BRANCH=$(echo $(echo "$TRAVIS_TAG" | cut -d'-' -f1 | rev | cut -d'.' -f2- | rev).x$REL_SUFFIX);

./buildscripts/git-release "$REPO_ORG/istgt" "$TRAVIS_TAG" "$REL_BRANCH" || travis_terminate 1;
./buildscripts/git-release "$REPO_ORG/libcstor" "$TRAVIS_TAG" "$REL_BRANCH" || travis_terminate 1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this steps supposed to do? why this change required?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will help to trigger the release on the downstream repo from Travis... Since with this PR, images will be built from libcstor after i.e only after completing the libcstor Travis images & code will be pushed to corresponding image repositories and source repositories...

Existing system: Since images are pushed from cstor triggering istgt release from cstor is good(With this PR things will change).

Release flow(For creating release images):
Existing flow: openebs/linux-utils ---> openebs/libcstor ---> openebs/cstor ---> openebs/istgt ....
Updated flow: openebs/linux-utils ---> openebs/cstor ---> openebs/libcstor ---> openebs/istgt ....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mittachaitu let us keep the old flow, as libcstor will become the main repo later on (we will probably rename it) which will tag all dependant repo.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so you mean cstor and istgt will be triggered from libcstor itself(after renaming it).... that makes sense.

Then I no need to raise a PR in openebs/linux-utils cc: @kmova

Copy link
Member

@pawanpraka1 pawanpraka1 Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, we need base image first. We can build everything from libcstor. and cstor will be just a dependency.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are building a base image from libcstor itself https://github.com/openebs/libcstor/blob/35c939ccb7473e2674a3fe9877c33cd74115740a/build_image.sh#L120. So can I change it to(Since base and main images is built from libcstor)

                                                   --------> openebs/cstor
openebs/linux-utils ---> openebs/libcstor  ----->  |
                                                   --------> openebs/istgt ----> other dependent repos

Copy link
Member

@pawanpraka1 pawanpraka1 Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mittachaitu I see a problem. The image should be pushed at last. And since we are now pushing from libcstor, that should be done after build is successful on cstor. So cstor should be tagged first.

The other thing is, we any way build everything from libcstor, so tagging cstor does not serve any purpose. just that we have marked the code for a particular tag.

let us go ahead with the way you did, later on we will decide how can we do that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I remove the triggering downstream repo from cstor?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let us go ahead with the way you did, later on we will decide how can we do that.

Ok

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah.. triggering builds from cstor can be removed.

fi
after_failure:
- find /var/tmp/test_results/current/log -type f -name '*' -printf "%f\n" -exec cut -c -$ZFS_TEST_TRAVIS_LOG_MAX_LENGTH {} \;
Expand Down
124 changes: 0 additions & 124 deletions build_image.sh

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ SUBDIRS += mount_zfs fsck_zfs zvol_id vdev_id arcstat dbufstat zed
SUBDIRS += arc_summary raidz_test zgenhostid

if ENABLE_UZFS
SUBDIRS += zrepl uzfs_test
SUBDIRS += uzfs_test
endif

1 change: 0 additions & 1 deletion cmd/zrepl/.gitignore

This file was deleted.

27 changes: 0 additions & 27 deletions cmd/zrepl/Makefile.am

This file was deleted.

Loading