https://github.com/dwolla/jenkins-agents-workflow
Reusable workflow for building jenkins agents docker images
https://github.com/dwolla/jenkins-agents-workflow
Last synced: about 2 months ago
JSON representation
Reusable workflow for building jenkins agents docker images
- Host: GitHub
- URL: https://github.com/dwolla/jenkins-agents-workflow
- Owner: Dwolla
- Created: 2022-07-27T18:12:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-10T18:12:25.000Z (over 1 year ago)
- Last Synced: 2025-02-15T23:43:59.467Z (3 months ago)
- Language: Dockerfile
- Size: 18.6 KB
- Stars: 0
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# jenkins-agents-workflow
Reusable workflow for building and pushing jenkins agents docker images.SUPPORTED TAG NAMES:
* NVM_TAG (defaults to core JDK11)
* CORE_TAG (defaults to JDK11)## Common Usage:
Build image with jenkins-agent-nvm default base image:
```yml
jobs:
build:
uses: Dwolla/jenkins-agents-workflow/.github/workflows/build-docker-image.yml@main
with:
IMAGE_NAME: dwolla/jenkins-agent-*
TAG_NAME: NVM_TAG
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
```Build image with jenkins-agent-core default base image for JDK 11:
```yml
jobs:
build:
uses: Dwolla/jenkins-agents-workflow/.github/workflows/build-docker-image.yml@main
with:
IMAGE_NAME: dwolla/jenkins-agent-*
TAG_NAME: CORE_TAG
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
```## Other Usage
Build image with unsupported TAG_NAME as a part of your github workflow's build job:
```yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build and Push Docker Image
uses: Dwolla/jenkins-agents-workflow/.github/actions/build@main
with:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
BASE_TAG:
TAG_NAME:
IMAGE_NAME:
```Build image with jenkins-agent-core specified base image:
```yml
jobs:
build:
uses: Dwolla/jenkins-agents-workflow/.github/workflows/build-docker-image.yml@main
with:
IMAGE_NAME: dwolla/jenkins-agent-*
TAG_NAME: CORE_TAG
CORE_TAG:
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
```Build image with jenkins-agent-nvm specified base image:
```yml
jobs:
build:
uses: Dwolla/jenkins-agents-workflow/.github/workflows/build-docker-image.yml@main
with:
IMAGE_NAME: dwolla/jenkins-agent-*
TAG_NAME: NVM_TAG
NVM_TAG:
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
```## Development & Contribution
To test changes, push to a new branch on jenkins-agents-workflows and modify caller-workflow to point to new branch.
Also, tests run automatically for the currently supported tag names.