Skip to content

Commit

Permalink
Switch release creation to tenants
Browse files Browse the repository at this point in the history
  • Loading branch information
WouterDeKort committed Jan 7, 2025
1 parent 041312a commit 78408a3
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/workflow_build_and_release_containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,25 @@ jobs:
else
echo "SHOULD_CREATE_RELEASE=false" >> $GITHUB_ENV
fi
- name: Create Octo Release if main or deploy to sandbox label present
if: env.SHOULD_CREATE_RELEASE == 'true'
# if: env.SHOULD_CREATE_RELEASE == 'true'
run: |
octoSpaceId="Default"
octoProjectId="Opserver"
octoProjectId="opserver"
dotnet octo create-release --project=$octoProjectId --space=$octoSpaceId --version=${{ needs.generate_date_version.outputs.version }} \
--gitRef=main --server=${{ vars.OCTOPUS_CLOUD_URL }} --apiKey=${{ secrets.OCTOPUS_CLOUD_API_KEY }}
# Note: The gitRef param is for the Octo config repo and not the git repo for the code
--server=${{ vars.OCTOPUS_CLOUD_URL }} --apiKey=${{ secrets.OCTOPUS_CLOUD_API_KEY }}
- name: Deploy via Octopus if main or deploy to ascn-dev if label present
if: env.SHOULD_CREATE_RELEASE == 'true'
# if: env.SHOULD_CREATE_RELEASE == 'true'
run: |
octoSpaceId="Default"
octoProjectId="OpServer"
environmentId="${{ github.ref_name == 'main' && 'main-test' || 'ascn-dev' }}"
octoProjectId="opserver"
environmentId="${{ github.ref_name == 'main' && 'test' || 'dev' }}"
tenantId="${{ github.ref_name == 'main' && 'main' || 'ascn' }}"
dotnet octo deploy-release --project=$octoProjectId --space=$octoSpaceId --version=${{ needs.generate_date_version.outputs.version }} \
--server=${{ vars.OCTOPUS_CLOUD_URL }} --apiKey=${{ secrets.OCTOPUS_CLOUD_API_KEY }} --deployTo=$environmentId
# Note: The gitRef param is for the Octo config repo and not the git repo for the code
--server=${{ vars.OCTOPUS_CLOUD_URL }} --apiKey=${{ secrets.OCTOPUS_CLOUD_API_KEY }} --deployTo=$environmentId --tenant=$tenantId

0 comments on commit 78408a3

Please sign in to comment.