-
Notifications
You must be signed in to change notification settings - Fork 9
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
INFRA-427: Add a new deployment type to accommodate the new Ozone packaging #42
Conversation
Thanks @enyachoke for this good piece of work. With this new deployment type, are we allowed to provide anything as Maven artifact anymore? Or has this been deprecated? |
You can still provide a Maven artifact. I will add a spec to validate that |
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.
Sorry, I've had started to review and got interrupted.
Let me publish what I had commented.
@@ -112,7 +112,7 @@ module.exports = { | |||
} else if (deployment.hostDir === "") { | |||
throw new Error("The 'host dir' is not specified."); | |||
} | |||
|
|||
console.log(JSON.stringify(deployment)); |
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.
Should be removed.
// expected += scripts.rsync( | ||
// { ...instanceDef.deployment.host.value, ...{ remoteDst: true } }, | ||
// config.getCDDockerDirPath(instanceDef.uuid), | ||
// path.resolve( | ||
// instanceDef.deployment.hostDir, | ||
// instanceDef.name, | ||
// "docker_compose" | ||
// ), | ||
// true, | ||
// null, | ||
// "-avzz --delete" | ||
// ); |
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.
What should we do with this? Not applicable anymore with this new deployment type?
@@ -11,25 +11,35 @@ const heredoc_3 = cst.HEREDOC_3; | |||
const utils = require("../utils/utils"); | |||
const model = require("../utils/model"); | |||
const createEnvVarFile = function(instanceDef, dockerComposePath) { |
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 don't think this function should be Docker specific, right?
Please rename to something more generic.
dockerComposeFiles: ["docker-compose.yml", "docker-compose-2.yml"], | ||
envFiles: ["env-file-1", "env-file-2"], | ||
value: { | ||
mavenProject: { |
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.
Let's remove support for mavenProject
as part of this new type.
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 rename the file, if it's still needed, dockerComposeGenericLegacy.spec.js
group: "tlc", | ||
deployment: { | ||
hostDir: "/var/docker-volumes/", | ||
workDir: "/var/docker-volumes/artifacts/run/docker", |
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.
Let's move this key to value
and rename it to projectPath
node-scripts/src/utils/config.js
Outdated
@@ -382,7 +382,8 @@ module.exports = { | |||
"dockerCompose", | |||
"dockerComposeGit", | |||
"dockerComposeMaven", | |||
"dockerComposeGenericMaven" | |||
"dockerComposeGenericMaven", | |||
"dockerComposeProjectDir" |
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.
Rename to dockerComposeFromArtifact.
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 seems that you've dropped this addition:
A type which assumes that the Docker Compose project will be installed through the processing of the
artifacts
section.
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.
Tried it and works good.
) | ||
) { | ||
throw new Error( | ||
"The Docker compose deployment value should be provided as an instance of 'DockerComposeFromArtifactDeployment'." |
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.
Could you replace by:
The 'DockerComposeFromArtifact' deployment value should be provided as an instance of...
This PR handles changes needed for https://mekomsolutions.atlassian.net/browse/INFRA-427 and https://mekomsolutions.atlassian.net/browse/INFRA-428. I still need to investigate an Issue with a failing test but we can start reviewing the code. The name of the project type is not final so suggestions are welcome.