Skip to content

Commit

Permalink
updated jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
eeganlf committed Aug 12, 2024
2 parents 40f45ce + a0a2718 commit 8ef2218
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test Docker Compose Setup

on:
push:
branches: [ master ]
branches: [ dev ]
pull_request:
branches: [ master ]
branches: [ dev ]
schedule:
- cron: '0 0 * * 0' # Run weekly on Sundays at midnight UTC

Expand All @@ -16,17 +16,24 @@ jobs:
- uses: actions/checkout@v3

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

- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Start Docker Compose services
- name: Build and start Docker Compose services
working-directory: ./setup
run: |
docker-compose build --progress=plain --no-cache
docker-compose up -d
- name: Display Docker build logs
if: failure()
working-directory: ./setup
run: docker compose up -d

Expand Down
4 changes: 3 additions & 1 deletion setup/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jenkins/jenkins:2.440.2-jdk11
FROM jenkins/jenkins:2.452.3-lts-jdk21
USER root
RUN apt-get update && apt-get install -y apt-transport-https \
ca-certificates curl gnupg2 \
Expand All @@ -14,3 +14,5 @@ RUN curl -L "https://github.com/docker/compose/releases/download/`curl -fsSLI -o
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
USER jenkins
RUN jenkins-plugin-cli --plugins blueocean
# json-path-api plugin https://plugins.jenkins.io/json-path-api/releases/
RUN jenkins-plugin-cli --plugins json-path-api:2.9.0-58.v62e3e85b_a_655
2 changes: 1 addition & 1 deletion setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ volumes:

services:
jenkins:
image: jenkins/jenkins:2.440.2-jdk11
image: jenkins/jenkins:2.452.3-lts-jdk21
build:
context: .
dockerfile: Dockerfile
Expand Down

0 comments on commit 8ef2218

Please sign in to comment.