Skip to content

Commit

Permalink
fix(workflows): Use dedicated preprod tagged image on related deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-van-woerkens committed Nov 16, 2021
1 parent 64c71f5 commit b50cb62
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 23 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Protect workflow files
.github/workflows/*.yml @socialgouv/sre
.github/CODEOWNERS @socialgouv/sre
.socialgouv/ @socialgouv/sre
2 changes: 0 additions & 2 deletions .github/dev.env

This file was deleted.

2 changes: 0 additions & 2 deletions .github/preprod.env

This file was deleted.

1 change: 0 additions & 1 deletion .github/prod.env

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- name: Use autodevops build and register
uses: SocialGouv/actions/autodevops-build-register@master
with:
environment: preprod
project: ${{ env.project }}
token: ${{ secrets.GITHUB_TOKEN }}
imageName: nos1000jours/les1000jours-landing
Expand All @@ -52,15 +53,14 @@ jobs:
needs: [register, manifests]
environment:
name: preproduction
url: https://${{ env.ns }}.${{ env.SOCIALGOUV_BASE_DOMAIN }}
url: https://nos1000jours-landing-preprod.dev.fabrique.social.gouv.fr/
steps:

- name: Checkout repository
uses: actions/checkout@v2

- name: Get project and namespace names
run: |
cat ".github/preprod.env" >> $GITHUB_ENV
echo "project=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
echo "ns=${GITHUB_REPOSITORY#*/}-${GITHUB_REF##*/}" >> $GITHUB_ENV
Expand Down Expand Up @@ -94,15 +94,14 @@ jobs:
needs: [deploy-preprod, manifests-prod]
environment:
name: production
url: https://${{ env.ns }}.${{ env.SOCIALGOUV_BASE_DOMAIN }}
url: https://nos1000jours-landing.fabrique.social.gouv.fr/
steps:

- name: Checkout repository
uses: actions/checkout@v2

- name: Get project and namespace names
run: |
cat ".github/prod.env" >> $GITHUB_ENV
echo "project=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
echo "ns=${GITHUB_REPOSITORY#*/}-${GITHUB_REF##*/}" >> $GITHUB_ENV
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@v2
- uses: SocialGouv/actions/autodevops-release@v1
with:
fetch-depth: 0
persist-credentials: false

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17
extra_plugins: |
@semantic-release/changelog@5.0.1
@semantic-release/git@9.0.0
env:
GITHUB_TOKEN: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }}
author-name: ${{ secrets.SOCIALGROOVYBOT_NAME }}
author-email: ${{ secrets.SOCIALGROOVYBOT_EMAIL }}
github-token: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }}

0 comments on commit b50cb62

Please sign in to comment.