Skip to content

Commit

Permalink
Finalyse upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Dec 23, 2020
1 parent be91168 commit 4db07fa
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 15 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}}

- run: sudo python3 -m pip install --requirement=ci/requirements.txt
- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Checks
run: c2cciutils-checks
Expand All @@ -36,15 +37,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- run: touch env.secrets
- run: sed -i '/^DOCKER_TAG=/d' env.project
- name: Build config
run: ./build --config

- uses: camptocamp/initialise-gopass-summon-action@v2
with:
ci-gpg-private-key: ${{ secrets.CI_GPG_PRIVATE_KEY }}
github-gopass-ci-token: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}
patterns: docker

- run: touch env.secrets
- name: Build config
run: ./build --config
- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Publish
run: c2cciutils-publish --group=config
Expand All @@ -68,6 +73,9 @@ jobs:
# github-gopass-ci-token: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}
# patterns: docker
#
# - run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
# - run: python3 -m pip install --user --requirement=ci/requirements.txt
#
# - name: Publish
# run: c2cciutils-publish --group=geoportal
# - run: ci/trigger --image=geoportal
6 changes: 3 additions & 3 deletions .github/workflows/upgrade-25.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ jobs:
run: |
ls -als .UPGRADE*
git add --all || true
git add --force .UPGRADE_INSTRUCTIONS || true
git add --force .UPGRADE_INSTRUCTIONS upgrade || true
git status
git commit -m "Interrupted upgrade to ${{ github.event.client_payload.version }}"
git push --force origin HEAD:interrupted-upgrade-25
git push --force origin HEAD:interrupted-upgrade-${{ github.event.client_payload.version }}
python3 -c 'import requests
responce = requests.post(
"https://api.github.com/repos/camptocamp/demo_geomapfish/pulls",
json={
"title": "Upgrade failed",
"body": "See https://github.com/camptocamp/demo_geomapfish/actions?query=workflow%3A%22Upgrade+2.5%22",
"head": "interrupted-upgrade-25",
"head": "interrupted-upgrade-${{ github.event.client_payload.version }}",
"base": "prod-2-5",
"maintainer_can_modify": True
},
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upgrade-26.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ jobs:
run: |
ls -als .UPGRADE*
git add --all || true
git add --force .UPGRADE_INSTRUCTIONS || true
git add --force .UPGRADE_INSTRUCTIONS upgrade || true
git status
git commit -m "Interrupted upgrade to ${{ github.event.client_payload.version }}"
git push --force origin HEAD:interrupted-upgrade-${{ matrix.branch }}
git push --force origin HEAD:interrupted-upgrade-${{ matrix.branch }}-${{ github.event.client_payload.version }}
python3 -c 'import requests
responce = requests.post(
"https://api.github.com/repos/camptocamp/demo_geomapfish/pulls",
json={
"title": "Upgrade failed",
"body": "See https://github.com/camptocamp/demo_geomapfish/actions?query=workflow%3A%22Upgrade+2.6%22",
"head": "interrupted-upgrade-${{ matrix.branch }}",
"head": "interrupted-upgrade-${{ matrix.branch }}-${{ github.event.client_payload.version }}",
"base": "${{ matrix.branch }}",
"maintainer_can_modify": True
},
Expand Down
13 changes: 10 additions & 3 deletions CONST_create_template/.github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}}

- run: sudo python3 -m pip install --requirement=ci/requirements.txt
- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Checks
run: c2cciutils-checks
Expand All @@ -37,14 +38,17 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build config
run: ./build --config

- uses: camptocamp/initialise-gopass-summon-action@v2
with:
ci-gpg-private-key: ${{ secrets.CI_GPG_PRIVATE_KEY }}
github-gopass-ci-token: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}
patterns: docker

- name: Build config
run: ./build --config
- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Publish
run: c2cciutils-publish --group=config
Expand All @@ -69,6 +73,9 @@ jobs:
github-gopass-ci-token: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}
patterns: docker

- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Publish
run: c2cciutils-publish --group=geoportal
- run: ci/trigger --image=geoportal
4 changes: 2 additions & 2 deletions ci/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ publish:
docker:
images:
- group: geoportal
name: camptocamp/{{package}}-geoportal
name: camptocamp/demo-geoportal
- group: config
name: camptocamp/{{package}}-config
name: camptocamp/demo-config
Empty file modified ci/trigger
100644 → 100755
Empty file.

0 comments on commit 4db07fa

Please sign in to comment.