Deploy location inside actions.json based on branch. #3326
Replies: 3 comments 4 replies
|
I like the idea if I understand it correctly. Or the ability to add a Environment Custom Variable in the actions maybe? |
|
We have a similar (more or less) git workflow, and currently solve the branching for qa and production by using multiple vscode workspaces and multiple checkouts of the repo. I like the idea too to have a manageable option for the deploy location, it would be nice if that could be done with a placeholder so that the deploy location can be managed through the .env file. |
|
I understand the need here. And the points raised in the discussion makes perfect sense. The working directory/deploy location in Code for i is meant to be a temporary, expendable location whose sole purpose is to have the source on the IFS to be able to run compilations and builds. It wasn't designed to be a "location that maters", if I can put it like that. But I can think of a few solutions for that problem. The first that comes to my mind is having an additional step in the compilation/build action that will copy the source to the desired central location (i.e. VS Code -> IFS Work dir -> IFS Central location). Since the actions can take variables from profiles or Actions can run multiple commands at once, so the first command could be "copy to the central location" ( Using a tool like TOBi, depending on the size of your project, along with a shell script to do some preparation, could be a nice solution for your compile/build needs. Those are just a few ideas. Having the deploy location to be part of the profiles could be interesting, especially when the "shared profiles" will be implemented. But it's not coming very soon, so... |
Uh oh!
There was an error while loading. Please reload this page.
I am doing development using git and Code for i. Our team has few developers and each has their own personal deploy location. This works when we compile in development libraries. Once that is tested we merge the changes in master branch and recompile the sources in production library, so that production sources are in sync and we can also transfer the sources for debugging to production, if needed.
The issue is that when compiling from master branch, we have a central deploy location for the team. Below is how it works:
This works but is cumbersome and developer may forget to switch deployment directories, and deploying feature changes directly to central deploy directory. This has happened. Is there a way to restrict feature branches to not be deployed to central deploy directory. Maybe a dictionary in actions.json to map/hardcode deploy location for master branch and user inputted for feature branch.
I understand this is very specific and limited application but if there is a workaround. I am thinking of restricting central deploy directory to a user and an automated process through githooks for compilation(using that specific user).
All reactions