-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cumulusci-next-snapshots' into jlantz/update-auth-struc…
…ture
- Loading branch information
Showing
54 changed files
with
2,947 additions
and
103 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Beta Test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
debug: | ||
required: false | ||
default: false | ||
type: boolean | ||
secrets: | ||
dev-hub-auth-url: | ||
required: true | ||
gh-email: | ||
required: true | ||
github-token: | ||
required: true | ||
github-app-id: | ||
required: false | ||
github-app-key: | ||
required: false | ||
|
||
jobs: | ||
beta-test: | ||
name: "Beta Test in Scratch Org" | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.env-name }} | ||
container: | ||
image: ghcr.io/muselab-d2x/d2x:cumulusci-next | ||
options: --user root | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.github-token }} | ||
env: | ||
DEV_HUB_AUTH_URL: "${{ secrets.dev-hub-auth-url }}" | ||
PACKAGING_ORG_AUTH_URL: "${{ secrets.packaging-org-auth-url }}" | ||
CUMULUSCI_SERVICE_github: '{ "username": "${{ github.actor }}", "token": "${{ secrets.github-token }}", "email": "${{ secrets.gh-email }}" }' | ||
GITHUB_APP_ID: "${{ secrets.github-app-id }}" | ||
GITHUB_APP_KEY: "${{ secrets.github-app-key }}" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Auth to DevHub | ||
run: /usr/local/bin/devhub.sh | ||
- name: Run Beta Test | ||
run: cci flow run ci_beta --org beta | ||
- name: Delete Scratch Org | ||
if: ${{ always() }} | ||
run: | | ||
cci org scratch_delete beta | ||
shell: bash |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Check No Org | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
debug: | ||
description: "Enable debug logging output for CumulusCI" | ||
required: false | ||
default: false | ||
type: boolean | ||
secrets: | ||
github-token: | ||
required: true | ||
|
||
jobs: | ||
check-no-org: | ||
name: "Check No Org" | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/muselab-d2x/d2x:cumulusci-next-snapshots | ||
options: --user root | ||
credentials: | ||
username: "${{ github.actor }}" | ||
password: "${{ secrets.github-token }}" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Run Checks | ||
run: | | ||
set -e { | ||
cci task run check_no_org \ | ||
$([[ "${{ inputs.debug }}" == "true" ]] && echo " --debug") | ||
} || { | ||
echo "::error::Failed to run checks. Running cci error info..." | ||
cci error info | ||
exit 1 | ||
} | ||
shell: bash |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Configure Org for Testing | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
org: | ||
required: false | ||
default: feature | ||
type: string | ||
debug: | ||
required: false | ||
default: false | ||
type: boolean | ||
secrets: | ||
dev-hub-auth-url: | ||
required: false | ||
dev-hub-username: | ||
required: false | ||
dev-hub-client-id: | ||
required: false | ||
dev-hub-private-key: | ||
required: false | ||
gh-email: | ||
required: true | ||
github-token: | ||
required: true | ||
github-app-id: | ||
required: false | ||
github-app-key: | ||
required: false | ||
|
||
jobs: | ||
configure-org-for-testing: | ||
name: "Configure Org for Testing" | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/muselab-d2x/d2x:cumulusci-next-snapshots | ||
options: --user root | ||
credentials: | ||
username: "${{ github.actor }}" | ||
password: "${{ secrets.github-token }}" | ||
steps: | ||
- name: D2X Image Details | ||
run: | | ||
echo "D2X Docker Image: ghcr.io/muselab-d2x/d2x" | ||
echo "D2X Docker Tag: cumulusci-next-snapshots" | ||
echo "D2X Docker Image: ghcr.io/muselab-d2x/d2x:cumulusci-next-snapshots" >> $GITHUB_STEP_SUMMARY | ||
shell: bash | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Auth to DevHub | ||
run: /usr/local/bin/devhub.sh | ||
env: | ||
DEV_HUB_AUTH_URL: "${{ secrets.dev-hub-auth-url }}" | ||
DEV_HUB_USERNAME: "${{ secrets.dev-hub-username }}" | ||
DEV_HUB_CLIENT_ID: "${{ secrets.dev-hub-client-id }}" | ||
DEV_HUB_PRIVATE_KEY: "${{ secrets.dev-hub-private-key }}" | ||
|
||
- name: Set ${{ inputs.org }} org as default org | ||
run: cci org default ${{ inputs.org }} | ||
|
||
- name: Configure Org for Testing | ||
id: configure_org | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.github-token }}" | ||
CUMULUSCI_SERVICE_github: '{ "username": "${{ github.actor }}", "token": "${{ secrets.github-token }}", "email": "${{ secrets.gh-email }}" }' | ||
GITHUB_APP_ID: "${{ secrets.github-app-id }}" | ||
GITHUB_APP_KEY: "${{ secrets.github-app-key }}" | ||
run: | | ||
cci flow run ci_feature_2gp --skip-from run-tests | ||
shell: bash |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Create Feature Test Package | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
org: | ||
required: false | ||
default: feature | ||
type: string | ||
debug: | ||
required: false | ||
default: false | ||
type: boolean | ||
docker_image: | ||
required: false | ||
default: ghcr.io/muselab-d2x/d2x | ||
type: string | ||
docker_tag: | ||
type: string | ||
required: false | ||
default: cumulusci-next-snapshots | ||
secrets: | ||
dev-hub-auth-url: | ||
required: false | ||
dev-hub-username: | ||
required: false | ||
dev-hub-client-id: | ||
required: false | ||
dev-hub-private-key: | ||
required: false | ||
gh-email: | ||
required: true | ||
github-token: | ||
required: true | ||
github-app-id: | ||
required: false | ||
github-app-key: | ||
required: false | ||
|
||
jobs: | ||
create-feature-test-package: | ||
name: "Create Feature Test Package" | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{ inputs.docker_image }}:${{ inputs.docker_tag }} | ||
options: --user root | ||
credentials: | ||
username: "${{ github.actor }}" | ||
password: "${{ secrets.github-token }}" | ||
steps: | ||
- name: D2X Image Details | ||
run: | | ||
echo "D2X Docker Image: ${{ inputs.docker_image }}" | ||
echo "D2X Docker Tag: ${{ inputs.docker_tag }}" | ||
echo "D2X Docker Image: `${{ inputs.docker_image }}:${{ inputs.docker_tag }}`" >> $GITHUB_STEP_SUMMARY | ||
shell: bash | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Auth to DevHub | ||
run: /usr/local/bin/devhub.sh | ||
env: | ||
DEV_HUB_AUTH_URL: "${{ secrets.dev-hub-auth-url }}" | ||
DEV_HUB_USERNAME: "${{ secrets.dev-hub-username }}" | ||
DEV_HUB_CLIENT_ID: "${{ secrets.dev-hub-client-id }}" | ||
DEV_HUB_PRIVATE_KEY: "${{ secrets.dev-hub-private-key }}" | ||
- name: Set ${{ inputs.org }} org as default org | ||
run: cci org default ${{ inputs.org }} | ||
- name: Build Feature Test Package | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.github-token }}" | ||
CUMULUSCI_SERVICE_github: '{ "username": "${{ github.actor }}", "token": "${{ secrets.github-token }}", "email": "${{ secrets.gh-email }}" }' | ||
GITHUB_APP_ID: "${{ secrets.github-app-id }}" | ||
GITHUB_APP_KEY: "${{ secrets.github-app-key }}" | ||
run: cci flow run build_feature_test_package $([[ "${{ inputs.debug }}" == "true" ]] && echo " --debug") | tee cumulusci-flow.log | ||
shell: bash | ||
- name: Set Commit Status | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.github-token }}" | ||
run: | | ||
VERSION=$(cat cumulusci-flow.log | grep -o -E -m 1 "04t[a-zA-Z0-9]{15}") | ||
gh api \ | ||
--method POST \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
'/repos/${{ github.repository }}/statuses/${{ github.sha }}' \ | ||
-f state='success' \ | ||
-f description="version_id: $VERSION" \ | ||
-f context='Build Feature Test Package' | ||
shell: bash |
Oops, something went wrong.