Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: migrate to ghcr for hosting #77

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ on:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:

# Run a weekly update to get the latest packages
workflow_dispatch:
schedule:
- cron: 0 9 * * *

permissions:
contents: read
packages: write

jobs:

Expand Down Expand Up @@ -40,26 +41,25 @@ jobs:
id: meta
uses: docker/metadata-action@v3
with:
images: hamletio/hamlet
images: |
ghcr.io/${{github.repository}}
flavor: |
latest=auto
suffix=${{ matrix.suffix }},onlatest=true
tags: |
type=edge,branch=master
type=semver,pattern={{version}}
type=schedule,pattern=nightly
type=schedule,pattern=schedule-{{date 'YYYYMMDD'}}
type=sha

- name: Set up Docker
uses: docker/setup-buildx-action@v1

- name: Login Dockerhub
uses: docker/login-action@v1
- name: Login to GHCR
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
if: ${{ github.event_name == 'scheduled' || startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' }}
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}

- name: Push Release
uses: docker/build-push-action@v2
Expand Down
21 changes: 5 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,29 @@ Ths repo contains the docker image build process for the Hamlet Deploy CI Contai

For more information on hamlet see https://docs.hamlet.io

## Shim engines

The docker container supports a shim style engine that provides a fixed set of directory locations symlinked to the current default engine.
This is used when you are calling the bash executor commands directly instead of using the hamlet cli commands and would like to manage the engine version through the cli.

The standard engine environment variables are set within the docker container to support this as soon as you start the container up.

To support the migration from using the local java installation to a bundled installation there are two shim modes available, the bundled and the local shims.

If you are planning on using a version of hamlet before 8.5.0 make sure to set the shim mode to the local shim. For any versions above 8.5.0 you can leave the mode as the bundled mode.

To configure the mode set the environment variable `HAMLET_ENGINE_SHIM_MODE` to either `local` or `bundled` as part of the containers startup environment variables

## Image Variants

### Base

#### ```hamletio/hamlet:<version>```
#### ```ghcr.io/hamlet-io/docker-hamlet:<version>```

This is our base docker image which includes all the requirements for running hamlet and build tooling. This image can be used as a general purpose CI image
The image also includes common application runtimes for application builds

- python (pyenv for version management)
- node (nodenv for version management)
- java (jenv for version management)
- ruby (rbenv for version management)

### Pipeline Agents

The Pipeline agent images are extensions of the base images with support for running as a pipeline agent

#### ```hamletio/hamlet:<version>-jenkins-<base>```
#### ```ghcr.io/hamlet-io/docker-hamlet:<version>-jenkins```

This image extends the base image with the Jenkins JNLP based remoting agent installed and configured to run as the entrypoint. This is designed to work with container-based cloud agents.

#### ```hamletio/hamlet:<version>-azpipeline-<base>```
#### ```ghcr.io/hamlet-io/docker-hamlet:<version>-azpipeline```

This image extends the base image with the Azure Pipelines agent, this allows for the use of container based agents for local builds

Expand Down
Loading