-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial sync to sw provider 1.0.0 * Updating generated sources and documentation * Updating generated sources from broker 10.8.1 defaults * Acceptance test to use lower default that works on the simulated broker * Ported documentation from sw broker latest * Fix broker fail if all creds are provided in env (ported from sw provider)
- Loading branch information
Showing
279 changed files
with
6,204 additions
and
4,695 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.21" | ||
go-version: "1.22" | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
@@ -28,14 +28,14 @@ jobs: | |
- name: Checkout generator | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: SolaceDev/broker-terraform-provider-generator | ||
repository: SolaceDev/broker-terraform-code-generator | ||
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT | ||
path: broker-terraform-provider-generator | ||
ref: "v0.2.0" | ||
path: broker-terraform-code-generator | ||
ref: "main" | ||
|
||
- name: Build and install generator | ||
run: | | ||
pushd broker-terraform-provider-generator | ||
pushd broker-terraform-code-generator | ||
go mod tidy | ||
go install . | ||
ls ~/go/bin | ||
|
@@ -48,7 +48,7 @@ jobs: | |
BASE=`pwd` | ||
pushd internal/broker/generated | ||
rm ./* | ||
SEMP_V2_SWAGGER_CONFIG_EXTENDED_JSON="$BASE/ci/swagger_spec/$SWAGGER_SPEC_NAME" ~/go/bin/broker-terraform-provider-generator all | ||
SEMP_V2_SWAGGER_CONFIG_EXTENDED_JSON="$BASE/ci/swagger_spec/$SWAGGER_SPEC_NAME" ~/go/bin/broker-terraform-code-generator appliance-provider all | ||
popd | ||
- name: Build provider | ||
|
@@ -76,7 +76,7 @@ jobs: | |
id: check-changed-files | ||
with: | ||
files: | | ||
!broker-terraform-provider-generator | ||
!broker-terraform-code-generator | ||
- name: Run step only when any of the above files change. | ||
if: steps.check-changed-files.outputs.files_changed == 'true' | ||
|
@@ -90,7 +90,7 @@ jobs: | |
committer_name: GitHub Actions | ||
committer_email: [email protected] | ||
message: 'Updating generated source' | ||
add: ". ':!broker-terraform-provider-generator'" | ||
add: ". ':!broker-terraform-code-generator'" | ||
new_branch: GeneratedSourceUpdates-${{ github.ref_name }} | ||
|
||
- name: Create pull request | ||
|
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 |
---|---|---|
|
@@ -14,9 +14,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.21" | ||
go-version: "1.22" | ||
|
||
- name: Checkout the code | ||
uses: actions/checkout@v2 | ||
|
@@ -31,36 +31,6 @@ jobs: | |
echo "NEXT_DEV_VERSION=$(echo ${{ github.ref_name }} | awk -F. -v OFS=. '{$NF += 1 ; print}')" >> $GITHUB_ENV | ||
fi | ||
- name: Checkout generator | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: SolaceDev/broker-terraform-provider-generator | ||
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT | ||
path: broker-terraform-provider-generator | ||
ref: "v0.2.0" | ||
|
||
- name: Build and install generator | ||
run: | | ||
pushd broker-terraform-provider-generator | ||
go mod tidy | ||
go install . | ||
ls ~/go/bin | ||
popd | ||
- name: Generate provider code | ||
run: | | ||
SWAGGER_SPEC_NAME=`ls ci/swagger_spec` | ||
echo "Generating code using spec $SWAGGER_SPEC_NAME" | ||
BASE=`pwd` | ||
pushd internal/broker/generated | ||
rm ./* | ||
SEMP_V2_SWAGGER_CONFIG_EXTENDED_JSON="$BASE/ci/swagger_spec/$SWAGGER_SPEC_NAME" ~/go/bin/broker-terraform-provider-generator all | ||
popd | ||
- name: Remove generator source | ||
run: | | ||
rm -rf broker-terraform-provider-generator | ||
- name: Code format, dependencies, checks | ||
run: | | ||
make fmt | ||
|
@@ -115,15 +85,12 @@ jobs: | |
sed -i "s/productName=.*$/productName=${{ github.event.repository.name }}/g" ci/whitesource/whitesource-agent.config | ||
sed -i "s/projectName=.*$/projectName=${{ github.event.repository.name }}/g" ci/whitesource/whitesource-agent.config | ||
cat ci/whitesource/whitesource-agent.config | grep productVersion | ||
- name: Run Whitesource Action to update licenses | ||
uses: SolaceDev/[email protected] | ||
with: | ||
wssURL: https://saas.whitesourcesoftware.com/agent | ||
apiKey: ${{ secrets.WSS_API_KEY }} | ||
productName: ${{ github.event.repository.name }} | ||
projectName: ${{ github.event.repository.name }} | ||
configFile: 'ci/whitesource/whitesource-agent.config' | ||
curl https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar --output ci/whitesource/wss-unified-agent.jar | ||
export WS_APIKEY="${{ secrets.WSS_API_KEY }}" | ||
export WS_WSS_URL="https://saas.whitesourcesoftware.com/agent" | ||
export WS_PRODUCTNAME="${{ github.event.repository.name }}" | ||
export WS_PROJECTNAME="${{ github.event.repository.name }}" | ||
java -jar ci/whitesource/wss-unified-agent.jar -c ci/whitesource/whitesource-agent.config -d . | ||
- name: Create the release branch | ||
uses: peterjgrainger/[email protected] | ||
|
@@ -140,20 +107,20 @@ jobs: | |
# with: | ||
# branch: ${{ env.NEXT_DEV_VERSION }} | ||
|
||
- name: Create next dev branch | ||
if: env.NEXT_DEV_VERSION != '' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git checkout -b ${{ env.NEXT_DEV_VERSION }} | ||
VERSION=$(echo "${{ env.NEXT_DEV_VERSION }}" | cut -d'v' -f2) | ||
sed -i "s/version =.*$/version = \"${VERSION}\"/g" version.go | ||
git commit -a -m "Uprev'd version to ${VERSION}" | ||
git push --set-upstream origin ${{ env.NEXT_DEV_VERSION }} | ||
- name: Delete last dev branch | ||
if: env.NEXT_DEV_VERSION != '' | ||
uses: dawidd6/action-delete-branch@v3 | ||
with: | ||
github_token: ${{github.token}} | ||
branches: "${{ github.ref_name }}" | ||
# - name: Create next dev branch | ||
# if: env.NEXT_DEV_VERSION != '' | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: | | ||
# git checkout -b ${{ env.NEXT_DEV_VERSION }} | ||
# VERSION=$(echo "${{ env.NEXT_DEV_VERSION }}" | cut -d'v' -f2) | ||
# sed -i "s/version =.*$/version = \"${VERSION}\"/g" version.go | ||
# git commit -a -m "Uprev'd version to ${VERSION}" | ||
# git push --set-upstream origin ${{ env.NEXT_DEV_VERSION }} | ||
|
||
# - name: Delete last dev branch | ||
# if: env.NEXT_DEV_VERSION != '' | ||
# uses: dawidd6/action-delete-branch@v3 | ||
# with: | ||
# github_token: ${{github.token}} | ||
# branches: "${{ github.ref_name }}" |
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
Oops, something went wrong.