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

Support Disabling Source Type Override Parameters #57

Open
ejohn20 opened this issue Nov 2, 2020 · 6 comments
Open

Support Disabling Source Type Override Parameters #57

ejohn20 opened this issue Nov 2, 2020 · 6 comments
Labels
enhancement New feature or request
Projects

Comments

@ejohn20
Copy link

ejohn20 commented Nov 2, 2020

The source type override parameter is automatically overridden on the CodeBuild job to the GITHUB type and current repository. We have a scenario that requires our CodeBuild job to source from a different location, but would still like to drive the execution of the CodeBuild job from a GitHub action.

Can we add a new parameter that allows us to disable the source type override parameters and use the CodeBuild job's default values?

@robin-aws robin-aws added the enhancement New feature or request label Nov 27, 2020
@robin-aws robin-aws added this to To do in Backlog Nov 27, 2020
@tomcavanaugh
Copy link

Adding another vote for this capability, we do not want the GitHub repository replicated to the CodeBuild job - we wish to manage this ourselves.

@dawidbladzich-ca
Copy link

Another vote, we would like to use this action to run already configured code build jobs.

@cbuto
Copy link

cbuto commented Jun 30, 2021

@robin-aws Is there any update on getting PR #64 reviewed?

@rathecharlesPFG
Copy link

@robin-aws Our organization has a ton of use-cases for this enhancement (and the workaround is fairly painful). Any chance this gets reviewed anytime soon?

@sciurus
Copy link

sciurus commented Dec 3, 2021

We've simply forked this action and disabled these overrides, so we can use what is specified on the codebuild job.

diff --git a/code-build.js b/code-build.js
index 67d2e14..55be488 100644
--- a/code-build.js
+++ b/code-build.js
@@ -152,7 +152,7 @@ async function waitForBuildEndTime(
 
 function githubInputs() {
   const projectName = core.getInput("project-name", { required: true });
-  const { owner, repo } = github.context.repo;
+  // const { owner, repo } = github.context.repo;
   const { payload } = github.context;
   // The github.context.sha is evaluated on import.
   // This makes it hard to test.
@@ -177,8 +177,8 @@ function githubInputs() {
 
   return {
     projectName,
-    owner,
-    repo,
+    // owner,
+    // repo,
     sourceVersion,
     buildspecOverride,
     envPassthrough,
@@ -188,15 +188,15 @@ function githubInputs() {
 function inputs2Parameters(inputs) {
   const {
     projectName,
-    owner,
-    repo,
+    // owner,
+    // repo,
     sourceVersion,
     buildspecOverride,
     envPassthrough = [],
   } = inputs;
 
-  const sourceTypeOverride = "GITHUB";
-  const sourceLocationOverride = `https://github.com/${owner}/${repo}.git`;
+  // const sourceTypeOverride = "GITHUB";
+  // const sourceLocationOverride = `https://github.com/${owner}/${repo}.git`;
 
   const environmentVariablesOverride = Object.entries(process.env)
     .filter(
@@ -209,8 +209,8 @@ function inputs2Parameters(inputs) {
   return {
     projectName,
     sourceVersion,
-    sourceTypeOverride,
-    sourceLocationOverride,
+    // sourceTypeOverride,
+    // sourceLocationOverride,
     buildspecOverride,
     environmentVariablesOverride,
   };

@akazakou
Copy link

@ejohn20 You can try dark-mechanicum/aws-codebuild github action. By default, it does not pass anything but is very flexible in configuration. You literally can override any parameter for the startBuild API call ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Backlog
To do
Development

No branches or pull requests

8 participants