CI - all templates #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Mircea - temp test | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| prep: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| nexus_user: ${{ steps.creds.outputs.nexus_user }} | |
| nexus_password: ${{ steps.creds.outputs.nexus_password }} | |
| steps: | |
| - name: Debug — check secrets at source | |
| env: | |
| RAW_USER: ${{ secrets.NEXUS_CICD_USER }} | |
| RAW_PASSWORD: ${{ secrets.NEXUS_CICD_PASSWORD }} | |
| run: | | |
| echo "RAW_USER length: ${#RAW_USER}" | |
| echo "RAW_PASSWORD length: ${#RAW_PASSWORD}" | |
| - id: creds | |
| run: | | |
| echo "nexus_user=${{ secrets.NEXUS_CICD_USER }}" >> $GITHUB_OUTPUT | |
| echo "nexus_password=${{ secrets.NEXUS_CICD_PASSWORD }}" >> $GITHUB_OUTPUT | |
| test: | |
| needs: prep | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Verify secrets are non-empty | |
| env: | |
| NEXUS_USER: ${{ needs.prep.outputs.nexus_user }} | |
| NEXUS_PASSWORD: ${{ needs.prep.outputs.nexus_password }} | |
| run: | | |
| # Length check — 0 means secret is not accessible at all | |
| echo "NEXUS_USER length: ${#NEXUS_USER}" | |
| echo "NEXUS_PASSWORD length: ${#NEXUS_PASSWORD}" | |
| # Substring will show *** in logs if GitHub masks it (value IS present) | |
| echo "NEXUS_USER first 4: ${NEXUS_USER:0:4}" | |
| echo "NEXUS_PASSWORD first 4: ${NEXUS_PASSWORD:0:4}" | |
| # Confirm secret names — env var names are never masked | |
| echo "--- Available NEXUS_* env vars ---" | |
| env | grep -i nexus || echo "(no NEXUS_* vars found — secret names may differ)" | |
| # json_schema_tests: | |
| # needs: prep | |
| # uses: pbs/gha-public-workflows/.github/workflows/run-commands.yml@main | |
| # secrets: inherit | |
| # with: | |
| # env: PROD | |
| # name: pytest | |
| # before_command: | | |
| # export EXECUTION_MODE=ecs | |
| # sed -i "s/__NEXUSCICDUSER__/${{ needs.prep.outputs.nexus_user }}/g; s/__NEXUSCICDPASSWORD__/${{ needs.prep.outputs.nexus_password }}/g" requirements.txt | |
| # pip3 install -r requirements.txt | |
| # command: | | |
| # pytest -s -v --env=PROD --junit-xml=./results_tvault_schema_PROD.xml | |
| # parser: true | |
| # report_paths: './*.xml' |