Giter Site home page Giter Site logo

aws-codebuild-extras's People

Contributors

alessandrobologna avatar dls314 avatar jlongtine avatar pisich avatar thii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aws-codebuild-extras's Issues

Get label text

Is there a possibility to get label content? e.g marking a PR with a label and merging into branch. I would like to get label text.

Any chance to get working with CodePipeline?

The variables are empty when i use the .sh file.

I obtain this error:

fatal: not a git repository (or any parent up to mount point /codebuild)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Thanks for this project

No git repo with CodePipeline

When using CodePipeline as "Source provider" for CodeBuild, there's no git repo on the build instance. Therefore, none of this works :-( .

suggestion to fork, as a security precaution?

Excellent library, thank you for making the Github branch name available inside CodeBuild! As was noted on a StackOverflow answer, it's potentially dangerous to run curl to obtain the install script in this repo, due to the non-zero chances of an account breach. What do you think about giving mention to that concern in the README, along with a suggestion to fork the repo, so that folks who still want this solution can do so by accessing it from their own repos?

CODEBUILD_GIT_BRANCH sometimes mis-identified

I ran into a scenario where the CODEBUILD_GIT_BRANCH was mis-identified.

A commit to main triggered a build, and a very quick commit to another branch followed. When CodePipeline and CodeBuild ran and sourced the install script, the CODEBUILD_GIT_BRANCH identified was the branch of the subsequent commit.

I am not a git expert, please bear with the rest of the issue :-)

export CODEBUILD_GIT_BRANCH="$(git symbolic-ref HEAD --short 2>/dev/null)"
if [ "$CODEBUILD_GIT_BRANCH" = "" ] ; then
  CODEBUILD_GIT_BRANCH="$(git branch -a --contains HEAD | sed -n 2p | awk '{ printf $1 }')";
  export CODEBUILD_GIT_BRANCH=${CODEBUILD_GIT_BRANCH#remotes/origin/};
fi

In this pipeline run, I downloaded the output zip artifact (which has the .git directory) and ran some commands...

$ git symbolic-ref HEAD
fatal: ref HEAD is not a symbolic ref

So the second method is used

$ git branch -a --contains HEAD
* (no branch)
  bug/4762
  master
  remotes/origin/bug/4762
  remotes/origin/master

The commit was to master, and I think a command like the following (thank you, https://stackoverflow.com/a/52947601/1661089) might have worked better

$ git rev-parse HEAD | xargs git name-rev | cut -d' ' -f2 | sed 's/remotes\/origin\///g'
master

Most variable empty when building with Git clone depth 1

Thanks for your script ๐Ÿ™‡โ€โ™‚๏ธ . Makes working with codebuild more bearable.

When building with Git clone depth set to 1, most of the variables like commit hash, branch etc are empty. If building with clone depth set to some other value, everything works fine.

I think it's worth mentioning it in the readme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.