-
Notifications
You must be signed in to change notification settings - Fork 156
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
Fixing: Deprecate Using the yegor256/rultor Docker Image #1045
Changes from 1 commit
a755cad
bcceb7f
01077c8
962c247
7af74de
172fca3
ea9cf66
9671aab
428f49c
1cfee31
038e253
929e881
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
#!/bin/sh | ||
|
||
#@todo #754:30min Remove the deprecation code from the shell. | ||
# Move the code to Java. May be | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sebing you wrote "may be" but actually in puzzles we should be sure about the solution |
||
# \main\java\com\rultor\agents\daemons\StartsDaemon.java is | ||
# the place to implement this. | ||
|
||
if $image = "yegor256/rultor"; then | ||
deprecation | ||
fi | ||
|
||
mkdir -p ~/.ssh | ||
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config | ||
chmod 600 ~/.ssh/config | ||
|
@@ -103,3 +112,19 @@ function docker_when_possible { | |
sudo chown -R $(whoami) repo | ||
cd repo | ||
} | ||
|
||
function deprecation(){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sebing this function doesn't return anything, do it should be named with verb |
||
read -d '' text << EOF | ||
#### Deprecation Notice #### \n | ||
You are using the Rultor default Docker image in your build. | ||
The Rultor has to:\n | ||
1. Provide the sudo package/command and not stop doing so whenever | ||
a change to the Dockerfile is made, even if Rultor itself does not | ||
need the sudo command.\n | ||
2. Not install any gems to the global scope that interfere with | ||
pdd or est\n | ||
#####################################\n | ||
EOF | ||
|
||
echo $text | ||
} |
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.
@sebing what stops you from moving it to Java in this PR?
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.
@mkordas May be the lack of my understanding of the project :)
com.rultor.agents.daemons.EndsDaemon
andcom.rultor.agents.daemons.StartsDaemon
I need the image. I cannot find the flow.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.
@original-brownbear can you propose some design solution here?
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.
@sebing @mkordas I don't think a design solution is even needed here fortunately :)
Look @sebing , just give this file a glance https://github.com/yegor256/rultor/blob/master/src/test/java/com/rultor/profiles/GithubProfileITCase.java.
It clearly shows how to extract the
script
section from the Profile, this should give you all you need to figure out theimage
on the Java end, shouldn't it ? :)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.
@original-brownbear Now the next question :) Sorry for keep asking them. (May be the link give the guts to ask them.
I can create a profile image like the test you have given, and equate that. But how do I get the current profile?
How do i get the current Profile in
com.rultor.agents.daemons.EndsDaemon
?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.
@sebing why not just go by the xpath on the xml that is available in
com.rultor.agents.daemons.EndsDaemon
, no need for instantiating aProfile
,just work by analogy from the Profile logic and how it interprets the XML, other examples of how this looks are all over the codebase :)