-
Notifications
You must be signed in to change notification settings - Fork 11
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
Adds changes for one branch pipelines #945
Conversation
One branch pipelines needs images to stay in working state after image start. With the new environment variable which is set in one branch pipeline, image stay in working state
@@ -64,4 +64,10 @@ done <"${topdir}/os-list.csv" | |||
|
|||
echo -e "${args}" | xargs -t -L1 -P "${nprocs}" docker | |||
|
|||
docker tag citus/"${image_name}":"${tag}" citusengine.azurecr.io/citus/"${image_name}":"${tag}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACR Push code block
@@ -1,7 +1,16 @@ | |||
#!/bin/bash | |||
|
|||
# make bash behave | |||
set -euo pipefail | |||
set -eo pipefail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When initializing the docker image in OneBranch, docker run process fall into this block so it does not die
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please consider the comments before merging
@@ -71,6 +71,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ %%release%%-pgdg main' > | |||
liblz4-1 \ | |||
libzstd1 \ | |||
libzstd-dev \ | |||
sudo \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not usually advised to use sudo in docker environment. Why is this addition necessary?
Did you consider gosu
or USER
docker directives instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it is ok then. We can not do anything about this if OneBranch decides to use an antipattern 😮💨
scripts/fetch_and_build_rpm
Outdated
if [[ -z ${CONTAINER_BUILD_RUN_ENABLED} ]]; then | ||
echo "INFO: Image working in waiting mode. Not executing build script" | ||
tail -f /dev/null | ||
exit 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is an error, does it make sense to return 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is this even reachable? How do we terminate or stop this docker image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right I added it just to show that it is not error and a valid code path. It's better to remove it. It may be confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we terminate the docker container then? Does it keep running forever indefinitely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker stop :)
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
Co-authored-by: Hanefi Onaldi <Hanefi.Onaldi@microsoft.com>
Changes drop into three categories
Note. Since nightlies are failing nightly tests in this PR fails as well. So I could not fix the problem in here I will fix it in another PR. Therefore please ignore nightly pipeline test fail for this PR
Related PRS:
citusdata/tools#233
https://msdata.visualstudio.com/Database%20Systems/_git/citus-packaging/pullrequest/817728