Skip to content

Commit c9e22e9

Browse files
committed
Force build
1 parent a10db47 commit c9e22e9

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.github/actions/proxy-janky-build/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ inputs:
1010
branch-name:
1111
description: 'The name of the branch to use'
1212
required: true
13+
force:
14+
description: 'Force the job to run even if it is already passed'
15+
required: false
1316
envVars:
1417
description: 'Comma separated list of key value pairs to pass to Janky - ex: key1=value1,key2=value2,key3=value3'
1518
required: false
@@ -24,6 +27,7 @@ runs:
2427
-token ${{ inputs.janky-token }} \
2528
-job ${{ inputs.job-name }} \
2629
-branch ${{ inputs.branch-name }} \
30+
-force ${{ inputs.force }} \
2731
-envVars ${{ inputs.envVars }}
2832
shell: bash
2933
working-directory: .github/actions/proxy-janky-build

.github/actions/proxy-janky-build/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func main() {
4343
job := flag.String("job", "", "Name of the Janky job")
4444
token := flag.String("token", "", "Name of the Janky token")
4545
branch := flag.String("branch", "", "Name of the Git branch")
46+
force := flag.Bool("force", false, "Force a build even if one is already passed")
4647
envVars := flag.String("envVars", "", "Comma separated list of key value pairs to pass to Janky - ex: key1=value1,key2=value2,key3=value3")
4748
flag.Parse()
4849

@@ -56,12 +57,14 @@ func main() {
5657
type buildRequestObject struct {
5758
BuildableName string `json:"buildable_name"`
5859
BranchName string `json:"branch_name"`
60+
Force bool `json:"force"`
5961
EnvVars map[string]string `json:"env_vars"`
6062
}
6163

6264
requestBody := buildRequestObject{
6365
BuildableName: *job,
6466
BranchName: *branch,
67+
Force: *force,
6568
}
6669

6770
// Parse the envVars flag into a map and add to the request payload

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ jobs:
3737
janky-token: '${{ secrets.API_AUTH_TOKEN }}'
3838
job-name: '${{ matrix.jankyJobName }}'
3939
branch-name: '${{ env.TARGET_BRANCH }}'
40+
force : 'true'
4041
envVars: "JANKY_ENV_BACKUP_UTILS_BRANCH=${{ env.SOURCE_BRANCH }}"

0 commit comments

Comments
 (0)