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

Dev kmr #408

Merged
merged 4 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 33 additions & 0 deletions .github/workflows/crucible-release-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: crucible-release-ci

on:
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
call-crucible-release-remove:
uses: ./.github/workflows/crucible-release.yaml
with:
custom_tag: "ci-version-test"
action: "delete"
force_push: true
secrets:
PRIVATE_KEY__TAG_CRUCIBLE_RELEASE: ${{ secrets.PRIVATE_KEY__TAG_CRUCIBLE_RELEASE }}

call-crucible-release-create:
uses: ./.github/workflows/crucible-release.yaml
needs: call-crucible-release-remove
with:
custom_tag: "ci-version-test"
action: "push"
secrets:
PRIVATE_KEY__TAG_CRUCIBLE_RELEASE: ${{ secrets.PRIVATE_KEY__TAG_CRUCIBLE_RELEASE }}

crucible-release-ci-complete:
runs-on: [ self-hosted, workflow-overhead ]
timeout-minutes: 10
needs: call-crucible-release-create
steps:
- name: complete
run: echo "crucible-release-ci-complete"
73 changes: 72 additions & 1 deletion .github/workflows/crucible-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,35 @@ on: # yamllint disable-line rule:truthy
type: boolean
description: FORCE push (override tag)
default: false
workflow_call:
inputs:
dry_run:
required: false
type: boolean
description: Do NOT push/delete tag to/from the repositories
default: false
custom_tag:
required: false
type: string
description: Custom tag to push/delete
default: ''
action:
required: true
type: string
description: Action to perform with the custom-tag (push or delete)
default: 'push'
force_push:
required: false
type: boolean
description: FORCE push (override tag)
default: false
secrets:
PRIVATE_KEY__TAG_CRUCIBLE_RELEASE:
required: true

concurrency:
group: crucible-release
cancel-in-progress: false

jobs:
release-tag:
Expand Down Expand Up @@ -77,7 +106,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible
ref: master
ref: ${{ github.ref }}
path: crucible
set-safe-directory: false
fetch-tags: true
Expand Down Expand Up @@ -202,3 +231,45 @@ jobs:
fi
echo "Tags:"
git ls-remote --tags origin

crucible-release-verification:
if: ${{ inputs.action == 'push' }}
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- release-tag
- projects-tag
steps:
- name: checkout crucible
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible
ref: ${{ github.ref }}
path: crucible
fetch-tags: true
- name: prepare installation resources
run: |
touch /tmp/auth-file.json
cfgfile=$(grep SYSCONFIG= crucible/crucible-install.sh | cut -d '=' -f2 | sed 's/"//g')
sudo mkdir -p $(dirname $cfgfile)
- name: test release install
env:
TAG: ${{ needs.release-tag.outputs.tag }}
run: |
sudo ./crucible/crucible-install.sh \
--release $TAG \
--engine-registry myregistry.io/crucible \
--engine-auth-file /tmp/auth-file.json \
--name "Nobody" \
--email "[email protected]" \
--verbose

crucible-release-complete:
runs-on: [ self-hosted, workflow-overhead ]
timeout-minutes: 10
needs:
- crucible-release-verification
steps:
- name:
run: |
echo "crucible-release-complete"
2 changes: 1 addition & 1 deletion crucible-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ function update_repos_config() {
fi
fi
fi
if echo "${BRANCH}" | grep -q "^\(20[0-9][0-9]\.[1234]\|version-test\)$"; then
if echo "${BRANCH}" | grep -q "^\(20[0-9][0-9]\.[1234]\|version-test\|ci-verstion-test\)$"; then
# this is a version install so lock it down
update_mode=1
MODE="locked"
Expand Down
Loading