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

Cockpit removal, Live ISO fixes #1191

Merged
merged 31 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
08fb651
Update service files
lslezak May 7, 2024
07d34f6
Make OBS project configurable
lslezak May 7, 2024
b406153
Make OBS project configurable
lslezak May 7, 2024
b95bab4
OBS project configuration
lslezak May 7, 2024
2898735
Update _service in OBS from Git
lslezak May 8, 2024
5a48298
Enable the web server service
lslezak May 9, 2024
70a15bf
Install git
lslezak May 9, 2024
14718c4
Allow running the autosubmission jobs manually
lslezak May 9, 2024
7fff7cf
Update actions/checkout to v4
lslezak May 9, 2024
b916cac
Delete unused files
lslezak May 9, 2024
2582d54
Synchronize the files
lslezak May 9, 2024
42d0d61
Update package name
lslezak May 9, 2024
638a112
Update the Github URL in _service file
lslezak May 9, 2024
46d9875
Add sources OBS
lslezak May 9, 2024
7076dae
Fixed _service file update
lslezak May 9, 2024
981ae51
Patch the _service so it works from forks
lslezak May 9, 2024
79428b7
Checkout with git tool
lslezak May 9, 2024
884c355
git safe dir
lslezak May 9, 2024
d098792
Configure git
lslezak May 9, 2024
c43f63f
HTTPS URL
lslezak May 9, 2024
ef025cf
Rename agama-cli -> agama
lslezak May 9, 2024
b2d6ab2
Rename cockpit-agama-playwright to agama-playwright
lslezak May 9, 2024
c32ed1e
Merge branch 'openSUSE:master' into master
lslezak May 9, 2024
ebf5b48
Deleted Cockpit related files
lslezak May 9, 2024
907482b
Fixed service submission
lslezak May 9, 2024
6e73b0d
Install diffutils
lslezak May 9, 2024
92b0821
Added FireFox profile template
lslezak May 9, 2024
5967a3a
Do not read Cockpit manifests.js
lslezak May 9, 2024
a05090a
Drop manifest.json
lslezak May 9, 2024
772add9
Better comment
lslezak May 10, 2024
a358ee8
Comment
lslezak May 10, 2024
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/ci-doc-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Fix the file owner
# fix the file owner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# TODO: Cache the Ruby gems and node packages

- name: Git Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# fetch complete history with tags, agama.gemspec calls "git describe --tags"
# that would fail with just last commit checked out
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Rubocop
run: /usr/bin/rubocop.*-1.24.1
2 changes: 1 addition & 1 deletion .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure and refresh repositories
# disable unused repositories to have faster refresh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure and refresh repositories
# disable unused repositories to have faster refresh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install DocBook tooling
run: |
Expand Down
26 changes: 10 additions & 16 deletions .github/workflows/obs-service-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@ on:
OBS_PASSWORD:
required: true

inputs:
project_name:
description: OBS project name
required: true
type: string

jobs:
update_service:
# do not run in forks
if: github.repository == 'openSUSE/agama'
# do not run in forks which do not set the OBS_PROJECT variable
if: vars.OBS_PROJECT != ''

runs-on: ubuntu-latest

Expand All @@ -34,6 +28,7 @@ jobs:
- name: Install tools
run: zypper --non-interactive install --no-recommends
bzip2
diffutils
git
obs-service-format_spec_file
osc
Expand All @@ -43,33 +38,32 @@ jobs:

- name: Git Checkout (full history)
if: ${{ github.ref_type != 'tag' }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# fetch all history, we need to find the latest tag and offset for the version number
fetch-depth: 0

- name: Git Checkout (release tag only)
if: ${{ github.ref_type == 'tag' }}
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Fix file owner
# workaround for a strict git check
run: chown -R -c 0 .
- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Configure osc
run: .github/workflows/configure_osc.sh
env:
OBS_USER: ${{ secrets.OBS_USER }}
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}

- name: Commit the rubygem-agama-yast package to ${{ inputs.project_name }}
- name: Commit the rubygem-agama-yast package to ${{ vars.OBS_PROJECT }}
run: rake osc:commit
working-directory: ./service
env:
# do not build the package with "osc", it takes long time
# and does not provide much value
SKIP_OSC_BUILD: 1
OBS_PROJECT: ${{ inputs.project_name }}
OBS_PROJECT: ${{ vars.OBS_PROJECT }}

- name: Submit the rubygem-agama-yast package
# only when a tag has been pushed
Expand All @@ -78,4 +72,4 @@ jobs:
run: rake osc:sr:force
working-directory: ./service
env:
OBS_PROJECT: ${{ inputs.project_name }}
OBS_PROJECT: ${{ vars.OBS_PROJECT }}
24 changes: 15 additions & 9 deletions .github/workflows/obs-staging-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,42 @@ on:
# run only when a live ISO source is changed
- live/**

# allow running manually
workflow_dispatch:

jobs:
update_staging_package:
# do not run in forks
if: github.repository_owner == 'openSUSE'
# do not run in forks which do not set the OBS_PROJECT variable
if: vars.OBS_PROJECT != ''

runs-on: ubuntu-latest

container:
image: registry.opensuse.org/opensuse/tumbleweed:latest

steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Configure and refresh repositories
# disable unused repositories to have a faster refresh
run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref

- name: Install tools
run: zypper --non-interactive install --no-recommends
make osc
git make osc

- name: Git Checkout
uses: actions/checkout@v4

- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Configure osc
run: .github/workflows/configure_osc.sh
env:
OBS_USER: ${{ secrets.OBS_USER }}
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}

- name: Checkout agama-live
run: osc co -o dist systemsmanagement:Agama:Staging agama-live
- name: Checkout ${{ vars.OBS_PROJECT }} agama-live
run: osc co -o dist ${{ vars.OBS_PROJECT }} agama-live
working-directory: ./live

- name: Build sources
Expand All @@ -53,6 +59,6 @@ jobs:
run: osc diff && osc status
working-directory: ./live/dist

- name: Commit agama-live
- name: Commit agama-live to ${{ vars.OBS_PROJECT }}
run: osc commit -m "Updated to Agama $GITHUB_SHA"
working-directory: ./live/dist
9 changes: 6 additions & 3 deletions .github/workflows/obs-staging-playwright.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Submit cockpit-agama-playwright
name: Submit agama-playwright

on:
# runs on pushes targeting the default branch
Expand All @@ -9,11 +9,14 @@ on:
# run only when a Playwright source is changed
- playwright/**

# allow running manually
workflow_dispatch:

jobs:
update_staging:
uses: ./.github/workflows/obs-staging-shared.yml
# pass all secrets
secrets: inherit
with:
project_name: systemsmanagement:Agama:Staging
package_name: cockpit-agama-playwright
package_name: agama-playwright
service_file: playwright/package/_service
5 changes: 4 additions & 1 deletion .github/workflows/obs-staging-products.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ on:
# run only when a Rust source is changed
- products.d/**

# allow running manually
workflow_dispatch:

jobs:
update_staging:
uses: ./.github/workflows/obs-staging-shared.yml
# pass all secrets
secrets: inherit
with:
project_name: systemsmanagement:Agama:Staging
package_name: agama-products-opensuse
service_file: products.d/_service
7 changes: 5 additions & 2 deletions .github/workflows/obs-staging-rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Submit agama-cli
name: Submit agama

on:
# runs on pushes targeting the default branch
Expand All @@ -9,12 +9,15 @@ on:
# run only when a Rust source is changed
- rust/**

# allow running manually
workflow_dispatch:

jobs:
update_staging:
uses: ./.github/workflows/obs-staging-shared.yml
# pass all secrets
secrets: inherit
with:
install_packages: obs-service-cargo_audit obs-service-cargo_vendor
project_name: systemsmanagement:Agama:Staging
package_name: agama
service_file: rust/package/_service
5 changes: 3 additions & 2 deletions .github/workflows/obs-staging-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ on:
- service/**
- Rakefile

# allow running manually
workflow_dispatch:

jobs:
update_service:
uses: ./.github/workflows/obs-service-shared.yml
# pass all secrets
secrets: inherit
with:
project_name: systemsmanagement:Agama:Staging
49 changes: 32 additions & 17 deletions .github/workflows/obs-staging-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,70 +21,85 @@ on:
required: true
type: string

project_name:
description: OBS project name
required: true
service_file:
description: Optional service file to copy from the sources
required: false
type: string

jobs:
update_staging_package:
# do not run in forks
if: github.repository == 'openSUSE/agama'
# do not run in forks which do not set the OBS_PROJECT variable
if: vars.OBS_PROJECT != ''

runs-on: ubuntu-latest

container:
image: registry.opensuse.org/opensuse/tumbleweed:latest

steps:
- name: Git Checkout
uses: actions/checkout@v3

- name: Configure and refresh repositories
# disable unused repositories to have a faster refresh
run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref

- name: Install tools
run: zypper --non-interactive install --no-recommends
git
cpio
obs-service-download_files
obs-service-format_spec_file
obs-service-obs_scm
osc
${{ inputs.install_packages }}

- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Configure osc
run: .github/workflows/configure_osc.sh
env:
OBS_USER: ${{ secrets.OBS_USER }}
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}

- name: Checkout ${{ inputs.package_name }}
run: osc co ${{ inputs.project_name }} ${{ inputs.package_name }}
- name: Checkout ${{ vars.OBS_PROJECT }} ${{ inputs.package_name }}
run: osc co ${{ vars.OBS_PROJECT }} ${{ inputs.package_name }}

- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Update service revision
# only when a tag has been pushed
if: ${{ github.ref_type == 'tag' }}
run: |-
echo "Updating revision to ${{ github.ref_name }}"
sed -i -e 's#<param name="revision">.*</param>#<param name="revision">${{ github.ref_name }}</param>#' _service
working-directory: ./${{ inputs.project_name }}/${{ inputs.package_name }}
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}

- name: Copy optional service file
# patch the URL in the file so it works also from forks, forks also by
# default do not inherit the tags so remove the version format option if
# no tag is present
if: inputs.service_file != ''
run: |
sed -e 's#<param name="url">.*</param>#<param name="url">https://github.com/${{ github.repository }}.git</param>#' ${{ inputs.service_file }} > ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}/_service
if [ -z "$(git tag -l)" ]; then sed -i -e 's#<param name="versionformat">.*</param>##' ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}/_service; fi

- name: Run services
run: osc service manualrun
working-directory: ./${{ inputs.project_name }}/${{ inputs.package_name }}
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}

- name: Check status
run: osc diff && osc status
working-directory: ./${{ inputs.project_name }}/${{ inputs.package_name }}
run: osc addremove && osc diff && osc status
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}

- name: Commit ${{ inputs.package_name }}
- name: Commit ${{ inputs.package_name }} to ${{ vars.OBS_PROJECT }}
run: |-
osc commit -m "Updated to $(sed -e '/^version:/!d' -e 's/version: *\(.*\)/\1/' agama.obsinfo) ($(sed -e '/^commit:/!d' -e 's/commit: *\(.*\)/\1/' agama.obsinfo))"
working-directory: ./${{ inputs.project_name }}/${{ inputs.package_name }}
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}

- name: Submit the package
# only when a tag has been pushed
if: ${{ github.ref_type == 'tag' }}
run: osc sr --yes -m "Releasing version ${{ github.ref_name }}"
working-directory: ./${{ inputs.project_name }}/${{ inputs.package_name }}
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}
9 changes: 6 additions & 3 deletions .github/workflows/obs-staging-web.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Submit cockpit-agama
name: Submit agama-web-ui

on:
# runs on pushes targeting the default branch
Expand All @@ -9,12 +9,15 @@ on:
# run only when a web frontend source is changed
- web/**

# allow running manually
workflow_dispatch:

jobs:
update_staging:
uses: ./.github/workflows/obs-staging-shared.yml
# pass all secrets
secrets: inherit
with:
install_packages: obs-service-node_modules
project_name: systemsmanagement:Agama:Staging
package_name: cockpit-agama
package_name: agama-web-ui
service_file: web/package/_service
Loading
Loading