Skip to content

Commit 2d35d03

Browse files
optionsomeVillePihlava
authored andcommitted
Configure Digitransit CI actions
1 parent 07efa95 commit 2d35d03

11 files changed

Lines changed: 95 additions & 288 deletions

.github/CODEOWNERS

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/roadmap_epic.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/pull_request_template.md

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/dev-pipeline.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Process push
2+
on:
3+
push:
4+
branches:
5+
- v2
6+
- custom-release
7+
jobs:
8+
container-image:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
- name: Set up JDK 21
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: 21
18+
distribution: temurin
19+
cache: maven
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 18
23+
- name: Build container image with Jib, push to Dockerhub
24+
env:
25+
CONTAINER_REPO: docker.io/hsldevcom/opentripplanner:${{ github.ref_name }}
26+
CONTAINER_REGISTRY_USER: ${{ secrets.DOCKER_USER }}
27+
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_AUTH }}
28+
run: |
29+
otp_version=${{ github.ref_name }}
30+
commit_hash=`git rev-parse --short "$GITHUB_SHA"`
31+
date_time=`date +"%Y-%m-%dT%H-%M-%S"`
32+
docker_tag_long="$otp_version-$date_time-$commit_hash"
33+
34+
mvn --batch-mode -P prettierSkip install com.google.cloud.tools:jib-maven-plugin:build -Djib.to.tags=$docker_tag_long

.github/workflows/integration-test.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/post-merge.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build v2-prod from release
2+
on:
3+
release:
4+
types:
5+
- published
6+
jobs:
7+
v2-release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Set time zone to Europe/Helsinki
13+
uses: zcong1993/setup-timezone@master
14+
with:
15+
timezone: "Europe/Helsinki"
16+
- name: Check Tag
17+
id: check-tag
18+
run: |
19+
if [[ ${GITHUB_REF##*/} =~ ^202[0-9][0-1][0-9][0-3][0-9] ]]; then
20+
echo "match=true" >> $GITHUB_OUTPUT
21+
else
22+
echo invalid release tag
23+
exit 1
24+
fi
25+
- name: Push latest image as v2-prod
26+
if: steps.check-tag.outputs.match == 'true'
27+
run: ./.github/workflows/scripts/push_prod.sh
28+
env:
29+
DOCKER_USER: ${{ secrets.DOCKER_USER }}
30+
DOCKER_AUTH: ${{ secrets.DOCKER_AUTH }}
31+
DOCKER_BASE_TAG: v2-prod
32+
DOCKER_DEV_TAG: ${{ github.event.release.target_commitish }}

.github/workflows/prune-container-images.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)