Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ey #42

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Ey #42

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions App.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func main() {
}

if ciCdRequest.Type == util.CIEVENT {
ciRequest := ciCdRequest.CiRequest
//ciRequest := ciCdRequest.CiRequest
artifactUploaded, err := runCIStages(ciCdRequest)
log.Println(util.DEVTRON, artifactUploaded, err)
var artifactUploadErr error
Expand All @@ -58,14 +58,14 @@ func main() {
os.Exit(1)
}

// sync cache
/*// sync cache
log.Println(util.DEVTRON, " cache-push")
err = helper.SyncCache(ciRequest)
if err != nil {
log.Println(err)
os.Exit(1)
}
log.Println(util.DEVTRON, " /cache-push")
log.Println(util.DEVTRON, " /cache-push")*/
} else {
err = runCDStages(ciCdRequest)
artifactUploadErr := collectAndUploadCDArtifacts(ciCdRequest.CdRequest)
Expand Down Expand Up @@ -171,13 +171,13 @@ func runCIStages(ciCdRequest *helper.CiCdTriggerEvent) (artifactUploaded bool, e
_ = os.Mkdir(util.WORKINGDIR, os.ModeDir)
}

// Get ci cache
/*// Get ci cache
log.Println(util.DEVTRON, " cache-pull")
err = helper.GetCache(ciCdRequest.CiRequest)
if err != nil {
return artifactUploaded, err
}
log.Println(util.DEVTRON, " /cache-pull")
log.Println(util.DEVTRON, " /cache-pull")*/

err = os.Chdir(util.WORKINGDIR)
if err != nil {
Expand Down
14 changes: 14 additions & 0 deletions helper/DockerHelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,20 @@ func BuildArtifact(ciRequest *CiRequest) (string, error) {
log.Println(err)
return "", err
}

/*log.Println(" -----> copying content")

// copy content
dockerCopyCommand := "docker run --rm --entrypoint \"/bin/sh\" -v /devtroncd/.m2:/root/.m3 " + dest + " -c \"rsync -tr /root/.m2/repository /root/.m3\""
dockerCopyExec := exec.Command("/bin/sh", "-c", dockerCopyCommand)
err = util.RunCommand(dockerCopyExec)
if err != nil {
log.Println(err)
return "", err
}

log.Println(" -----> copied content")*/

}
return dest, nil
}
Expand Down
2 changes: 1 addition & 1 deletion scriptExecutor.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ set -e
}

func buildDockerRunCommand(executionConf *executionConf) (string, error) {
cmdTemplate := `docker run \
cmdTemplate := `docker run --network host \
--env-file {{.EnvInputFileName}} \
-v {{.EntryScriptFileName}}:/devtron_script/_entry.sh \
-v {{.EnvOutFileName}}:/devtron_script/_out.env \
Expand Down