All local tests pass. Integration tests fail only because the repository doesn't exist yet.
# Clear environment variable and refresh auth with proper scopes
unset GITHUB_TOKEN
gh auth refresh -h github.com -s workflow,repo
# Verify authentication
gh auth statusOption A: Via GitHub CLI
cd /Users/sjrj/Platform/retain-artifacts
# Create repository
gh repo create NovoNordisk-OpenSource/retain_pipeline_run --public \
--description "GitHub Action for retaining pipeline artifacts with immutable releases assessment" \
--clone=false
# Initialize and push
git init
git add .
git commit -m "Initial retain-artifacts action
Complete GitHub Action for pipeline artifact retention:
- Immutable releases assessment based on GitHub documentation
- Comprehensive artifact collection and attachment
- Rich release metadata for compliance and audit
- Production-ready with full testing suite
- Follows nn-dma action patterns (similar to generate-verification-report)"
git remote add origin https://github.com/NovoNordisk-OpenSource/retain_pipeline_run.git
git branch -M main
git push -u origin mainOption B: Via GitHub Web Interface
- Go to https://github.com/organizations/innersource-nn/repositories/new
- Repository name:
retain-artifacts - Description: "GitHub Action for retaining pipeline artifacts with immutable releases assessment"
- Public repository
- Create repository
- Then push code:
cd /Users/sjrj/Platform/retain-artifacts
git init
git add .
git commit -m "Initial retain-artifacts action"
git remote add origin https://github.com/NovoNordisk-OpenSource/retain_pipeline_run.git
git branch -M main
git push -u origin main# Test basic functionality
gh workflow run test-action.yml -f test_scenario=basic
# Monitor the run
gh run list --workflow=test-action.yml
# View detailed logs
gh run view --log
# Check created releases
gh release listcd /Users/sjrj/Platform/qms-reference
# Create test release branch
git checkout -b release/test-retain-artifacts-$(date +%Y%m%d-%H%M)
git push origin release/test-retain-artifacts-$(date +%Y%m%d-%H%M)
# Create PR to trigger QMS pipeline
gh pr create --title "Test retain-artifacts integration" \
--body "Testing NovoNordisk-OpenSource/retain_pipeline_run@main in QMS pipeline
This PR tests the new retain-artifacts action integration:
- Artifact collection from QMS validation pipeline
- Release creation with compliance metadata
- Immutable releases assessment
- Full audit trail retention
The retain_pipeline_run job should execute and create a release with all pipeline artifacts."After each test:
- Check Releases: Go to repository → Releases tab
- Verify Artifacts: Each release should have ZIP files attached
- Review Metadata: Release notes should include pipeline info and immutable assessment
- Test Downloads: Verify artifacts can be downloaded and contain expected content
- ✅ Release created:
Test Release - basic - {run_id} - ✅ 3 artifacts attached (test-basic-artifacts.zip, test-data-artifacts.zip, test-report-artifacts.zip)
- ✅ Assessment:
likelyorsupportedfor nn-dma organization - ✅ Rich release notes with pipeline metadata
- ✅ Release created:
QMS Release - release/test-retain-artifacts-{date} - ✅ All QMS pipeline artifacts attached
- ✅ Comprehensive validation summary in release notes
- ✅ Full compliance audit trail
-
"Resource not accessible by integration"
- Fix: Add
contents: writeto workflow permissions
- Fix: Add
-
"No artifacts found"
- Fix: Ensure previous jobs use
actions/upload-artifact@v4
- Fix: Ensure previous jobs use
-
"Authentication required"
- Fix: Run
gh auth refresh -s workflow,repo
- Fix: Run
-
"Release already exists"
- Fix: Each test creates unique tags, but if needed:
gh release delete <tag>
- Fix: Each test creates unique tags, but if needed:
-
"Action not found"
- Fix: Ensure repository exists and action.yml is in root
The deployment is successful when:
- ✅ Action repository exists and is accessible
- ✅ Test workflows run without errors
- ✅ Releases are created with artifacts attached
- ✅ QMS pipeline integration works smoothly
- ✅ Immutable releases assessment appears correctly
- ✅ All compliance requirements are met
All components are prepared. Start with Step 1 above to begin the deployment process.