Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

gitlab-ci-multi-runner v1.0.4 #49562

Closed
wants to merge 1 commit into from
Closed

gitlab-ci-multi-runner v1.0.4 #49562

wants to merge 1 commit into from

Conversation

cybertk
Copy link
Contributor

@cybertk cybertk commented Feb 26, 2016

No description provided.


cd "src/gitlab.com/gitlab-org/gitlab-ci-multi-runner" do
commit_sha = `git rev-parse --short HEAD`

# Disable vender support for go 1.5 and above
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just pass:

ENV["GO15VENDOREXPERIMENT"] = "0"

...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ENV["GO15VENDOREXPERIMENT"] = "0" does not work for incoming go 1.7. I'm ok for setting ENV, your call.

Go 1.5 introduced experimental support for vendoring, enabled by setting the GO15VENDOREXPERIMENT environment variable to 1. Go 1.6 keeps the vendoring support, no longer considered experimental, and enables it by default. It can be disabled explicitly by setting the GO15VENDOREXPERIMENT environment variable to 0. Go 1.7 will remove support for the environment variable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling Go 1.7 "incoming" is a bit of a stretch; we've only just had 1.6 and there's usually 6 months between major Go releases. We'll clear the 1.7 hurdle when we get there, let's use the ENV for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it's vendor 😉

@cybertk
Copy link
Contributor Author

cybertk commented Feb 27, 2016

Updated according reviews

@johnjelinek
Copy link

👍

@jahmad
Copy link
Contributor

jahmad commented Feb 27, 2016

Just a little concern. "make executors/docker/bindata.go" behave differently with and without docker present. This formula will only build successfully when user doesn't have docker, since it will just download prebuilt docker images.

But with docker installed, then "gox" will be needed to build helper binary for linux/amd64. and docker build will need either another ENV to run the real build on linux (virtual) machine, or dlite already running.

I have no real solution here, but could it be made to force using prebuilt images no matter what?

edit: scratch that, that was my observation from my manual building. obviously i don't know homebrew enough to understand why this formula succeeded building with docker :)

@DomT4
Copy link
Contributor

DomT4 commented Feb 28, 2016

obviously i don't know homebrew enough to understand why this formula succeeded building with docker :)

We hide HOMEBREW_PREFIX/bin from the $PATH during other formulae builds, so unless docker is a dependency or people build with --env=std (which we don't recommend) this compile won't find it.

# Copy from Makefile
system "go", "build", "-o", "gitlab-ci-multi-runner", "-ldflags", "-X main.NAME=gitlab-ci-multi-runner -X main.VERSION=#{version} -X main.REVISION=#{commit_sha}"
system "make", "executors/docker/bindata.go"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/master/docker/prebuilt.tar.gz download it fetches here static until the next release? If so, can we vendor it into the correct directory rather than relying on the make process to fetch it for us?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check upstream? If it isn't going to move until the next release we can vendor and checksum it rather than permitting undeclared arbitrary downloads.

@johnjelinek
Copy link

@MikeMcQuaid: Merge pliss.

@cybertk
Copy link
Contributor Author

cybertk commented Mar 6, 2016

Updated against feedback, now using resource to track bindata

url "https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/v1.0.4/docker/prebuilt.tar.gz",
:using => :nounzip
sha256 "43dedd023672990e27289e97bf74f493576956418148f6227917b8511e8aadfd"
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this? Is it a binary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's a prebuilt version dependency.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of what? We need to build from source.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg, I don't even use docker, why do I have to download it?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if I don't use docker, I don't need prebuilt images? Is it possible to define resource optional?

if build.with? "docker"
  # note, no "with" in the option name (it is added by the build.with? method)
end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ReDetection You need prebuilt images to build gitlab-ci-multi-runner, no matter how you use it, as the docker feature is not optional for gitlab-ci-multi-runner binary. This is about how you build gitlab-ci-multi-runner

What you can decide is whether using docker executor after installing gitlab-ci-multi-runner, to use docker executor you need docker installed. And this is about how you use gitlab-ci-multi-runner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cybertk even if I embed empty file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, but I think the build should be failed if you embed undesired assets

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's now fine as-is: I just had questions about this.

@cybertk
Copy link
Contributor Author

cybertk commented Mar 8, 2016

Added docker as recommended dep

@MikeMcQuaid
Copy link
Member

Thanks for your contribution to Homebrew! Without people like you submitting PRs we couldn't run this project. You rock!

For future reference the preferred commit message format for simple version updates is gitlab-ci-multi-runner 1.0.4 (no v). Please complete the issue template in future PRs where this format is detailed in the linked Contributing guidelines. Thanks!

xu-cheng pushed a commit to Homebrew/homebrew-core that referenced this pull request Mar 8, 2016
Closes Homebrew/legacy-homebrew#49562.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
@cybertk
Copy link
Contributor Author

cybertk commented Mar 8, 2016

Thanks, this also close cybertk/homebrew-gitlab-runner#4

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants