From c2391ba284db39d1e8f6082e0f1f42e02d7b24a2 Mon Sep 17 00:00:00 2001 From: Aaron Brethorst Date: Wed, 27 Nov 2024 21:34:06 -0800 Subject: [PATCH] Switch from GitHub's Maven repo to Maven Central for required artifacts Eliminate all use of personal access tokens (hooray) --- .github/workflows/docker.yaml | 6 ------ .github/workflows/test.yaml | 10 ---------- README.md | 6 ------ bundler/Dockerfile | 3 --- bundler/settings.xml | 15 --------------- docker-compose.prod.yml | 6 ------ docker-compose.standalone.yml | 3 --- docker-compose.yml | 6 ------ oba/Dockerfile | 3 --- oba/config/settings.xml | 15 --------------- 10 files changed, 73 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 7cf2ace..7bd2e6a 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -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' }} @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b0f9196..8f2fd37 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,8 +22,6 @@ 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 @@ -31,8 +29,6 @@ jobs: 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: @@ -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 @@ -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 diff --git a/README.md b/README.md index eb341b4..7292e14 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/bundler/Dockerfile b/bundler/Dockerfile index 4452059..c2a2b79 100644 --- a/bundler/Dockerfile +++ b/bundler/Dockerfile @@ -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 diff --git a/bundler/settings.xml b/bundler/settings.xml index a652cca..f4ac4d9 100644 --- a/bundler/settings.xml +++ b/bundler/settings.xml @@ -15,22 +15,7 @@ central https://repo1.maven.org/maven2 - - github - https://maven.pkg.github.com/onebusaway/onebusaway-application-modules - - true - - - - - - github - ${PAT_USERNAME_FOR_GH} - ${PAT_TOKEN_FOR_GH} - - \ No newline at end of file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index e0748dd..5203326 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -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: @@ -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 diff --git a/docker-compose.standalone.yml b/docker-compose.standalone.yml index ceee018..4fd966f 100644 --- a/docker-compose.standalone.yml +++ b/docker-compose.standalone.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 43c7091..778203c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: @@ -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 diff --git a/oba/Dockerfile b/oba/Dockerfile index 2475dfd..ba378af 100644 --- a/oba/Dockerfile +++ b/oba/Dockerfile @@ -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 diff --git a/oba/config/settings.xml b/oba/config/settings.xml index a652cca..f4ac4d9 100644 --- a/oba/config/settings.xml +++ b/oba/config/settings.xml @@ -15,22 +15,7 @@ central https://repo1.maven.org/maven2 - - github - https://maven.pkg.github.com/onebusaway/onebusaway-application-modules - - true - - - - - - github - ${PAT_USERNAME_FOR_GH} - ${PAT_TOKEN_FOR_GH} - - \ No newline at end of file