Skip to content

Commit a841385

Browse files
fix: remove artifact-registry (#226)
This PR removes `artifact-registry` step from the pipeline as we don't need Docker containers with add-on builds in the ghcr.io. It is not used in the infra anywhere. Also clean up README.md. Test run: https://github.com/splunk/splunk-add-on-for-mysql/actions/runs/7669490177 --------- Co-authored-by: kdoroszko-splunk <kdoroszko@splunk.com>
1 parent 882f8d4 commit a841385

File tree

6 files changed

+1
-164
lines changed

6 files changed

+1
-164
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 1 addition & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ jobs:
284284
if: ${{ needs.setup-workflow.outputs.skip-workflow != 'Yes' }}
285285
steps:
286286
- uses: actions/checkout@v3
287-
- name: run fossa anlyze and create report
287+
- name: run fossa analyze and create report
288288
run: |
289289
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
290290
fossa analyze --debug
@@ -836,82 +836,6 @@ jobs:
836836
name: appinspect-api-html-report-${{ matrix.tags }}
837837
path: AppInspect_response.html
838838

839-
artifact-registry:
840-
runs-on: ubuntu-latest
841-
needs:
842-
- meta
843-
- build
844-
if: ${{ !cancelled() && needs.build.result == 'success' && needs.meta.result == 'success' }}
845-
outputs:
846-
artifact: ${{ steps.artifactid.outputs.result }}
847-
permissions:
848-
contents: read
849-
packages: write
850-
steps:
851-
- uses: actions/checkout@v3
852-
- uses: actions/download-artifact@v3
853-
with:
854-
name: package-splunkbase
855-
path: build/package/splunkbase
856-
- id: getappid
857-
run: |
858-
appid=$(jq -r '.info.id.name' package/app.manifest)
859-
echo appid="$appid"
860-
echo "result=$appid" >> "$GITHUB_OUTPUT"
861-
- run: |
862-
curl -LO https://github.com/oras-project/oras/releases/download/v0.12.0/oras_0.12.0_linux_amd64.tar.gz
863-
mkdir -p oras-install/
864-
tar -zxf oras_0.12.0_*.tar.gz -C oras-install/
865-
mv oras-install/oras /usr/local/bin/
866-
rm -rf oras_0.12.0_*.tar.gz oras-install/
867-
- name: Set up Docker Buildx
868-
uses: docker/setup-buildx-action@v3
869-
- name: Login to GitHub Packages Docker Registry
870-
uses: docker/login-action@v2.2.0
871-
with:
872-
registry: ghcr.io
873-
username: ${{ github.actor }}
874-
password: ${{ github.token }}
875-
- name: Docker meta
876-
id: meta
877-
uses: docker/metadata-action@v5.4.0
878-
with:
879-
images: ghcr.io/${{ github.repository }}
880-
tags: |
881-
type=semver,pattern=v{{major}}.{{minor}},prefix=${{ steps.getappid.outputs.result }}-
882-
type=semver,pattern=v{{major}},prefix=${{ steps.getappid.outputs.result }}-
883-
type=semver,pattern=v{{version}},prefix=${{ steps.getappid.outputs.result }}-
884-
type=semver,pattern={{major}}.{{minor}},prefix=${{ steps.getappid.outputs.result }}-
885-
type=semver,pattern={{major}},prefix=${{ steps.getappid.outputs.result }}-
886-
type=semver,pattern={{version}},prefix=${{ steps.getappid.outputs.result }}-
887-
type=ref,event=branch,prefix=${{ steps.getappid.outputs.result }}-
888-
type=ref,event=pr,prefix=${{ steps.getappid.outputs.result }}-
889-
type=sha,prefix=${{ steps.getappid.outputs.result }}-
890-
type=sha,format=long,prefix=${{ steps.getappid.outputs.result }}-
891-
- name: Upload artifacts
892-
run: |
893-
tee /tmp/tags &>/dev/null <<EOF
894-
${{ steps.meta.outputs.tags }}
895-
EOF
896-
pushd build/package/splunkbase/
897-
PACKAGE=$(ls ./*)
898-
echo "$PACKAGE"
899-
mv "$PACKAGE" "${{ steps.getappid.outputs.result }}".spl
900-
while IFS= read -r line
901-
do
902-
echo ">>$line<<"
903-
oras push \
904-
--manifest-config /dev/null:application/vnd.splunk.ent.package.v1.tar+gzip \
905-
"$line" \
906-
"${{ steps.getappid.outputs.result }}".spl
907-
echo " complete"
908-
done < /tmp/tags
909-
popd
910-
- name: Output artifact locator
911-
id: artifactid
912-
run: |
913-
echo "result= ${{ needs.meta.outputs.sc4s }}" >> "$GITHUB_OUTPUT"
914-
915839
setup:
916840
needs:
917841
- build

README.md

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -411,30 +411,6 @@ appinspect-api-html-report-self-service
411411

412412
**Action used:** NA
413413

414-
# artifact-registry
415-
416-
**Description:**
417-
418-
- Uploads the generated addon build to ghcr.io.
419-
420-
**Action used:**
421-
422-
- https://github.com/actions/download-artifact
423-
- https://github.com/docker/setup-buildx-action
424-
- https://github.com/docker/login-action
425-
426-
**Artifacts:**
427-
428-
- No Artifacts
429-
430-
- This build can be downloaded using oras if it’s not availale in ghcr yet
431-
432-
- User can use the following command to download build for the respective PR
433-
434-
```
435-
oras pull -u <github-username> -p <github-token> ghcr.io/splunk/splunk-add-on-for-microsoft-sql-server:Splunk_TA_microsoft-sqlserver-<PR-no>
436-
```
437-
438414
# test-unit-python3
439415

440416
**Description:**
@@ -657,69 +633,6 @@ source_code.zip
657633
source_code.tar.gz
658634
```
659635

660-
Publish-untested (Publish a manual release):
661-
============================================
662-
663-
**NOTE:** This stage will create a new release with the main branch code irrespective of the test-execution status hence before creating a new release via this stage make sure all stakeholders are aware before the release.
664-
665-
- Follow the below steps to create a manual release and publish the relevant packages:
666-
667-
- Go to "Actions" tab of your Github repo link.
668-
669-
- On the left side, you'd have **"publish-untested"** workflow mentioned. Click on this stage.
670-
671-
- Click on **"Run Workflow"**.
672-
673-
- Select the branch from which you to create the tag.
674-
675-
- Ideally, all our final code would be in the main branch. Hence, in majority of cases the branch would be "main" only.
676-
677-
- Provide the version in "Tag to release" textbox.
678-
679-
- Example, if you are releasing a new version v4.0.1 of your add-on, just enter **"4.0.1"** (just the dot delimited digits, do not prefix it with "v").
680-
681-
- Click on **"Run Workflow"**.
682-
683-
- Wait for a couple minutes for the build to be generated and published.
684-
685-
- Once the above stage completes, go to "Releases" section of your repo.
686-
687-
- Edit the release and write the relevant release notes you want to for your bugfix/ hotfix release and save the changes.
688-
689-
<img src="images/publish-untested/publish-untested.png" alt="publish-untested" style="width:200px;"/>
690-
691-
692-
release-set-git-tags
693-
====================
694-
**Description**
695-
696-
- This action updates major/minor release tags on a tag push. e.g. Update v1 and v1.2 tag when released v1.2.3.
697-
698-
**Action used** https://github.com/haya14busa/action-update-semver
699-
700-
701-
Artifacts for different stages:
702-
================================
703-
704-
- Artifacts can be found in the summary if we scroll to the bottom as shown in the screenshot below. <br />
705-
<img src="images/artifacts_all.png" alt="publish-untested" style="width:200px;"/>
706-
707-
- Link to the test-report for the stage can be found inside logs as shown here:
708-
709-
<img src="images/modinput/report_link.png" alt="report_link" style="width:200px;"/>
710-
<img src="images/modinput/report_stage.png" alt="report_stage" style="width:200px;"/>
711-
712-
713-
Different Test reports stages
714-
=============================
715-
- addonfactory-sample-scanner
716-
- splunk 8.x.y knowledge test report
717-
- splunk 8.x.y modinput_functional test report
718-
- splunk 8.x.y ui chrome test report
719-
- splunk 8.x.y requirement_test test report
720-
- splunk 8.x.y unit test report
721-
722-
723636
Vendor Addon Matrix tests
724637
=========================
725638

images/artifacts_all.png

-787 KB
Binary file not shown.

images/modinput/report_link.png

-839 KB
Binary file not shown.

images/modinput/report_stage.png

-804 KB
Binary file not shown.
-556 KB
Binary file not shown.

0 commit comments

Comments
 (0)