Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	pyproject.toml
  • Loading branch information
frankinspace committed Jul 2, 2024
2 parents 0b182fc + bc9f545 commit 106cf32
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 8 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,19 +217,21 @@ jobs:
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a "${{ env.software_version }}" -m "Version ${{ env.software_version }}"
git push origin "${{ env.software_version }}"
TAG_NAME="v${{ env.software_version }}"
echo "tag_name=$TAG_NAME" >> $GITHUB_ENV
git tag -a "$TAG_NAME" -m "Version $TAG_NAME"
git push origin "$TAG_NAME"
- name: Create GH release
if: |
steps.alpha.conclusion == 'success' ||
steps.rc.conclusion == 'success' ||
steps.release.conclusion == 'success'
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
name: ${{ env.software_version }}
generateReleaseNotes: ${{ steps.release.conclusion == 'success' }}
name: ${{ env.tag_name }}
prerelease: ${{ steps.alpha.conclusion == 'success' || steps.rc.conclusion == 'success'}}
tag: ${{ env.software_version }}
tag: ${{ env.tag_name }}

docker:
name: Build & Publish Docker Image
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-on-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ set -exo pipefail
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# # Make sure to add the public key of the CI machine to the authorized keys of the api machine
ssh -i ${API_MACHINE_KEYPATH} "${API_MACHINE}" "docker-compose -f docker-compose-maap-api.yml down"
ssh -i ${API_MACHINE_KEYPATH} "${API_MACHINE}" "docker compose -f docker-compose-maap-api.yml down"
# Copy new file after compose down on api machine
cat "${GITHUB_WORKSPACE}"/docker/docker-compose-maap-api.yml.tmpl | envsubst >> "${SCRIPT_DIR}/"docker-compose-maap-api.yml
scp -i ${API_MACHINE_KEYPATH} -v "${SCRIPT_DIR}/"docker-compose-maap-api.yml "${API_MACHINE}":~/
scp -i ${API_MACHINE_KEYPATH} -v "${SCRIPT_DIR}/".maap-api.env "${API_MACHINE}":~/.maap-api.env

ssh -i ${API_MACHINE_KEYPATH} "${API_MACHINE}" "docker-compose -f docker-compose-maap-api.yml pull"
ssh -i ${API_MACHINE_KEYPATH} "${API_MACHINE}" "docker-compose -f docker-compose-maap-api.yml up -d"
ssh -i ${API_MACHINE_KEYPATH} "${API_MACHINE}" "docker compose -f docker-compose-maap-api.yml pull"
ssh -i ${API_MACHINE_KEYPATH} "${API_MACHINE}" "docker compose -f docker-compose-maap-api.yml up -d"
45 changes: 45 additions & 0 deletions .github/workflows/release-branch-created.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

name: Release Branch Created

# Run whenever a ref is created https://docs.github.com/en/actions/reference/events-that-trigger-workflows#create
on:
create

jobs:
# First job in the workflow builds and verifies the software artifacts
bump:
name: Bump minor version on develop
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Only run if ref created was a release branch
if:
${{ startsWith(github.ref, 'refs/heads/release/') }}
steps:
- uses: getsentry/action-github-app-token@v3
name: maap cicd token
id: maap-cicd
with:
app_id: ${{ secrets.CICD_APP }}
private_key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
token: ${{ steps.maap-cicd.outputs.token }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8.2
- name: Bump minor version
run: |
poetry version ${GITHUB_REF#refs/heads/release/}
poetry version preminor
echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
- name: Commit Version Bump
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git commit -am "/version ${{ env.software_version }}"
git push
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [v4.0.0] - 2024-06-26
- [issues/111](https://github.com/MAAP-Project/maap-api-nasa/issues/111) - Implement github actions CICD and convert to poetry based build
- [pull/110](https://github.com/MAAP-Project/maap-api-nasa/pull/110) - Remove postgres from docker-compose
- [issues/112](https://github.com/MAAP-Project/maap-api-nasa/issues/112) - Update settings.py to load settings from OS Environment
- [pull/116](https://github.com/MAAP-Project/maap-api-nasa/pull/116) & [issues/909](https://github.com/MAAP-Project/Community/issues/909) - Add /config endpoint that can be used to configure maap-py
- [pull/122](https://github.com/MAAP-Project/maap-api-nasa/pull/122) - Bump lightweight jobs from v0.0.5 to v1.2.2


[unreleased]: https://github.com/MAAP-Project/maap-api-nasa/v4.0.0...HEAD
[v4.0.0]: https://github.com/MAAP-Project/maap-api-nasa/compare/v3.1.5...v4.0.0

0 comments on commit 106cf32

Please sign in to comment.