Skip to content

Commit bb1ce61

Browse files
committed
Add logging. Remove debug. Fix source path
1 parent a572f7a commit bb1ce61

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

deploy/tasks/pre-build-git.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ spec:
8383
key: gitdeploytoken
8484
args:
8585
- deploy-pre-build-source
86-
- --source-path=$(workspaces.source.path)/source
86+
- --source-path=/var/workdir
8787
- --task-run-name=$(context.taskRun.name)
8888
- --scm-uri=$(params.SCM_URL)
8989
- --scm-commit=$(params.SCM_HASH)

java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/deploy/git/Git.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ protected GitStatus pushRepository(Path path, String httpTransportUrl, String co
127127
//var tagNameFromDescribe = jGit.describe().setTags(true).setTarget(commit).call();
128128
var objectId = ObjectId.fromString(commit);
129129
var jRepo = jGit.getRepository();
130+
Log.infof("### Git repository %s " , jGit.getRepository().getDirectory() );
130131
if (new File(jGit.getRepository().getDirectory(), "shallow").exists()) {
131132
Log.warnf("Git repository is shallow repository - converting.");
132133
jGit.fetch().setUnshallow(true).call();
@@ -146,6 +147,7 @@ protected GitStatus pushRepository(Path path, String httpTransportUrl, String co
146147
}
147148
var branchName = tagName + "-jbs-branch";
148149
var createBranch = jGit.branchList().call().stream().map(Ref::getName).noneMatch(("refs/heads/" + branchName)::equals);
150+
Log.infof("Will create branch %s for tag %s and branch name %s", createBranch, tagName, branchName);
149151
var ref = jGit.checkout().setStartPoint(tagName).setName(branchName).setCreateBranch(createBranch).call();
150152
StoredConfig jConfig = jRepo.getConfig();
151153
Log.infof("Updating current origin of %s to %s", jConfig.getString("remote", "origin", "url"),

pkg/reconciler/dependencybuild/buildrecipeyaml.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
433433
},
434434
},
435435
}}
436-
fmt.Printf("### RECIPE : DISABLEDPLUGINS %#v \n", recipe.DisabledPlugins)
437436
pipelinePreBuildGitTask := []tektonpipeline.PipelineTask{{
438437
Name: PreBuildGitTaskName,
439438
RunAfter: []string{PreBuildTaskName},
@@ -507,7 +506,6 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
507506
},
508507
},
509508
}}
510-
fmt.Printf("### prebuildgit %#v \n", pipelinePreBuildGitTask)
511509
ps.Tasks = append(pipelineGitTask, ps.Tasks...)
512510
ps.Tasks = append(pipelinePreBuildTask, ps.Tasks...)
513511
ps.Tasks = append(pipelinePreBuildGitTask, ps.Tasks...)
@@ -806,7 +804,6 @@ use-archive oci:$URL@$AARCHIVE=%s`, orasOptions, registryArgsWithDefaults(jbsCon
806804
ps.Tasks[index].Params = append(ps.Tasks[index].Params, tektonpipeline.Param{
807805
Name: i.Name,
808806
Value: value})
809-
fmt.Printf("### index %s and params %#v \n ", ps.Tasks[index].Params)
810807
index += 1
811808
ps.Tasks[index].Params = append(ps.Tasks[index].Params, tektonpipeline.Param{
812809
Name: i.Name,

0 commit comments

Comments
 (0)