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

LTS Track for Jenkins Snap #88

Open
wants to merge 4 commits into
base: lts
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/promote-to-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:
promote:
name: ⬆️ Promote to stable
environment: "Candidate Branch"
environment: "LTS Branch"
runs-on: ubuntu-latest
if: |
( !github.event.issue.pull_request )
Comment on lines 11 to 17
Copy link
Member

Choose a reason for hiding this comment

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

This file can also be removed, you'll need to delete this on this branch, then update the promotion workflow on candidate

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release-to-candidate.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Release

on:
# Run the workflow each time new commits are pushed to the candidate branch.
# Run the workflow each time new commits are pushed to the lts branch.
push:
branches: [ "candidate" ]
branches: [ "lts" ]
workflow_dispatch:

concurrency:
Expand All @@ -27,15 +27,15 @@ jobs:
uses: snapcrafters/ci/get-architectures@main

release:
name: 🚢 Release to latest/candidate
name: 🚢 Release to latest/lts
needs: get-architectures
runs-on: ubuntu-latest
environment: "Candidate Branch"
environment: "LTS Branch"
strategy:
matrix:
architecture: ${{ fromJSON(needs.get-architectures.outputs.architectures-list) }}
steps:
- name: 🚢 Release to latest/candidate
- name: 🚢 Release to latest/lts
uses: snapcrafters/ci/release-to-candidate@main
with:
architecture: ${{ matrix.architecture }}
Expand All @@ -46,7 +46,7 @@ jobs:
call-for-testing:
name: 📣 Create call for testing
needs: [release, get-architectures]
environment: "Candidate Branch"
environment: "LTS Branch"
runs-on: ubuntu-latest
Copy link
Member

Choose a reason for hiding this comment

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

outputs:
issue-number: ${{ steps.issue.outputs.issue-number }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sync-version-with-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ concurrency:
jobs:
sync:
name: 🔄 Sync version with upstream
environment: "Candidate Branch"
environment: "LTS Branch"
runs-on: ubuntu-latest
steps:
- name: 🔄 Sync version with upstream
uses: snapcrafters/ci/sync-version@main
with:
token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
update-script: |
# Grabbing latest release
VERSION=$(curl -sL https://api.github.com/repos/jenkinsci/jenkins/releases | jq .[].tag_name -r | grep -v rc | sort -r | head -n 1 | cut -d "-" -f2)
# Grabbing latest lts release
VERSION=$(curl -sL https://api.github.com/repos/jenkinsci/jenkins/releases | jq .[].tag_name -r | grep -v rc | sort -r | grep "2.440" | head -n1 | cut -d "-" -f2)
sed -i 's/^\(version: \).*$/\1'"'$VERSION'"'/' snap/snapcraft.yaml
Comment on lines 14 to 27
Copy link
Member

Choose a reason for hiding this comment

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

This file can be removed, and you'll need to add another stanza to the update script on the candidate branch, because scheduled workflows only run on the default branch. See sublime-text or sublime-merge for an example :)

16 changes: 8 additions & 8 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: jenkins
title: Jenkins
name: jenkins-lts
title: Jenkins-lts
summary: Jenkins automation server - Build great things at any scale
description: |
Jenkins is the leading open-source automation server. Built with Java, it provides over 1000 plugins to support automating virtually anything, so that humans can actually spend their time doing things machines cannot.
Expand All @@ -13,8 +13,7 @@ issues: https://github.com/snapcrafters/jenkins/issues
source-code: https://github.com//snapcrafters/jenkins
license: MIT
icon: snap/local/jenkins.png
version: '2.453'

version: '2.440'
base: core22
confinement: classic
grade: stable
Expand All @@ -25,7 +24,7 @@ architectures:
- build-on: armhf

apps:
jenkins:
jenkins-lts:
environment:
XDG_DATA_HOME: "$SNAP/usr/share"
FONTCONFIG_PATH: "$SNAP/etc/fonts"
Expand All @@ -37,7 +36,7 @@ apps:
command: jenkins-config

parts:
jenkins:
jenkins-lts:
plugin: nil
source: https://github.com/jenkinsci/jenkins.git
source-tag: jenkins-$SNAPCRAFT_PROJECT_VERSION
Expand All @@ -50,9 +49,10 @@ parts:
- curl
- libnss3
- ca-certificates-java
- python3-requests #for API usage

override-build: |
curl -sLO http://mirrors.jenkins.io/war/latest/jenkins.war
curl -sLO https://mirrors.jenkins.io/war/2.440/jenkins.war
mv $CRAFT_PART_INSTALL/usr/lib/jvm/java-17-openjdk-* $CRAFT_PART_INSTALL/usr/lib/jvm/java-17-openjdk
rm $CRAFT_PART_INSTALL/usr/lib/jvm/java-17-openjdk/lib/security/cacerts
cp /etc/ssl/certs/java/cacerts $CRAFT_PART_INSTALL/usr/lib/jvm/java-17-openjdk/lib/security/cacerts
Expand All @@ -71,7 +71,7 @@ parts:

cleanup:
after:
- jenkins
- jenkins-lts
plugin: nil
build-snaps:
- core22
Expand Down
Loading