Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
boulch authored Dec 12, 2024
2 parents 2e5a364 + 1f32076 commit 1d2962e
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 16 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ on:
jobs:
build-push:
environment: staging
runs-on:
group: self-hosted
runs-on: gha-runners-smartweb
if: contains(github.event.head_commit.message, 'Back to development:') == false && contains(github.event.head_commit.message, 'Preparing release') == false
steps:
- name: Build push and notify
Expand All @@ -24,8 +23,7 @@ jobs:
deploy:
environment:
name: staging
runs-on:
group: self-hosted
runs-on: gha-runners-smartweb
needs: build-push
steps:
- name: Deploy to staging and notify
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Promote staging to production
on:
push:
tags:
- '**'
workflow_dispatch:

jobs:
tag:
environment:
name: production
runs-on: gha-runners-smartweb
steps:
- name: Tag and notify
uses: IMIO/gha/tag-notify@v1.0.1
with:
IMAGE_NAME: ${{ vars.IMAGE_NAME }}
IMAGE_TAG: ${{ vars.IMAGE_TAG_STAGING }}
NEW_IMAGE_TAG: ${{ vars.IMAGE_TAG_PRODUCTION }}
REGISTRY_URL: ${{ secrets.HARBOR_URL }}
REGISTRY_USERNAME: ${{ secrets.SMARTWEB_HARBOR_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.SMARTWEB_HARBOR_PASSWORD }}
MATTERMOST_WEBHOOK_URL: ${{ secrets.SMARTWEB_MATTERMOST_WEBHOOK_URL }}
deploy:
environment:
name: production
runs-on: gha-runners-smartweb
needs: [tag]
steps:
- name: Get tomorrow date
run: echo "DEPLOY_DATE=$(date --date='03:00 tomorrow' +'%Y-%m-%dT%H:%M:%S%z')" >> $GITHUB_ENV
- name: Deploy to production and notify
uses: IMIO/gha/rundeck-notify@v3.9.3
with:
RUNDECK_URL: ${{ secrets.RUNDECK_URL }}
RUNDECK_TOKEN: ${{ secrets.SMARTWEB_RUNDECK_TOKEN }}
RUNDECK_JOB_ID: ${{ vars.RUNDECK_JOB_ID }}
RUNDECK_PARAMETERS: '-F "runAtTime=${{ env.DEPLOY_DATE }}" -F "filter=name ${{ vars.NODE_NAME }}" -F "option.tag=${{ vars.IMAGE_TAG_PRODUCTION }}" -F "option.image_name=${{ vars.IMAGE_NAME }}" -F "option.service_name=${{ vars.SERVICE_NAME }}"'
MATTERMOST_WEBHOOK_URL: ${{ secrets.SMARTWEB_MATTERMOST_WEBHOOK_URL }}
37 changes: 37 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish and deploy staging image
on:
push:
branches:
- main
tags:
- '!**'
workflow_dispatch:
jobs:
build-push:
environment: staging
runs-on: gha-runners-smartweb
if: contains(github.event.head_commit.message, 'Back to development:') == false && contains(github.event.head_commit.message, 'Preparing release') == false
steps:
- name: Build push and notify
uses: IMIO/gha/build-push-notify@v1.0.1
with:
IMAGE_NAME: ${{ vars.IMAGE_NAME }}
IMAGE_TAG: ${{ vars.IMAGE_TAG_STAGING }}
REGISTRY_URL: ${{ secrets.HARBOR_URL }}
REGISTRY_USERNAME: ${{ secrets.SMARTWEB_HARBOR_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.SMARTWEB_HARBOR_PASSWORD }}
MATTERMOST_WEBHOOK_URL: ${{ secrets.SMARTWEB_MATTERMOST_WEBHOOK_URL }}
deploy:
environment:
name: staging
runs-on: gha-runners-smartweb
needs: build-push
steps:
- name: Deploy to staging and notify
uses: IMIO/gha/rundeck-notify@v3.9.3
with:
RUNDECK_URL: ${{ secrets.RUNDECK_URL }}
RUNDECK_TOKEN: ${{ secrets.SMARTWEB_RUNDECK_TOKEN }}
RUNDECK_JOB_ID: ${{ vars.RUNDECK_JOB_ID }}
RUNDECK_PARAMETERS: '-F "filter=name ${{ vars.NODE_NAME }}" -F "option.tag=${{ vars.IMAGE_TAG_STAGING }}" -F "option.image_name=${{ vars.IMAGE_NAME }}"'
MATTERMOST_WEBHOOK_URL: ${{ secrets.SMARTWEB_MATTERMOST_WEBHOOK_URL }}
8 changes: 7 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ CHANGELOG
6.0.9-1 (unreleased)
---------------------


- library.core 2.1.2

- BIBLI-73 : Fix js for map
Expand Down Expand Up @@ -37,6 +36,13 @@ CHANGELOG
- Update to Plone 6.0.9
[bsuttor]

- Update collective.plausible to 1.0a3
[remdub]

- library.policy 1.1.17

- WEB-4074 : Install collective.plausible
[remdub]

5.2.3-10 (2023-12-15)
---------------------
Expand Down
10 changes: 0 additions & 10 deletions Jenkinsfile

This file was deleted.

2 changes: 1 addition & 1 deletion base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extends =
versions.cfg

find-links +=
https://eggs.imio.be/find-links/common
https://eggs.imio.be/find-links/common/

versions = versions

Expand Down

0 comments on commit 1d2962e

Please sign in to comment.