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

workflow tests #4

Open
wants to merge 84 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
1288a51
iterate
aalves08 Nov 8, 2024
3a333cc
iterate
aalves08 Nov 8, 2024
18a3adc
iterate
aalves08 Nov 8, 2024
e607c4a
iterate
aalves08 Nov 8, 2024
368719e
iterate
aalves08 Nov 8, 2024
2a32529
iterate
aalves08 Nov 8, 2024
3b591a7
iterate
aalves08 Nov 8, 2024
c6f517b
iterate
aalves08 Nov 8, 2024
ac2d7ec
iterate
aalves08 Nov 8, 2024
fa2f1c0
iterate
aalves08 Nov 8, 2024
92144e3
iterate
aalves08 Nov 8, 2024
f799c62
final changes to charts and catalog workflows + first test on release…
aalves08 Nov 8, 2024
78bbf15
fix yaml path
aalves08 Nov 8, 2024
c83f4ed
fix yaml path
aalves08 Nov 8, 2024
3cbe3d1
fix echos
aalves08 Nov 8, 2024
bd7ec91
fix echos
aalves08 Nov 8, 2024
d729128
fix test more of the workflow
aalves08 Nov 8, 2024
1c35f6f
fix test more of the workflow
aalves08 Nov 8, 2024
3bfc064
revert changes to charts and catalog workflows pull request condition…
aalves08 Nov 11, 2024
b9c4143
echo publish args
aalves08 Nov 11, 2024
378fa18
change test branch
aalves08 Nov 11, 2024
90ac489
test script to get shell and creators versions
aalves08 Nov 11, 2024
7d9fa06
test
aalves08 Nov 11, 2024
4d34cbf
test
aalves08 Nov 11, 2024
e17eea1
test
aalves08 Nov 11, 2024
70357bd
fix permissions
aalves08 Nov 11, 2024
dfbc1cb
test
aalves08 Nov 11, 2024
a438d92
testing exports
aalves08 Nov 11, 2024
2bbb219
fix problem
aalves08 Nov 11, 2024
d504a0a
fix problem
aalves08 Nov 11, 2024
a3c47d0
fix problem
aalves08 Nov 11, 2024
b9ea107
fix problem
aalves08 Nov 11, 2024
9c07d45
fix problem
aalves08 Nov 11, 2024
321c81f
fix problem
aalves08 Nov 11, 2024
5d19536
fix problem
aalves08 Nov 11, 2024
c09a528
fix problem
aalves08 Nov 11, 2024
abaf376
fix problem
aalves08 Nov 11, 2024
8f1ff18
fix problem
aalves08 Nov 11, 2024
0726c80
fix problem
aalves08 Nov 11, 2024
464154e
fix problem
aalves08 Nov 11, 2024
19d6203
fix problem
aalves08 Nov 11, 2024
6e6a461
fix problem
aalves08 Nov 11, 2024
7a57e34
fix problem
aalves08 Nov 11, 2024
1cd6353
fix problem
aalves08 Nov 11, 2024
f6ba675
fix problem
aalves08 Nov 11, 2024
4ead347
fix problem
aalves08 Nov 11, 2024
de5d149
test both workflows
aalves08 Nov 11, 2024
b528048
test both workflows
aalves08 Nov 11, 2024
7c4dc16
enable all wfs
aalves08 Nov 11, 2024
20c9bc8
final test run
aalves08 Nov 11, 2024
2a27bc4
final test run
aalves08 Nov 11, 2024
51bb3a5
test with slack
aalves08 Nov 11, 2024
d59deaf
test with slack
aalves08 Nov 11, 2024
282f8f8
test with slack
aalves08 Nov 11, 2024
912a687
test wf slack hit
aalves08 Nov 12, 2024
e3847d1
have all workflows succeed to check slack message triggered
aalves08 Nov 12, 2024
3ae516a
test slack msg output
aalves08 Nov 12, 2024
c44ee4a
test slack msg output
aalves08 Nov 12, 2024
2c37242
test slack msg output
aalves08 Nov 12, 2024
31ac307
test slack msg output
aalves08 Nov 12, 2024
040edde
test slack msg output
aalves08 Nov 12, 2024
8d04222
test slack msg output
aalves08 Nov 12, 2024
af60384
test slack msg output
aalves08 Nov 12, 2024
c97ce69
test slack msg output
aalves08 Nov 12, 2024
201b93f
test slack msg output
aalves08 Nov 12, 2024
b3623a8
test slack msg output
aalves08 Nov 12, 2024
8db7d24
test slack msg output
aalves08 Nov 12, 2024
b4105f8
test slack msg output
aalves08 Nov 13, 2024
eb2c192
test slack msg output
aalves08 Nov 13, 2024
e4d602d
test slack msg output
aalves08 Nov 13, 2024
7b73a7d
test slack msg output
aalves08 Nov 13, 2024
714fa75
test slack msg output
aalves08 Nov 13, 2024
dbaf3a8
adding outputs for jobs statuses and creating message for slack
aalves08 Nov 13, 2024
e095455
fix
aalves08 Nov 13, 2024
2fdb957
fix
aalves08 Nov 13, 2024
48c24f0
fix
aalves08 Nov 13, 2024
f272e40
fix
aalves08 Nov 13, 2024
70b83f6
fix
aalves08 Nov 13, 2024
78b1075
fix
aalves08 Nov 13, 2024
5298e3b
final version
aalves08 Nov 13, 2024
196423b
test condition in release-shell-pkg if some inputs are undefined
aalves08 Nov 25, 2024
48c640f
add push condition
aalves08 Nov 25, 2024
c515e3f
add push condition
aalves08 Nov 25, 2024
d523bfb
fix workflow
aalves08 Nov 25, 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
37 changes: 32 additions & 5 deletions .github/workflows/build-extension-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,43 @@ on:
tagged_release:
required: false
type: string
is_test:
required: false
type: string
test_ext_repo:
required: false
type: string
test_ext_branch:
required: false
type: string
secrets:
registry_token:
required: true
outputs:
build-extension-catalog-job-status:
value: ${{ jobs.build-extension-catalog.outputs.build-status }}

jobs:
build-extension-catalog:
name: Build container image
if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')
if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request') || inputs.is_test == 'true'
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
packages: write

outputs:
build-status: ${{ job.status }}
steps:
- name: Checkout repository
- if: inputs.is_test == 'true'
name: Checkout repository (test flow)
uses: actions/checkout@v4
with:
repository: rancher/${{ inputs.test_ext_repo }}
ref: ${{ inputs.test_ext_branch }}

- if: inputs.is_test != 'true'
name: Checkout repository (normal flow)
uses: actions/checkout@v4

- name: Enable Corepack
Expand Down Expand Up @@ -60,7 +81,7 @@ jobs:
run: yarn

- name: Parse Extension Name
if: github.ref_type == 'tag'
if: github.ref_type == 'tag' || inputs.is_test == 'true'
id: parsed-name
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -69,7 +90,13 @@ jobs:

- name: Build and push UI image
run: |
publish="yarn publish-pkgs -cp -r ${{ inputs.registry_target }} -o ${{ github.repository_owner }}"
publish="yarn publish-pkgs -c"

if [[ "${{ inputs.is_test }}" != "true" ]]; then
publish="$publish -p"
fi

publish="$publish -r ${{ inputs.registry_target }} -o ${{ github.repository_owner }}"

if [[ -n "${{ inputs.tagged_release }}" ]]; then
publish="$publish -t ${{ inputs.tagged_release }}"
Expand Down
41 changes: 36 additions & 5 deletions .github/workflows/build-extension-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ on:
tagged_release:
required: true
type: string
is_test:
required: false
type: string
test_ext_repo:
required: false
type: string
test_ext_branch:
required: false
type: string
outputs:
build-job-status:
value: ${{ jobs.build-extension-artifact.outputs.build-status }}
release-job-status:
value: ${{ jobs.release.outputs.release-status }}

env:
ACTIONS_RUNNER_DEBUG: false
Expand All @@ -26,8 +40,19 @@ jobs:
permissions:
actions: write
contents: read
outputs:
build-status: ${{ job.status }}
steps:
- name: Checkout
- if: inputs.is_test == 'true'
name: Checkout (test flow)
uses: actions/checkout@v4
with:
repository: rancher/${{ inputs.test_ext_repo }}
ref: ${{ inputs.test_ext_branch }}
fetch-depth: 0

- if: inputs.is_test != 'true'
name: Checkout (normal flow)
uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down Expand Up @@ -55,7 +80,7 @@ jobs:
run: yarn

- name: Parse Extension Name
if: github.ref_type == 'tag'
if: github.ref_type == 'tag' || inputs.is_test == 'true'
id: parsed-name
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -72,25 +97,31 @@ jobs:
publish="$publish -t ${{ inputs.tagged_release }}"
fi

if [[ "${{ inputs.is_test }}" == "true" ]]; then
publish="$publish -f"
fi

$publish

- name: Upload charts artifact
if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')
if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request') || inputs.is_test == 'true'
uses: actions/upload-artifact@v3
with:
name: charts
path: tmp

release:
name: Release Build
if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')
if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request') || inputs.is_test != 'true'
needs: build-extension-artifact
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
deployments: write
pages: write
outputs:
release-status: ${{ job.status }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -119,4 +150,4 @@ jobs:
charts_dir: ./charts/*
env:
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
CR_SKIP_EXISTING: true
CR_SKIP_EXISTING: true
38 changes: 0 additions & 38 deletions .github/workflows/check-plugins.yaml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/docusaurus.yaml

This file was deleted.

83 changes: 56 additions & 27 deletions .github/workflows/release-shell-pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,43 @@ on:
tags:
- 'shell-pkg-v*'
- 'creators-pkg-v*'
workflow_call:
inputs:
tag:
required: false
type: string
is_test:
required: false
type: string
test_branch:
required: false
type: string
outputs:
build-release-shell-creators-status:
value: ${{ jobs.build.outputs.build-status }}

jobs:

build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
if: github.repository == 'rancher/dashboard' && (github.event_name == 'workflow_call' || (github.event_name == 'push' && github.event.ref == 'refs/tags/${{ github.ref_name }}'))
outputs:
build-status: ${{ job.status }}
steps:
- uses: actions/checkout@v3
- if: inputs.is_test == 'true' && inputs.test_branch != ''
name: Checkout (test flow)
uses: actions/checkout@v3
with:
persist-credentials: false
ref: ${{ inputs.test_branch }}
fetch-depth: 0

- if: inputs.is_test != 'true'
name: Checkout (normal flow)
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
Expand All @@ -29,35 +57,36 @@ jobs:

- name: Check Tags Version Matching
env:
TAG: ${{github.ref_name}}
TAG: ${{ inputs.tag || github.ref_name }}
run: ./.github/workflows/scripts/check-package-tag-version.sh
shell: bash

- name: Validate Plugin build system
run: ./shell/scripts/test-plugins-build.sh
shell: bash
# - name: Validate Plugin build system
# run: ./shell/scripts/test-plugins-build.sh
# shell: bash

# Reset the local (ci) repository state because
# The previous step (Validate Plugin build system) changes
# the version number on package.json for Shell in order
# to release it in verdaccio for it's tests
- name: Reset repository (file system)
run: |
git reset --hard HEAD
echo $NPM_REGISTRY
cat ./shell/package.json

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
scope: '@rancher'
# # Reset the local (ci) repository state because
# # The previous step (Validate Plugin build system) changes
# # the version number on package.json for Shell in order
# # to release it in verdaccio for it's tests
# - name: Reset repository (file system)
# run: |
# git reset --hard HEAD
# echo $NPM_REGISTRY
# cat ./shell/package.json

- name: Install packages
run: yarn install --frozen-lockfile
# - uses: actions/setup-node@v4
# with:
# node-version-file: '.nvmrc'
# registry-url: 'https://registry.npmjs.org'
# scope: '@rancher'

- name: Publish Shell Package to npm
run: ./shell/scripts/publish-shell.sh --npm
env:
TAG: ${{github.ref_name}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Install packages
# run: yarn install --frozen-lockfile

# - name: Publish Shell Package to npm
# run: ./shell/scripts/publish-shell.sh --npm
# env:
# TAG: ${{ inputs.tag || github.ref_name }}
# DRY_RUN: ${{ inputs.is_test }}
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27 changes: 0 additions & 27 deletions .github/workflows/storybook.yaml

This file was deleted.

Loading