// Execute writes the pipeline manifest file.
Execute writes the pipeline manifest file.
// Execute writes the pipeline manifest file .
func (o *initPipelineOpts) Execute() error {
	secretName := o.createSecretName()
	_, err := o.secretsmanager.CreateSecret(secretName, o.githubAccessToken)
	if err != nil {
		var existsErr *secretsmanager.ErrSecretAlreadyExists
		if !errors.As(err, &existsErr) {
			return err
		}
		log.Successf("Secret already exists for %s! Do nothing.\n", color.HighlightUserInput(o.githubRepo))
	} else {
		log.Successf("Created the secret %s for pipeline source stage!\n", color.HighlightUserInput(secretName))
	}
	o.secretName = secretName
	err = o.createPipelineManifest()
	if err != nil {
		return err
	}
	err = o.createBuildspec()
	if err != nil {
		return err
	}
	return nil
}
func ( o * initPipelineOpts ) Execute ( ) error { secretName := o . createSecretName ( ) _ , err := o . secretsmanager . CreateSecret ( secretName , o . githubAccessToken ) if err != nil { var existsErr * secretsmanager . ErrSecretAlreadyExists if ! errors . As ( err , & existsErr ) { return err } log . Successf ( " \n " , color . HighlightUserInput ( o . githubRepo ) ) } else { log . Successf ( " \n " , color . HighlightUserInput ( secretName ) ) } o . secretName = secretName err = o . createPipelineManifest ( ) if err != nil { return err } err = o . createBuildspec ( ) if err != nil { return err } return nil }
Execute writes the pipeline manifest file.
Execute writes the pipeline manifest file .
// write pipeline.yml file, populate with: //   - github repo as source //   - stage names (environments) //   - enable/disable transition to prod envs