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

Add automated build #228

Merged
merged 7 commits into from
Jan 17, 2022
Merged

Add automated build #228

merged 7 commits into from
Jan 17, 2022

Conversation

basil
Copy link
Member

@basil basil commented Jan 15, 2022

I found it quite difficult to get a local build from this repository, even using the instructions in the README and the official Docker image. To make it easier to use the official Docker image, I wrote a little script that sets up the required environment variables and drops you into a shell (or executes your commands, pending jenkinsci/docker-inbound-agent#254), and another little script that does some of the preparatory actions needed before starting a build (downloading the WAR and importing the test GPG key). The result is that it's easy to build this repository now, as long as you have Docker. Just run ./bldenv.sh followed by ./build.sh.

If I had write access to this repository, this PR would also include a Jenkinsfile that runs the build on ci.jenkins.io.

@timja
Copy link
Member

timja commented Jan 15, 2022

You do have write access?

@basil
Copy link
Member Author

basil commented Jan 15, 2022

I just realized that now. =) I'll play around with a Jenkinsfile.

README.md Outdated Show resolved Hide resolved
@basil
Copy link
Member Author

basil commented Jan 15, 2022

I added a first stab at a Jenkinsfile, but it doesn't seem to be getting run, so I'm guessing a new job needs to be created on ci.jenkins.io.

@basil
Copy link
Member Author

basil commented Jan 16, 2022

Worked on the first try! Now that's something that's never happened to me with a Jenkins job before.

@basil basil changed the title Make it easier to run the build locally Add automated build Jan 16, 2022
Jenkinsfile Outdated Show resolved Hide resolved
Copy link
Collaborator

@dduportal dduportal left a comment

Choose a reason for hiding this comment

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

Thanks a lot for tackling this!

It's clearly better to have a CI build (than not having any).

It looks like that we could use the existing docker-compose.yaml (https://github.com/jenkinsci/packaging/blob/3ef73d3cca85325b7c9ab7366627370377de61b2/docker-compose.yaml) to provide the same behavior on both CI and developer workstations in a subsequent PR (that would remove the need for shell scripts and would allow contributors on different platforms to work it out).

@timja
Copy link
Member

timja commented Jan 17, 2022

I had to revert the docker-inbound-agent patch as it broke multiple people's builds, could the entrypoint be overridden here instead?

@dduportal
Copy link
Collaborator

I had to revert the docker-inbound-agent patch as it broke multiple people's builds, could the entrypoint be overridden here instead?

+1 with overriding the entrypoint instead. The whole issue come from the docker-packaging image that is slowing you down: I wonder if we shouldn't stop using Kubernetes pod agent for this use case, and use VMs with a full Docker engine instead? So the only requirement is "you want to package ? Use Docker CE and follow README". WDYT?

@basil
Copy link
Member Author

basil commented Jan 17, 2022

I had to revert the docker-inbound-agent patch as it broke multiple people's builds, could the entrypoint be overridden here instead?

bldenv.sh is deleted

@dduportal
Copy link
Collaborator

@basil would it be useful for you to have a Docker image "packaging" that would only contain the required package (without the inbound stuff that the infra adds in jenkins-infra/docker-packaging) ?

I wonder if adding a Dockerfile in the repository here, that would define a jenkinsci/packaging (or jenkinsciinfra/packaging:x.y.z-base) , would help?

I'm asking because part of your problem here was caused by us (jenkins infra team) when we changed the image docker-packaging to "inbound agent" and breaking the contract here.

WDYT?

@basil
Copy link
Member Author

basil commented Jan 17, 2022

WDYT?

Not sure offhand.

@basil basil merged commit 79ae29c into jenkinsci:master Jan 17, 2022
@basil basil deleted the build branch January 17, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants