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

[DO NOT MERGE] Test workflows do not merge #2980

Closed
wants to merge 16 commits into from
25 changes: 23 additions & 2 deletions .github/workflows/tests-integration-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ on:
pool-namespace:
type: string
default: 'official'
something:
type: string
required: false
secrets:
TEST_SECRET:
required: true
SHEPHERD_SERVICE_ACCOUNT_TOKEN:
required: true
CLIENT_SECRET:
required: true
jobs:
run-integration-tests:
defaults:
Expand Down Expand Up @@ -75,15 +85,26 @@ jobs:
with:
repository: cloudfoundry/cf-deployment-concourse-tasks
path: cf-deployment-concourse-tasks

- id: check-env
name: Check what is present in the environment
env:
test_secret: ${{ secrets.TEST_SECRET }}
pool_name: ${{ inputs.pool-name }}
pool_namespace: ${{ inputs.pool-namespace }}
run: |
env
- id: claim-env
name: Claim Environment
env:
test_secret: ${{ secrets.TEST_SECRET }}
account_token: ${{ secrets.SHEPHERD_SERVICE_ACCOUNT_TOKEN }}
pool_name: ${{ inputs.pool-name }}
pool_namespace: ${{ inputs.pool-namespace }}
run: |
shepherd login service-account ${account_token}
echo "From input: -> ${{ inputs.something }} <-"
echo "This is my mega secret secret ->${test_secret}<-"
echo "Trying to get it directly from secret itself ->${{ secrets.TEST_SECRET }}<-"
shepherd login service-account ${{ secrets.SHEPHERD_SERVICE_ACCOUNT_TOKEN }}

echo "shepherd create lease --duration 8h --pool ${pool_name} --pool-namespace ${pool_namespace} --namespace tas-devex"
lease_id=$(shepherd create lease --duration 8h --pool ${pool_name} --pool-namespace ${pool_namespace} --namespace tas-devex --json | jq -r .id)
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/tests-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
workflow:
default: all
type: string
secrets:
TEST_SECRET:
required: true
SHEPHERD_SERVICE_ACCOUNT_TOKEN:
required: true
CLIENT_SECRET:
required: true
workflow_dispatch:
inputs:
workflow:
Expand All @@ -30,7 +37,10 @@ jobs:
run-with-client-creds: false
os: ubuntu-latest
name: Integration
secrets: inherit
secrets:
TEST_SECRET: ${{ secrets.TEST_SECRET }}
SHEPHERD_SERVICE_ACCOUNT_TOKEN: ${{ secrets.SHEPHERD_SERVICE_ACCOUNT_TOKEN }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}

run-integration-tests-cf-env-with-client-creds:
name: client creds
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/tests-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- "v9.*"
- "v8.*"
- "v7.*"
pull_request:
pull_request_target:
branches:
- main
- v9
Expand All @@ -18,8 +18,8 @@ on:
- ".gitpod.yml"
- "README.md"

permissions:
contents: read
#permissions:
# contents: write

defaults:
run:
Expand Down Expand Up @@ -87,11 +87,26 @@ jobs:


integration:
needs:
- units
- units-windows
# needs:
# - units
# - units-windows
name: Integration tests
if: ${{ github.event != 'workflow_dispatch' }}
uses: ./.github/workflows/tests-integration.yml
secrets: inherit
secrets:
TEST_SECRET: ${{ secrets.TEST_SECRET }}
SHEPHERD_SERVICE_ACCOUNT_TOKEN: ${{ secrets.SHEPHERD_SERVICE_ACCOUNT_TOKEN }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
direct-integration-stuff:
name: Direct integration stuff
uses: ./.github/workflows/tests-integration-reusable.yml
with:
capi-version: edge
run-with-client-creds: false
os: ubuntu-latest
name: Integration
secrets:
TEST_SECRET: ${{ secrets.TEST_SECRET }}
SHEPHERD_SERVICE_ACCOUNT_TOKEN: ${{ secrets.SHEPHERD_SERVICE_ACCOUNT_TOKEN }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
# vim: set sw=2 ts=2 sts=2 et tw=78 foldlevel=2 fdm=indent nospell:
Loading