From f4d13b1aecf16fcd1ae5751c4620102eb23ad8cc Mon Sep 17 00:00:00 2001 From: Lionel Hercot Date: Fri, 12 Jul 2024 20:05:38 -0700 Subject: [PATCH] [ignore] Update CHANGELOG.md for v1.2.1 release and add CI testing --- .github/workflows/checks.yml | 87 ++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 4 ++ go.mod | 2 +- main.go | 2 +- 4 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/checks.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 00000000..bf8103f6 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,87 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + +permissions: + # Permission for checking out code + contents: read + +jobs: + build: + name: Check & Build Provider + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + - run: chmod +x ./scripts/gofmtcheck.sh + - name: gofmt Check + run: ./scripts/gofmtcheck.sh + - run: go mod tidy + - run: go mod vendor + - name: Check vendor for changes + run: git diff --exit-code + - name: Build + run: go build -v + + go-releaser: + name: Dry-Run GoReleaser Check + needs: [build] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Unshallow + run: git fetch --prune --unshallow + - uses: actions/setup-go@v5 + - name: Install GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + install-only: true + version: latest + - name: GoReleaser Release Check + run: goreleaser release --skip=publish,sign --snapshot --clean + + # acceptance: + # name: Acceptance Tests + # if: github.repository_owner == 'CiscoDevNet' + # needs: [build] + # runs-on: ubuntu-latest + # env: + # MSO_USERNAME: 'ansible_github_ci' + # MSO_PASSWORD: 'sJ94G92#8dq2hx*K4qh' + # concurrency: + # group: tf-mso-ci-test-${{ matrix.ndo_host.name }} + # cancel-in-progress: false + # strategy: + # fail-fast: false + # matrix: + # ndo_host: + # - name: v4.1 + # url: 'https://173.36.219.32/' + # - name: v4.3 + # url: 'https://173.36.219.35/' + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-go@v5 + # with: + # go-version-file: 'go.mod' + # - uses: hashicorp/setup-terraform@v3 + # with: + # terraform_version: '1.7.*' + # terraform_wrapper: false + # - name: Terraform Acceptance Test (NDO ${{ matrix.ndo_host.name }}) + # run: go test github.com/CiscoDevNet/terraform-provider-mso/mso -v -race -timeout 300m -coverprofile=coverage.out -covermode=atomic + # env: + # TF_ACC: '1' + # TF_ACC_STATE_LINEAGE: '1' + # MSO_URL: ${{ matrix.ndo_host.url }} + # - name: Upload coverage to Codecov + # # Upload Coverage on latest only + # if: ${{ matrix.ndo_host.name == 'v4.3'}} + # uses: codecov/codecov-action@v4 + # with: + # token: ${{ secrets.CODECOV_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index a8faf94c..a94946c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.1 (July 12, 2024) +BUG FIXES: +- Add check to avoid error in plan when mso_schema_site_service_graph resource is used when template does not exist yet. + ## 1.2.0 (July 2, 2024) BUG FIXES: - Prevent destroy operation for static ports in bulk list when updating the list diff --git a/go.mod b/go.mod index 22e659a2..719f029f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/terraform-providers/terraform-provider-mso +module github.com/CiscoDevNet/terraform-provider-mso go 1.13 diff --git a/main.go b/main.go index 8786829f..3bdd3d3d 100644 --- a/main.go +++ b/main.go @@ -1,9 +1,9 @@ package main import ( + "github.com/CiscoDevNet/terraform-provider-mso/mso" "github.com/hashicorp/terraform-plugin-sdk/plugin" "github.com/hashicorp/terraform-plugin-sdk/terraform" - "github.com/terraform-providers/terraform-provider-mso/mso" ) func main() {