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

CI Production Workflows for Docker and Docs #901

Merged
merged 4 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
env:
DOCKER_USER: ethycaci
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
TAG: ${{ github.event.release.tag_name }}

jobs:
push-fidesctl:
Expand All @@ -35,6 +34,12 @@ jobs:
- name: Push Fidesctl Dev Tag
run: nox -s "push(dev)"

- name: Check Prod Tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ::set-output name=match::true
fi
- name: Push Fidesctl Prod Tags
if: ${{ env.TAG }}
if: steps.check-tag.outputs.match == 'true'
run: nox -s "push(prod)"
22 changes: 18 additions & 4 deletions .github/workflows/publish_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
types: [published]

env:
TAG: ${{ github.event.release.tag_name }}
PROD_PUBLISH: true

jobs:
Expand Down Expand Up @@ -47,13 +46,28 @@ jobs:

# Deploys docs without a version in the URL for legacy links
# This will match the "stable" version of the versioned docs

- name: Check Prod Tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ::set-output name=match::true
fi

- name: Get Version
id: get-version
if: steps.check-tag.outputs.match == 'true'
run: |
version=$(echo ${{ github.event.ref }} | cut -d/ -f3)
echo "::set-output name=version::$version"
SteveDMurphy marked this conversation as resolved.
Show resolved Hide resolved

- name: Deploy the Legacy Docs if a Release is Published
if: ${{ env.TAG }}
if: steps.check-tag.outputs.match == 'true'
run: mkdocs gh-deploy -v -f docs/fides/mkdocs.yml --force

- name: Deploy Stable Docs if a Release is Published
if: ${{ env.TAG }}
run: mike deploy --config-file docs/fides/mkdocs.yml --push --update-aliases ${{ env.TAG }} stable
if: steps.check-tag.outputs.match == 'true'
run: mike deploy --config-file docs/fides/mkdocs.yml --push --update-aliases ${{ steps.get-version.outputs.version }} stable

# This will match "stable" when a new release is cut
- name: Deploy Dev Docs
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ The types of changes are:
* Fixed a build issue causing an `unknown` version of `fidesctl` to be installed in published Docker images [#836](https://github.com/ethyca/fides/pull/836)
* Fixed an M1-related SQLAlchemy bug [#816](https://github.com/ethyca/fides/pull/891)
* Endpoints now work with or without a trailing slash. [#886](https://github.com/ethyca/fides/pull/886)
* Fixed the `tag` specific GitHub Action workflows for Docker and publishing docs. [#901](https://github.com/ethyca/fides/pull/901)

## [1.7.0](https://github.com/ethyca/fides/compare/1.6.1...1.7.0) - 2022-06-23

Expand Down
2 changes: 1 addition & 1 deletion noxfiles/docker_nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ def push(session: nox.Session, tag: str) -> None:
# Only push the tagged version if its for prod
# Example: "ethyca/fidesctl:1.7.0"
if tag == "prod":
session.run("docker", "push", IMAGE, external=True)
session.run("docker", "push", f"{IMAGE}:{get_current_tag()}", external=True)