Skip to content

Commit

Permalink
[dev-v2.8] Self hosted runner 2.8 dev (#4845)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasSUSE authored Dec 11, 2024
1 parent 9a7fe4e commit fcca730
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 197 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Build

on:
pull_request:
branches:
- dev-v*
- release-v*

jobs:
build:
name: Validate
runs-on: org-${{ github.repository_owner_id }}-amd64-k8s
container: registry.suse.com/bci/bci-base:latest
steps:
- name: Install Dependencies
continue-on-error: false
env:
GH_VERSION: 2.63.2
YQ_VERSION: "v4.44.2"
run: |
echo "installing docker, jq, git, make, go, awk and patch through zypper"
zypper --non-interactive install docker jq git make go awk patch
echo "installing gh"
mkdir -p /tmp/gh
curl -fsL https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_amd64.tar.gz | tar xvzf - --strip-components=1 -C /tmp/gh
mv /tmp/gh/bin/gh /usr/bin/gh
chmod +x /usr/bin/gh
echo "installing yq"
curl -fsL https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -o /usr/bin/yq
chmod +x /usr/bin/yq
echo "yq version:"
yq --version
- name: Load Secrets from Vault
continue-on-error: true
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME;
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD;
- name: actions/checkout@v4
continue-on-error: false
uses: actions/checkout@v4

- name: Git Checkout PR and into new branch
continue-on-error: false
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "git global configuration"
git config --global --add safe.directory "$PWD"
echo $PATH >> $GITHUB_PATH
echo "checkout the PR"
gh pr checkout ${{ github.event.pull_request.number }}
echo "checkout into a new branch for safety"
git checkout -b staging-pr-workflow
- name: Pull scripts
continue-on-error: false
run: make pull-scripts

- name: Check release.yaml format with yq
continue-on-error: false
run: make check-release-yaml

- name: Release PR Validation Chekpoints
continue-on-error: false
if: contains(github.base_ref, 'release-v')
run: make validate-release-charts BRANCH=${{ github.event.pull_request.base.ref }} GH_TOKEN=${{ secrets.GITHUB_TOKEN }} PR_NUMBER=${{ github.event.pull_request.number }}

- name: Validate index.yaml Vs assets/ dir
continue-on-error: false
run: |
echo "github.base_ref: ${{ github.base_ref }}"
if [[ "${{ github.base_ref }}" == *release-v* ]]; then
echo "Validating remote release branch"
make validate remote=true
else
echo "Validating local branch"
make validate
fi
- name: Check Images
continue-on-error: false
env:
DOCKER_USERNAME: ${{ env.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ env.DOCKER_PASSWORD }}
run: make check-images

- name: Check RC's
continue-on-error: false
if: contains(github.base_ref, 'release-v')
run: make check-rc

- name: Run Hull tests
if: contains(github.base_ref, 'dev-v')
run: cd tests && go test -v ./...
28 changes: 0 additions & 28 deletions .github/workflows/charts-release.yaml

This file was deleted.

81 changes: 0 additions & 81 deletions .github/workflows/pull-request.yaml

This file was deleted.

87 changes: 0 additions & 87 deletions .github/workflows/regsync-config.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/version
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -e

CHARTS_BUILD_SCRIPTS_REPO=https://github.com/rancher/charts-build-scripts.git
CHARTS_BUILD_SCRIPT_VERSION="${CHARTS_BUILD_SCRIPT_VERSION:-v1.0.0}"
CHARTS_BUILD_SCRIPT_VERSION="${CHARTS_BUILD_SCRIPT_VERSION:-v1.3.2}"

0 comments on commit fcca730

Please sign in to comment.