This file contains hidden or 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
| <!-- | |
| SPDX-License-Identifier: Apache-2.0 | |
| SPDX-FileCopyrightText: 2025 The Linux Foundation | |
| --> | |
| # GitHub Actions MVP - Complete Guide | |
| **Comprehensive Best Practices for Creating GitHub Actions** | |
| This document synthesizes patterns from 43+ production GitHub Actions to provide a complete MVP (Minimum Viable Product) guide for creating robust, maintainable, and enterprise-ready GitHub Actions. |
This file contains hidden or 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
| --- | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # Copyright (c) 2025 The Linux Foundation | |
| name: Gerrit CI Packer Merge using Tailscale VPN and SSH Tunnel | |
| # yamllint disable-line rule:truthy | |
| on: | |
| push: | |
| branches: [main] |
This file contains hidden or 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
| #!/usr/bin/no-execute | |
| # shellcheck shell=bash | |
| # SPDX-License-Identifier: EPL-1.0 | |
| ############################################################################## | |
| # Copyright (c) 2019 The Linux Foundation and others. | |
| # | |
| # All rights reserved. This program and the accompanying materials | |
| # are made available under the terms of the Eclipse Public License v1.0 | |
| # which accompanies this distribution, and is available at |
This file contains hidden or 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
| #!/bin/bash | |
| # Gerrit 502 Error Diagnostic Script | |
| # Usage: sudo ./gerrit-diagnostic.sh | |
| # This script performs read-only checks to identify the root cause of 502 errors | |
| set -euo pipefail | |
| # Colors for output | |
| RED='\033[0;31m' |
This file contains hidden or 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
| $ git diff | |
| diff --git a/templates/builder.pkr.hcl b/templates/builder.pkr.hcl | |
| index ab331b0..316c9ef 100644 | |
| --- a/templates/builder.pkr.hcl | |
| +++ b/templates/builder.pkr.hcl | |
| @@ -149,11 +149,12 @@ build { | |
| "ANSIBLE_HOST_KEY_CHECKING=False", | |
| "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}", | |
| "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", | |
| - "ANSIBLE_STDOUT_CALLBACK=debug" |
This file contains hidden or 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
| #!/bin/bash | |
| # Script to execute a Gerrit query, parse JSON output, and set environment variables. | |
| # Usage: ./gerrit_query_parse.sh <gerrit_url> <user_name> [<patchset revision>] | |
| if [ "$#" -lt 2 ] || [ "$#" -gt 3 ]; then | |
| echo "Usage: $0 <gerrit_url> <ssh_user_name> [ <patchset revision> ]" | |
| exit 1 | |
| fi |
This file contains hidden or 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
| #!/bin/bash | |
| # SPDX-License-Identifier: EPL-1.0 | |
| ############################################################################## | |
| # Copyright (c) 2022 The Linux Foundation and others. | |
| # | |
| # All rights reserved. This program and the accompanying materials | |
| # are made available under the terms of the Eclipse Public License v1.0 | |
| # which accompanies this distribution, and is available at | |
| # http://www.eclipse.org/legal/epl-v10.html | |
| ############################################################################## |
This file contains hidden or 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
| FROM centos:7 | |
| SHELL ["/bin/bash", "-c"] | |
| ARG SIGN_DIR="${WORKSPACE}/m2repo" | |
| ARG GIT_TAG="" | |
| RUN echo $'[fedora-infra-sigul] \n\ | |
| name=Fedora builder packages for sigul \n\ | |
| baseurl=https://kojipkgs.fedoraproject.org/repos-dist/epel\$releasever-infra/latest/\$basearch/ \n\ | |
| enabled=1 \n\ |
This file contains hidden or 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
| diff --git a/templates/builder.json b/templates/builder.json | |
| index 0fa217d..c1eb535 100644 | |
| --- a/templates/builder.json | |
| +++ b/templates/builder.json | |
| @@ -56,6 +56,7 @@ | |
| { | |
| "type": "ansible", | |
| "playbook_file": "provision/local-builder.yaml", | |
| + "extra_arguments": ["-vvvv"], | |
| "ansible_env_vars": [ |
This file contains hidden or 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
| ## pyenv configs | |
| # Set the python version available under pyenv | |
| export PYENV_ROOT="/opt/pyenv" | |
| export PATH="$PYENV_ROOT/bin:$PATH" | |
| set_python_version="3.9" | |
| # Takes 3.x and returns 3.x.y from the available py3.x versions on the system | |
| pyver() { grep "^$(echo ${1//[a-zA-Z]/})\(\..*\)\?\.[0-9]\+$" <(pyenv versions | sed 's/[[:alpha:]|(|)|/||*|[:space:]]//g'| tr -d ' ') | sort -V | tail -n 1 ; } | |
| if command -v pyenv 1>/dev/null 2>&1; then | |
| eval "$(pyenv init -)" |
NewerOlder