|
6 | 6 | env: |
7 | 7 | # kosli commands picks up org, flow, trail and api-token from these environment variables |
8 | 8 | KOSLI_ORG: kosli-public |
| 9 | + KOSLI_FLOW: "jira-example-release" |
9 | 10 | KOSLI_API_TOKEN: "${{ secrets.KOSLI_PUBLIC_API_TOKEN }}" |
10 | 11 | KOSLI_CLI_VERSION: "2.11.8" |
11 | 12 | KOSLI_ENV_STAGING: "jira-integration-example-staging" |
|
33 | 34 | version: |
34 | 35 | ${{ env.KOSLI_CLI_VERSION }} |
35 | 36 |
|
36 | | - - name: Create release candidate |
| 37 | + - name: Create Jira release candidate |
37 | 38 | run: | |
38 | 39 | source scripts/lib-jira.sh |
39 | | - source scripts/lib-kosli.sh |
40 | 40 |
|
41 | 41 | # Fail if release already exists |
42 | 42 | CURRENT_REL_JSON=$(get_current_release_candidate ${{ env.JIRA_PROJECT_ID }}) |
|
50 | 50 | TIMESTAMP=$(date -u "+%Y-%m-%d-%H-%M-%S") |
51 | 51 | CREATE_RESULT_JSON=$(create_release ${{ env.JIRA_PROJECT_ID }} ${TIMESTAMP}) |
52 | 52 | RELEASE_ID=$(echo "${CREATE_RESULT_JSON}" | jq .id) |
53 | | - |
| 53 | + echo "RELEASE_ID=${RELEASE_ID}" >> $GITHUB_ENV |
| 54 | +
|
| 55 | + - name: Begin trail |
| 56 | + uses: ./.github/workflows/composites/kosli-begin-trail |
| 57 | + with: |
| 58 | + kosli-trail: ${{ env.RELEASE_ID }} |
| 59 | +# kosli-template-file: ${{ env.KOSLI_TEMPLATE_FILE }} |
| 60 | + |
| 61 | + - name: Report current staging SW |
| 62 | + run: | |
| 63 | + source scripts/lib-kosli.sh |
| 64 | + get_current_running_env_json ${{ env.KOSLI_ENV_STAGING }} > /tmp/staging-env.json |
| 65 | + jq '[.[] | {name, fingerprint, git_commit}]' /tmp/staging-env.json > /tmp/user-data.json |
| 66 | + kosli attest generic \ |
| 67 | + --name staging-software \ |
| 68 | + --trail ${{ env.RELEASE_ID }} \ |
| 69 | + --user-data /tmp/user-data.json |
| 70 | +
|
| 71 | + - name: Add Jira tickets to release |
| 72 | + run: | |
| 73 | + source scripts/lib-jira.sh |
| 74 | + source scripts/lib-kosli.sh |
54 | 75 | # Add all jira tickets between prod and staging |
55 | 76 | JIRA_KEYS=$(get_issue_keys_between_staging_and_prod) |
56 | 77 | echo "Found issues: ${JIRA_KEYS}" |
|
0 commit comments