Skip to content

Commit

Permalink
Add logging. Remove debug. Fix source path
Browse files Browse the repository at this point in the history
  • Loading branch information
rnc committed Dec 24, 2024
1 parent a572f7a commit bb1ce61
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deploy/tasks/pre-build-git.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ spec:
key: gitdeploytoken
args:
- deploy-pre-build-source
- --source-path=$(workspaces.source.path)/source
- --source-path=/var/workdir
- --task-run-name=$(context.taskRun.name)
- --scm-uri=$(params.SCM_URL)
- --scm-commit=$(params.SCM_HASH)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ protected GitStatus pushRepository(Path path, String httpTransportUrl, String co
//var tagNameFromDescribe = jGit.describe().setTags(true).setTarget(commit).call();
var objectId = ObjectId.fromString(commit);
var jRepo = jGit.getRepository();
Log.infof("### Git repository %s " , jGit.getRepository().getDirectory() );
if (new File(jGit.getRepository().getDirectory(), "shallow").exists()) {
Log.warnf("Git repository is shallow repository - converting.");
jGit.fetch().setUnshallow(true).call();
Expand All @@ -146,6 +147,7 @@ protected GitStatus pushRepository(Path path, String httpTransportUrl, String co
}
var branchName = tagName + "-jbs-branch";
var createBranch = jGit.branchList().call().stream().map(Ref::getName).noneMatch(("refs/heads/" + branchName)::equals);
Log.infof("Will create branch %s for tag %s and branch name %s", createBranch, tagName, branchName);
var ref = jGit.checkout().setStartPoint(tagName).setName(branchName).setCreateBranch(createBranch).call();
StoredConfig jConfig = jRepo.getConfig();
Log.infof("Updating current origin of %s to %s", jConfig.getString("remote", "origin", "url"),
Expand Down
3 changes: 0 additions & 3 deletions pkg/reconciler/dependencybuild/buildrecipeyaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
},
},
}}
fmt.Printf("### RECIPE : DISABLEDPLUGINS %#v \n", recipe.DisabledPlugins)
pipelinePreBuildGitTask := []tektonpipeline.PipelineTask{{
Name: PreBuildGitTaskName,
RunAfter: []string{PreBuildTaskName},
Expand Down Expand Up @@ -507,7 +506,6 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
},
},
}}
fmt.Printf("### prebuildgit %#v \n", pipelinePreBuildGitTask)
ps.Tasks = append(pipelineGitTask, ps.Tasks...)
ps.Tasks = append(pipelinePreBuildTask, ps.Tasks...)
ps.Tasks = append(pipelinePreBuildGitTask, ps.Tasks...)
Expand Down Expand Up @@ -806,7 +804,6 @@ use-archive oci:$URL@$AARCHIVE=%s`, orasOptions, registryArgsWithDefaults(jbsCon
ps.Tasks[index].Params = append(ps.Tasks[index].Params, tektonpipeline.Param{
Name: i.Name,
Value: value})
fmt.Printf("### index %s and params %#v \n ", ps.Tasks[index].Params)
index += 1
ps.Tasks[index].Params = append(ps.Tasks[index].Params, tektonpipeline.Param{
Name: i.Name,
Expand Down

0 comments on commit bb1ce61

Please sign in to comment.