Skip to content
Open
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
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ARG JAVA_VERSION=8
FROM eclipse-temurin:${JAVA_VERSION}-jdk-jammy

RUN groupadd --gid 1000 vscode \
&& useradd --uid 1000 --gid 1000 --create-home --shell /bin/bash vscode \
&& apt-get update \
&& apt-get install -y --no-install-recommends curl git openssh-client \
&& rm -rf /var/lib/apt/lists/*
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "contentful-management.java",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
"JAVA_VERSION": "${localEnv:JAVA_VERSION:8}"
}
},
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"remoteUser": "vscode",
"postCreateCommand": "./mvnw -B -q -DskipTests dependency:go-offline",
"customizations": {
"vscode": {
"extensions": [
"redhat.java"
]
}
}
}
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
test:
name: Test (Java 8)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Install devcontainer CLI
run: npm install -g @devcontainers/cli@0

- name: Run tests in dev container
env:
JAVA_VERSION: "8"
run: |
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . bash -lc "./mvnw -B test"
32 changes: 0 additions & 32 deletions .github/workflows/codeql.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributing

Thanks for helping improve `contentful-management.java`.

## Development with Dev Containers

This repository includes a `.devcontainer` configuration for a reproducible local setup. GitHub Actions uses the same devcontainer configuration for CI.

### Visual Studio Code

Open the repository in Visual Studio Code, install the Dev Containers extension if needed, then run `Dev Containers: Reopen in Container`. Wait for the container build and post-create setup to finish.

### Terminal or other editors

Install Docker and the Dev Container CLI (`npm install -g @devcontainers/cli`). From the repository root, run:

```bash
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . bash
```

### Verify the environment

```bash
./mvnw -B test
```

## Pull Requests

1. Fork the repository and create a branch for your change.
2. Run the relevant checks from the dev container.
3. Open a pull request with a short summary of the change and any follow-up context.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
contentful-management.java - Contentful Java Management SDK
===========================================================

[![Build Status](https://travis-ci.org/contentful/contentful-management.java.svg)](https://travis-ci.org/contentful/contentful-management.java/builds#)
[![CI](https://github.com/contentful/contentful-management.java/actions/workflows/ci.yml/badge.svg)](https://github.com/contentful/contentful-management.java/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/contentful/contentful-management.java/branch/master/graph/badge.svg)](https://codecov.io/gh/contentful/contentful-management.java)

> Java SDK for [Content Management API](https://www.contentful.com/developers/docs/references/content-management-api/). It helps in editing and creating content stored in Contentful with Java applications.
Expand Down Expand Up @@ -315,6 +315,16 @@ Getting involved

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?maxAge=31557600)](http://makeapullrequest.com)

For a reproducible local setup, open this repository in its included dev container. The container installs the project dependencies automatically when it is created.

After the container is ready, run:

```bash
./mvnw -B test
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contributor workflow.

Code of Conduct
===============

Expand Down
Loading