-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
244 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /bin/bash | ||
|
||
# This helper script creates the "osc" configuration file with OBS credentials | ||
|
||
CONFIG_FILE="$HOME/.config/osc/oscrc" | ||
|
||
# do not overwrite the existing config accidentally | ||
if [ -e "$CONFIG_FILE" ]; then | ||
echo "ERROR: $CONFIG_FILE already exists" | ||
exit 1 | ||
fi | ||
|
||
TEMPLATE=$(dirname "${BASH_SOURCE[0]}")/oscrc.template | ||
mkdir -p $(dirname "$CONFIG_FILE") | ||
sed -e "s/@OBS_USER@/$OBS_USER/g" -e "s/@OBS_PASSWORD@/$OBS_PASSWORD/g" "$TEMPLATE" > "$CONFIG_FILE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: OBS:Staging (cockpit-agama-playwright) | ||
|
||
on: | ||
# runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- master | ||
# FIXME: remove this before merging | ||
- obs_sync | ||
# FIXME: enable before merging | ||
# paths: | ||
# # run only when a Playwright source is changed | ||
# # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
# - playwright/** | ||
|
||
jobs: | ||
update_staging: | ||
uses: ./.github/workflows/obs-staging-shared.yml | ||
# pass all secrets | ||
secrets: inherit | ||
with: | ||
package_name: cockpit-agama-playwright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: OBS:Staging (agama-cli) | ||
|
||
on: | ||
# runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- master | ||
# FIXME: remove this before merging | ||
- obs_sync | ||
# FIXME: enable before merging | ||
# paths: | ||
# # run only when a Rust source is changed | ||
# # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
# - rust/** | ||
|
||
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 | ||
package_name: agama-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: OBS:Staging (rubygem-agama) | ||
|
||
on: | ||
# runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- master | ||
# FIXME: remove this before merging | ||
- obs_sync | ||
# FIXME: enable before merging | ||
# paths: | ||
# # run only when a service source is changed | ||
# # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
# - service/** | ||
|
||
jobs: | ||
update_staging: | ||
# do not run in forks | ||
if: github.repository == 'openSUSE/agama' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: registry.opensuse.org/opensuse/tumbleweed:latest | ||
|
||
steps: | ||
- 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 | ||
obs-service-format_spec_file | ||
osc | ||
ruby | ||
'rubygem(gem2rpm)' | ||
'rubygem(yast-rake)' | ||
|
||
- name: Git Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
# fetch all history, we need to find the latest tag and offset for the version number | ||
fetch-depth: 0 | ||
|
||
- name: Fix file owner | ||
# workaround for a strict git check | ||
run: chown -R -c 0 . | ||
|
||
- 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 package | ||
run: rake osc:commit | ||
working-directory: ./service | ||
env: | ||
SKIP_OSC_BUILD: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# this is a shared workflow, not called as a top level workflow | ||
|
||
name: Update OBS Staging | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
OBS_USER: | ||
required: true | ||
OBS_PASSWORD: | ||
required: true | ||
|
||
inputs: | ||
install_packages: | ||
description: Additional packages to install | ||
required: false | ||
type: string | ||
|
||
package_name: | ||
description: OBS package name | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
update_staging_package: | ||
# do not run in forks | ||
if: github.repository == 'openSUSE/agama' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: registry.opensuse.org/opensuse/tumbleweed:latest | ||
|
||
steps: | ||
- 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 | ||
cpio | ||
obs-service-download_files | ||
obs-service-format_spec_file | ||
obs-service-obs_scm | ||
osc | ||
${{ inputs.install_packages }} | ||
|
||
- name: Configure osc | ||
run: |- | ||
CONFIG_FILE="$HOME/.config/osc/oscrc" | ||
mkdir -p $(dirname "$CONFIG_FILE") | ||
echo "$TEMPLATE" > "$CONFIG_FILE" | ||
env: | ||
TEMPLATE: |- | ||
[general] | ||
apiurl = https://api.opensuse.org | ||
[https://api.opensuse.org] | ||
user=${{ secrets.OBS_USER }} | ||
pass=${{ secrets.OBS_PASSWORD }} | ||
credentials_mgr_class=osc.credentials.PlaintextConfigFileCredentialsManager | ||
- name: Checkout ${{ inputs.package_name }} | ||
run: osc co systemsmanagement:Agama:Staging ${{ inputs.package_name }} | ||
|
||
- name: Run services | ||
run: osc service manualrun | ||
working-directory: ./systemsmanagement:Agama:Staging/${{ inputs.package_name }} | ||
|
||
- name: Check status | ||
run: osc status | ||
working-directory: ./systemsmanagement:Agama:Staging/${{ inputs.package_name }} | ||
|
||
- name: Commit ${{ inputs.package_name }} | ||
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: ./systemsmanagement:Agama:Staging/${{ inputs.package_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: OBS:Staging (cockpit-agama) | ||
|
||
on: | ||
# runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- master | ||
# FIXME: remove this before merging | ||
- obs_sync | ||
# FIXME: enable before merging | ||
# paths: | ||
# # run only when a web frontend source is changed | ||
# # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
# - web/** | ||
|
||
jobs: | ||
update_staging: | ||
uses: ./.github/workflows/obs-staging-shared.yml | ||
# pass all secrets | ||
secrets: inherit | ||
with: | ||
install_packages: obs-service-node_modules | ||
package_name: cockpit-agama |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[general] | ||
apiurl = https://api.opensuse.org | ||
|
||
[https://api.opensuse.org] | ||
user=@OBS_USER@ | ||
pass=@OBS_PASSWORD@ | ||
credentials_mgr_class=osc.credentials.PlaintextConfigFileCredentialsManager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
*.gem | ||
# the spec file is generated | ||
/package/*.spec | ||
*.rbc | ||
/.config | ||
/coverage/ | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters