Skip to content

Commit

Permalink
Merge pull request #51 from kz6fittycent/candidate
Browse files Browse the repository at this point in the history
README update and sync-*.yml "fix"
  • Loading branch information
merlijn-sebrechts authored Dec 13, 2023
2 parents fcfd6df + 545c7a4 commit 15b638e
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 44 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/sync-version-with-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
update-script: |
# Update the snapcraft.yaml to match upstream version
API="https://api.github.com/repos/jenkinsci/jenkins/releases/latest"
VERSION=$(curl -s "${API}" | grep -i name | awk 'FNR == 3 {print $2}' | cut -d ',' -f1)
sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml
# Update the snapcraft.yaml to match upstream version
API="https://api.github.com/repos/jenkinsci/jenkins/releases/latest"
VERSION=$(curl -s "${API}" | grep -i name | awk 'FNR == 3 {print $2}' | cut -d ',' -f1)
sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml
117 changes: 77 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,98 @@
<img src="http://mirrors.jenkins.io/art/jenkins-logo/logo+title.svg" alt="Jenkins" height="256px">
</h1>

<p align="center"><b>This is the snap for Jenkins</b>, the leading open-source automation server. It works on Ubuntu, Fedora, Debian, and other major Linux
distributions.</p>
<p align="center"><b>This is the snap for Jenkins, the leading open-source automation server</b>. It is a community-maintained package to easily install Jenkins on Ubuntu, Fedora, Debian and other major Linux distributions. It is available in the Snap Store, Ubuntu Software, and a number of other applications.</p>

<p align="center"><i>"Jenkins is the leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project."</i></p>

<p align="center">
<a href="https://build.snapcraft.io/user/snapcrafters/jenkins"><img src="https://build.snapcraft.io/badge/snapcrafters/jenkins.svg" alt="Snap Status"></a>
<a href="https://snapcraft.io/jenkins"><img src="https://snapcraft.io/jenkins/badge.svg" alt="Snap Status"></a>
<a href="https://github.com/snapcrafters/jenkins/actions/workflows/sync-version-with-upstream.yml"><img src="https://github.com/snapcrafters/jenkins/actions/workflows/sync-version-with-upstream.yml/badge.svg"></a>
<a href="https://github.com/snapcrafters/jenkins/actions/workflows/release-to-candidate.yaml"><img src="https://github.com/snapcrafters/jenkins/actions/workflows/release-to-candidate.yml/badge.svg"></a>
<a href="https://github.com/snapcrafters/jenkins/actions/workflows/promote-to-stable.yml"><img src="https://github.com/snapcrafters/jenkins/actions/workflows/promote-to-stable.yml/badge.svg"></a>
</p>

## Install

sudo snap install jenkins
xdg-open http://localhost:8080
```shell
snap install jenkins --classic
xdg-open http://localhost:8080
```

### Check the status:

```
systemctl status snap.jenkins.jenkins.service
```

### Set a custom configuration:

```
cat config.xml | sudo /snap/bin/jenkins.config
```

([Don't have snapd installed?](https://snapcraft.io/docs/core/install))

Check the status:
<p align="center">Published for <img src="https://raw.githubusercontent.com/anythingcodes/slack-emoji-for-techies/gh-pages/emoji/tux.png" align="top" width="24" /> with :gift_heart: by Snapcrafters</p>

## How to contribute to this snap

Thanks for your interest! Below you find instructions to help you contribute to this snap.

The general workflow is to submit pull requests that merges your changes into the `candidate` branch here on GitHub. Once the pull request has been merged, a GitHub action will automatically build the snap and publish it to the `candidate` channel in the Snap Store. Once the snap has been tested thoroughly, we promote it to the `stable` channel so all our users get it!

### Initial setup

If this is your first time contributing to this snap, you first need to set up your own fork of this repository.

1. [Fork the repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) into your own GitHub namespace.
2. [Clone your fork](https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository), so that you have it on your local computer.
3. Configure your local repo. To make things a bit more intuitive, we will rename your fork's remote to `myfork`, and add the snapcrafters repo as `snapcrafters`.

```shell
git remote rename origin myfork
git remote add snapcrafters https://github.com/snapcrafters/jenkins.git
git fetch --all
```

### Submitting changes in a pull request

Once you're all setup for contributing, keep in mind that you want the git information to be all up-to-date. So if you haven't "fetched" all changes in a while, start with that:

```shell
git fetch --all -p
```

Now that your git metadata has been updated you are ready to create a bugfix branch, make your changes, and open a pull request.

1. All pull requests should go to the stable branch so create your branch as a copy of the stable branch:

systemctl status snap.jenkins.jenkins.service
```shell
git checkout -b my-bugfix-branch snapcrafters/candidate
```

Set a custom configuration:
2. Make your desired changes and build a snap locally for testing:

cat config.xml | sudo /snap/bin/jenkins.config
```shell
snapcraft --use-lxd
```

<p align="center">Published for <img src="http://anything.codes/slack-emoji-for-techies/emoji/tux.png" align="top" width="24" /> with :gift_heart: by Snapcrafters</p>
3. After you are happy with your changes, commit them and push them to your fork so they are available on GitHub:

## Remaining tasks
```shell
git commit -a
git push -u myfork my-bugfix-branch
```

Snapcrafters ([join us](https://forum.snapcraft.io/t/join-snapcrafters/1325)) are working to land snap install documentation and the [snapcraft.yaml](https://github.com/snapcrafters/discord/blob/master/snap/snapcraft.yaml) upstream so Discord can authoritatively publish future releases.
4. Then, [open up a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) from your `my-bugfix-branch` to the `snapcrafters/candidate` branch.
5. Once you've opened the pull request, it will automatically trigger the build-test action that will launch a build of the snap. You can watch the progress of the snap build from your pull request (Show all checks -> Details). Once the snap build has completed, you can find the built snap (to test with) under "Artifacts".
6. Someone from the team will review the open pull request and either merge it or start a discussion with you with additional changes or clarification needed.
7. Once the pull request has been merged into the stable branch, a GitHub action will rebuild the snap using your changes and publish it to the [Snap Store](https://snapcraft.io/jenkins) into the `candidate` channel. After sufficient testing of the snap from the candidate channel, one of the maintainers or administrators will promote the snap to the stable branch in the Snap Store.

- [x] Fork the [Snapcrafters template]() repository to your own GitHub account
- [x] Create a snap that runs in `devmode`
- [x] Register the snap in the store, **using the preferred upstream name**
- [x] Add a screenshot to this `README.md`
- [x] Publish the `devmode` snap in the Snap store edge channel
- [x] Add install instructions to this `README.md`
- [x] Update snap store metadata, icons and screenshots
- [x] Convert the snap to `strict` confinement, or `classic` confinement if it qualifies
- [x] Publish the confined snap in the Snap store beta channel
- [x] Update the install instructions in this `README.md`
- [ ] Post a call for testing on the [Snapcraft Forum](https://forum.snapcraft.io) - [link]()
- [x] Request your GitHub repository is forked to the Snapcrafters organisation and configured for automated builds
- [x] Add the provided Snapcraft build badge to this `README.md`
- [x] Publish the snap in the Snap store stable channel
- [x] Update the install instructions in this `README.md`
- [ ] Post an announcement in the [Snapcraft Forum](https://forum.snapcraft.io) - [link]()
- [ ] Submit a pull request or patch upstream that adds snap install documentation - [link]()
- [ ] Submit a pull request or patch upstream that adds the `snapcraft.yaml` and any required assets/launchers - [link]()
- If upstream accept the PR:
- [ ] Request upstream create a Snap store account
- [ ] Add upstream contact information to the `README.md`
- [ ] Contact the Snap Advocacy team to request the snap be transferred to upstream
- [ ] Ask the Snap Advocacy team to celebrate the snap - [link](https://insights.ubuntu.com/2017/05/04/discord-is-now-available-as-a-snap-for-ubuntu-and-other-distributions/)
## Maintainers

If you have any questions, [post in the Snapcraft forum](https://forum.snapcraft.io).
- [@kz6fittycent](https://github.com/kz6fittycent)

## The Snapcrafters
## License

| [![Evan Dandrea](http://gravatar.com/avatar/b9c6dc703231efc4e307d3c59d1f9321?s=128)](https://github.com/evandandrea/) |
| :---: |
| [Evan Dandrea](https://github.com/evandandrea/) |
The license of both the build files in this repository and Jenkins itself is the [MIT License](https://github.com/jenkinsci/jenkins/blob/master/LICENSE.txt)

0 comments on commit 15b638e

Please sign in to comment.