Skip to content

Commit

Permalink
Switch from GitHub's Maven repo to Maven Central for required artifacts
Browse files Browse the repository at this point in the history
Eliminate all use of personal access tokens (hooray)
  • Loading branch information
aaronbrethorst committed Nov 28, 2024
1 parent b5d0471 commit c2391ba
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 73 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ jobs:
tags: |
ghcr.io/onebusaway/${{ matrix.name }}:latest
ghcr.io/onebusaway/${{ matrix.name }}:${{ github.sha }}
build-args: |
PAT_USERNAME_FOR_GH=${{ secrets.PAT_USERNAME_FOR_GH }}
PAT_TOKEN_FOR_GH=${{ secrets.PAT_TOKEN_FOR_GH }}
buildx-release:
if: ${{ github.event_name == 'release' }}
Expand Down Expand Up @@ -101,6 +98,3 @@ jobs:
push: true
tags: |
opentransitsoftwarefoundation/${{ matrix.name }}:${{ env.IMAGE_TAG }}
build-args: |
PAT_USERNAME_FOR_GH=${{ secrets.PAT_USERNAME_FOR_GH }}
PAT_TOKEN_FOR_GH=${{ secrets.PAT_TOKEN_FOR_GH }}
10 changes: 0 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,13 @@ jobs:
docker buildx build \
--load \
-t bundler-image:latest \
--build-arg PAT_USERNAME_FOR_GH=${{ secrets.PAT_USERNAME_FOR_GH }} \
--build-arg PAT_TOKEN_FOR_GH=${{ secrets.PAT_TOKEN_FOR_GH }} \
./bundler
- name: Build oba image
run: |
docker buildx build \
--load \
-t oba-image:latest \
--build-arg PAT_USERNAME_FOR_GH=${{ secrets.PAT_USERNAME_FOR_GH }} \
--build-arg PAT_TOKEN_FOR_GH=${{ secrets.PAT_TOKEN_FOR_GH }} \
./oba
services:
Expand All @@ -44,14 +40,10 @@ jobs:

- name: Build bundle
run: |
PAT_USERNAME_FOR_GH=${{ secrets.PAT_USERNAME_FOR_GH }} \
PAT_TOKEN_FOR_GH=${{ secrets.PAT_TOKEN_FOR_GH }} \
docker compose up oba_bundler
- name: Docker Compose up
run: |
PAT_USERNAME_FOR_GH=${{ secrets.PAT_USERNAME_FOR_GH }} \
PAT_TOKEN_FOR_GH=${{ secrets.PAT_TOKEN_FOR_GH }} \
docker compose up -d
- name: Wait for services to be up
Expand Down Expand Up @@ -79,8 +71,6 @@ jobs:

- name: Docker Compose up
run: |
PAT_USERNAME_FOR_GH=${{ secrets.PAT_USERNAME_FOR_GH }} \
PAT_TOKEN_FOR_GH=${{ secrets.PAT_TOKEN_FOR_GH }} \
docker compose -f docker-compose.standalone.yml up -d
- name: Wait for services to be up
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,15 @@ To build bundles and run the webapp server with your own GTFS feed, use the [Doc
The app server and bundle builder use Maven artifacts from GitHub's Maven package registry, which unfortunately requires authentication. This is provided in the form of a pair of environment variables that must be supplied when building the app server image:

```bash
PAT_USERNAME_FOR_GH=GITHUB_USERNAME \
PAT_TOKEN_FOR_GH=GITHUB_PERSONAL_ACCESS_TOKEN \
docker compose build oba_app
```

You can get a classic PAT here: https://github.com/settings/tokens.

### Building bundles

To build a bundle, use the `oba_bundler` service:

```bash
GTFS_URL=https://www.soundtransit.org/GTFS-rail/40_gtfs.zip \
PAT_USERNAME_FOR_GH=GITHUB_USERNAME \
PAT_TOKEN_FOR_GH=GITHUB_PERSONAL_ACCESS_TOKEN \
docker compose up oba_bundler
```

Expand Down
3 changes: 0 additions & 3 deletions bundler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ FROM tomcat:8.5.100-jdk11-temurin AS builder
ARG OBA_VERSION=2.5.13-otsf
ENV OBA_VERSION=${OBA_VERSION}

ARG PAT_USERNAME_FOR_GH
ARG PAT_TOKEN_FOR_GH

RUN apt-get update && apt-get install -y maven

# Start configuring OBA
Expand Down
15 changes: 0 additions & 15 deletions bundler/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,7 @@
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/onebusaway/onebusaway-application-modules</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>${PAT_USERNAME_FOR_GH}</username>
<password>${PAT_TOKEN_FOR_GH}</password>
</server>
</servers>
</settings>
6 changes: 0 additions & 6 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ services:
oba_bundler:
build:
context: ./bundler
args:
- PAT_USERNAME_FOR_GH=${PAT_USERNAME_FOR_GH}
- PAT_TOKEN_FOR_GH=${PAT_TOKEN_FOR_GH}
volumes:
- ./bundle:/bundle
environment:
Expand Down Expand Up @@ -35,9 +32,6 @@ services:
- oba_database
build:
context: ./oba
args:
- PAT_USERNAME_FOR_GH=${PAT_USERNAME_FOR_GH}
- PAT_TOKEN_FOR_GH=${PAT_TOKEN_FOR_GH}
environment:
- JDBC_URL=jdbc:mysql://oba_database:3306/oba_database
- JDBC_DRIVER=com.mysql.cj.jdbc.Driver
Expand Down
3 changes: 0 additions & 3 deletions docker-compose.standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ services:
- oba_database
build:
context: ./oba
args:
- PAT_USERNAME_FOR_GH=${PAT_USERNAME_FOR_GH}
- PAT_TOKEN_FOR_GH=${PAT_TOKEN_FOR_GH}
environment:
- JDBC_URL=jdbc:mysql://oba_database:3306/oba_database
- JDBC_DRIVER=com.mysql.cj.jdbc.Driver
Expand Down
6 changes: 0 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ services:
oba_bundler:
build:
context: ./bundler
args:
- PAT_USERNAME_FOR_GH=${PAT_USERNAME_FOR_GH}
- PAT_TOKEN_FOR_GH=${PAT_TOKEN_FOR_GH}
volumes:
- ./bundle:/bundle
environment:
Expand Down Expand Up @@ -48,9 +45,6 @@ services:
# - oba_database_pg
build:
context: ./oba
args:
- PAT_USERNAME_FOR_GH=${PAT_USERNAME_FOR_GH}
- PAT_TOKEN_FOR_GH=${PAT_TOKEN_FOR_GH}
environment:
- JDBC_URL=jdbc:mysql://oba_database:3306/oba_database
- JDBC_DRIVER=com.mysql.cj.jdbc.Driver
Expand Down
3 changes: 0 additions & 3 deletions oba/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ ENV MYSQL_CONNECTOR_VERSION=${MYSQL_CONNECTOR_VERSION}
ARG POSTGRESQL_CONNECTOR_VERSION=42.7.4
ENV POSTGRESQL_CONNECTOR_VERSION=${POSTGRESQL_CONNECTOR_VERSION}

ARG PAT_USERNAME_FOR_GH
ARG PAT_TOKEN_FOR_GH

RUN apt-get update && \
apt-get install -y maven golang

Expand Down
15 changes: 0 additions & 15 deletions oba/config/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,7 @@
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/onebusaway/onebusaway-application-modules</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>${PAT_USERNAME_FOR_GH}</username>
<password>${PAT_TOKEN_FOR_GH}</password>
</server>
</servers>
</settings>

0 comments on commit c2391ba

Please sign in to comment.