-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to declare a env key in each pipeline task (#1970)
The `env` key takes on some of the responsibilities of the dependsOn config key, but notably does not accept strings that start with "$". The goal of this change is to separate file dependencies from environmental dependencies, so we can continue to improve cache partitioning.
- Loading branch information
Showing
8 changed files
with
144 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "test-repo" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"pipeline": { | ||
"task1": { | ||
// all invalid value | ||
"env": ["$A", "$B"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "test-repo" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"pipeline": { | ||
"task1": { | ||
// Mixed values | ||
"env": ["$A", "B"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "test-repo" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// mocked test comment | ||
{ | ||
"pipeline": { | ||
// Only legacy declaration | ||
"task1": { | ||
"dependsOn": ["$A"] | ||
}, | ||
// Only new declaration | ||
"task2": { | ||
"env": ["A"] | ||
}, | ||
// Same var declared in both | ||
"task3": { | ||
"dependsOn": ["$A"], | ||
"env": ["A"] | ||
}, | ||
// Different vars declared in both | ||
"task4": { | ||
"dependsOn": ["$A"], | ||
"env": ["B"] | ||
}, | ||
|
||
// some edge cases | ||
"task6": { "env": ["A", "B", "C"], "dependsOn": ["$D", "$E", "$F"] }, | ||
"task7": { "env": ["A", "B", "C"], "dependsOn": ["$A", "$B", "$C"] }, | ||
"task8": { "env": ["A", "B", "C"], "dependsOn": ["A", "B", "C"] }, | ||
"task9": { "env": [], "dependsOn": ["$A"] }, | ||
"task10": { "env": ["A", "A"], "dependsOn": ["$A", "$A"] }, | ||
"task11": { "env": ["A", "A"], "dependsOn": ["$B", "$B"] } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters