Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COMPOSE_PROFILES=full,dev
#MQTT_PORT=11883


DOCKER_IMAGE_PREFIX=localhost/
DOCKER_IMAGE_PREFIX=ghcr.io/nasa-ammos/anms/
DOCKER_IMAGE_TAG=latest

ANMS_VERSION=0
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/publish_images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# On merge to main publish with the 'latest' label
# Publish with release label when a releaes is published.
name: Build and publish containers
on:
push:
branches:
- main
# For testing: delete this prior to merging PR
- feature/177-ghcr_container_publishing
release:
types: [published]

env:
REGISTRY: ghcr.io

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set prefix
run: |
echo "DOCKER_IMAGE_PREFIX=${REGISTRY}/${REPO,,}/" >>${GITHUB_ENV}
env:
REPO: '${{ github.repository }}'
- name: Set image tag
id: vars
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
echo "DOCKER_IMAGE_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
else
echo "DOCKER_IMAGE_TAG=latest" >> $GITHUB_ENV
fi

- name: Build and push base images via compose
run: |
docker compose build --push
- name: Build and push testenv images via compose
run: |
docker compose -f testenv-compose.yml build --push
2 changes: 1 addition & 1 deletion .github/workflows/puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
bundler-cache: true

- name: Install puppet-lint
run: gem install puppet-lint
run: gem install puppet-lint -v 4.3.0

- name: Run puppet-lint
run: puppet-lint puppet --sarif --ignore-paths 'puppet/modules/anms/files/*' > puppet-lint-results.sarif
Expand Down
4 changes: 2 additions & 2 deletions anms-core/anms/routes/ARIs/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async def report_def_by_id(agent_id: int):
final_res.append(addition)
except Exception as e:
logger.error(f"Error {e}, while processing nonce:{nonce_cbor} for agent: {agent_id_str}")

return final_res


Expand Down Expand Up @@ -215,4 +215,4 @@ async def report_ac(agent_id: int, nonce_cbor: str):
logger.error(err)

return list(exec_set_dir.values())


11 changes: 9 additions & 2 deletions quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
# is not specified the #AUTHNZ_* lines in .env will be uncommented to
# use ports that do not require root permissions.
#
# FORCE_BUILD=y If 'y', all ANMS-specific containers will be built locally.
Comment thread
DavidEdell marked this conversation as resolved.
# Otherwise, prebuilt containers will be pulled from ghcr for quicker startup.
#
# Note: This script was created with assistance from openai/gpt-oss-120b
set -e

Expand Down Expand Up @@ -81,8 +84,12 @@ cp docker-compose.no-security-override.yml docker-compose.override.yml
./create_volume.sh ./puppet/modules/apl_test/files/anms/tls

# Build system
${DOCKER_CMD} compose build

if [[ ${FORCE_BUILD:-} == y ]]; then
${DOCKER_CMD} compose --profile full --profile dev build
else
${DOCKER_CMD} compose --profile full --profile dev pull
fi

# Start testenv (unless disabled)
if [[ ${USE_TESTENV:-} != n ]]; then
${DOCKER_CMD} compose -f testenv-compose.yml up -d
Expand Down
1 change: 1 addition & 0 deletions testenv.Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ RUN dnf -y install container-tools
# Container service config
RUN systemctl disable dnf-makecache.timer

COPY --chmod=755 deps/dtnma-tools/systemd/service_is_running.sh /usr/local/bin/service_is_running

# Image for the test environment manager transport with ION node and the
# ion-app-proxy daemon
Expand Down
Loading