-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
123 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,82 @@ | ||
name: Build Navitia Dockers | ||
# name: Build Navitia Dockers | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- dev | ||
tags: | ||
- '*' | ||
# on: | ||
# pull_request: | ||
# push: | ||
# branches: | ||
# - dev | ||
# tags: | ||
# - '*' | ||
|
||
jobs: | ||
common_variables: | ||
name: Common variables | ||
runs-on: [self-hosted, kraken, sandbox] | ||
outputs: | ||
RELEASE_TAG: ${{ steps.choose_navitia_tag.outputs.navitia_tag }} | ||
steps: | ||
- name: force chown to avoid errors | ||
run: sudo chown -R $USER:$USER . | ||
# jobs: | ||
# common_variables: | ||
# name: Common variables | ||
# runs-on: [self-hosted, kraken, sandbox] | ||
# outputs: | ||
# RELEASE_TAG: ${{ steps.choose_navitia_tag.outputs.navitia_tag }} | ||
# steps: | ||
# - name: force chown to avoid errors | ||
# run: sudo chown -R $USER:$USER . | ||
|
||
- name: Generate github private access token | ||
id: ci-core-app-token | ||
uses: getsentry/[email protected] | ||
with: | ||
app_id: ${{ secrets.CI_CORE_APP_ID }} | ||
private_key: ${{ secrets.CI_CORE_APP_PEM }} | ||
# - name: Generate github private access token | ||
# id: ci-core-app-token | ||
# uses: getsentry/[email protected] | ||
# with: | ||
# app_id: ${{ secrets.CI_CORE_APP_ID }} | ||
# private_key: ${{ secrets.CI_CORE_APP_PEM }} | ||
|
||
- name: Checkout navitia | ||
id: checkout_navitia | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ steps.ci-core-app-token.outputs.token }} | ||
# we need entire history for tags | ||
fetch-depth: 0 | ||
# - name: Checkout navitia | ||
# id: checkout_navitia | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# token: ${{ steps.ci-core-app-token.outputs.token }} | ||
# # we need entire history for tags | ||
# fetch-depth: 0 | ||
|
||
- name: Choose navitia tag | ||
id: choose_navitia_tag | ||
run: | | ||
version=$(git describe --tags) | ||
echo "navitia_tag=$version" >> $GITHUB_OUTPUT | ||
# - name: Choose navitia tag | ||
# id: choose_navitia_tag | ||
# run: | | ||
# version=$(git describe --tags) | ||
# echo "navitia_tag=$version" >> $GITHUB_OUTPUT | ||
|
||
debian11_kraken_image: | ||
runs-on: [self-hosted, kraken, sandbox] | ||
name: Build debian11 kraken image | ||
needs: common_variables | ||
steps: | ||
- name: force chown to avoid errors | ||
run: sudo chown -R $USER:$USER . | ||
# debian11_kraken_image: | ||
# runs-on: [self-hosted, kraken, sandbox] | ||
# name: Build debian11 kraken image | ||
# needs: common_variables | ||
# steps: | ||
# - name: force chown to avoid errors | ||
# run: sudo chown -R $USER:$USER . | ||
|
||
- name: Git config | ||
run: git config --global --add safe.directory /__w/navitia/navitia | ||
# - name: Git config | ||
# run: git config --global --add safe.directory /__w/navitia/navitia | ||
|
||
- name: Generate github private access token | ||
id: ci-core-app-token | ||
uses: getsentry/[email protected] | ||
with: | ||
app_id: ${{ secrets.CI_CORE_APP_ID }} | ||
private_key: ${{ secrets.CI_CORE_APP_PEM }} | ||
# - name: Generate github private access token | ||
# id: ci-core-app-token | ||
# uses: getsentry/[email protected] | ||
# with: | ||
# app_id: ${{ secrets.CI_CORE_APP_ID }} | ||
# private_key: ${{ secrets.CI_CORE_APP_PEM }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
token: ${{ steps.ci-core-app-token.outputs.token }} | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# submodules: recursive | ||
# token: ${{ steps.ci-core-app-token.outputs.token }} | ||
|
||
- name: Login to Amazon ECR | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
env: | ||
AWS_REGION: eu-west-1 | ||
with: | ||
registries: "162230498103" | ||
# - name: Login to Amazon ECR | ||
# uses: aws-actions/amazon-ecr-login@v1 | ||
# env: | ||
# AWS_REGION: eu-west-1 | ||
# with: | ||
# registries: "162230498103" | ||
|
||
- name: Create builder docker | ||
run: | | ||
docker build -f docker/debian11/Dockerfile-builder-kraken -t navitia/builder . | ||
# - name: Create builder docker | ||
# run: | | ||
# docker build -f docker/debian11/Dockerfile-builder-kraken -t navitia/builder . | ||
|
||
- name: Build Kraken | ||
run: docker run -v `pwd`:/navitia/navitia/ navitia/builder | ||
# - name: Build Kraken | ||
# run: docker run -v `pwd`:/navitia/navitia/ navitia/builder | ||
|
||
- name: Create Kraken image | ||
run: | | ||
docker build -t navitia/kraken -f docker/debian11/Dockerfile-kraken . | ||
# - name: Create Kraken image | ||
# run: | | ||
# docker build -t navitia/kraken -f docker/debian11/Dockerfile-kraken . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Build Navitia Dockers | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- dev | ||
|
@@ -12,8 +13,8 @@ env: | |
backend_components: 'kraken tyr-beat tyr-worker mock-kraken eitri' | ||
backend_core_components: 'jormungandr kraken tyr-beat tyr-worker' | ||
|
||
SBX_ECR_REGISTRY_BACKEND: "110444322584.dkr.ecr.eu-west-1.amazonaws.com" | ||
SBX_ECR_REGISTRY_FRONT: "051314639660.dkr.ecr.eu-west-1.amazonaws.com" | ||
SBX_ECR_REGISTRY_BACKEND: "110444322584.dkr.ecr.eu-west-1.amazonaws.com" # navitia-kraken-sandbox | ||
SBX_ECR_REGISTRY_FRONT: "051314639660.dkr.ecr.eu-west-1.amazonaws.com" # navitia-corefront-sandbox | ||
PRD_ECR_REGISTRY: "162230498103.dkr.ecr.eu-west-1.amazonaws.com" | ||
|
||
jobs: | ||
|
@@ -87,7 +88,7 @@ jobs: | |
- name: Create master&builder docker | ||
run: | | ||
docker build -f docker/debian11/Dockerfile-master -t navitia/master_debian11 . | ||
docker build -f docker/debian11/Dockerfile-builder -t navitia/builder_debian11 . | ||
docker build -f docker/debian11/Dockerfile-builder-kraken -t navitia/builder_debian11 . | ||
- name: Build packages in master docker | ||
run: | | ||
|
@@ -185,7 +186,7 @@ jobs: | |
- name: Create navitia images | ||
run: | | ||
echo "********* Building Tyr Web ***************" | ||
docker build -t navitia/$component --build-arg GITHUB_TOKEN=${{ steps.ci-core-app-token.outputs.token }} -f docker/debian11/Dockerfile-tyr-web . | ||
docker build -t navitia/tyr-web --build-arg GITHUB_TOKEN=${{ steps.ci-core-app-token.outputs.token }} -f docker/debian11/Dockerfile-tyr-web . | ||
- name: Push dev images on SBX ECR | ||
if: github.ref == 'refs/heads/dev' | ||
|
@@ -414,46 +415,46 @@ jobs: | |
rm -rf ./.??* | ||
publish_aws: | ||
runs-on: [self-hosted, corefront, sandbox] | ||
name: Aws Dispatch (Dev) | ||
needs: [debian8_front_images, debian8_back_images, debian11_images, common_variables] | ||
steps: | ||
- name: Generate token for aws images | ||
id: app-token | ||
uses: getsentry/[email protected] | ||
with: | ||
app_id: ${{ secrets.GA_OS_WORKFLOW_TRIGGER_APP_ID }} | ||
private_key: ${{ secrets.GA_OS_WORKFLOW_TRIGGER_APP_PEM }} | ||
|
||
- name: Aws Dispatch Frontend for dev | ||
if: github.ref == 'refs/heads/dev' | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
token: ${{ steps.app-token.outputs.token }} | ||
repository: hove-io/corefront-aws-assets | ||
event-type: build-trigger | ||
client-payload: '{"branch": "dev", "tag": "dev"}' | ||
|
||
- name: Aws Dispatch Frontend for release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
token: ${{ steps.app-token.outputs.token }} | ||
repository: hove-io/corefront-aws-assets | ||
event-type: build-trigger | ||
client-payload: '{"branch": "release", "tag": "${{ needs.common_variables.outputs.RELEASE_TAG }}"}' | ||
|
||
- name: failure notification | ||
if: failure() | ||
run: | | ||
sudo apt update && sudo apt install -y httpie | ||
echo '{"text":":warning: Github Actions: dockers_builder the job publish_aws failed !"}' | http --json POST ${{secrets.SLACK_NAVITIA_TEAM_URL}} | ||
# publish_aws: | ||
# runs-on: [self-hosted, corefront, sandbox] | ||
# name: Aws Dispatch (Dev) | ||
# needs: [debian8_front_images, debian8_back_images, debian11_images, common_variables] | ||
# steps: | ||
# - name: Generate token for aws images | ||
# id: app-token | ||
# uses: getsentry/[email protected] | ||
# with: | ||
# app_id: ${{ secrets.GA_OS_WORKFLOW_TRIGGER_APP_ID }} | ||
# private_key: ${{ secrets.GA_OS_WORKFLOW_TRIGGER_APP_PEM }} | ||
|
||
# - name: Aws Dispatch Frontend for dev | ||
# if: github.ref == 'refs/heads/dev' | ||
# uses: peter-evans/repository-dispatch@v2 | ||
# with: | ||
# token: ${{ steps.app-token.outputs.token }} | ||
# repository: hove-io/corefront-aws-assets | ||
# event-type: build-trigger | ||
# client-payload: '{"branch": "dev", "tag": "dev"}' | ||
|
||
# - name: Aws Dispatch Frontend for release | ||
# if: startsWith(github.ref, 'refs/tags/') | ||
# uses: peter-evans/repository-dispatch@v2 | ||
# with: | ||
# token: ${{ steps.app-token.outputs.token }} | ||
# repository: hove-io/corefront-aws-assets | ||
# event-type: build-trigger | ||
# client-payload: '{"branch": "release", "tag": "${{ needs.common_variables.outputs.RELEASE_TAG }}"}' | ||
|
||
# - name: failure notification | ||
# if: failure() | ||
# run: | | ||
# sudo apt update && sudo apt install -y httpie | ||
# echo '{"text":":warning: Github Actions: dockers_builder the job publish_aws failed !"}' | http --json POST ${{secrets.SLACK_NAVITIA_TEAM_URL}} | ||
|
||
|
||
run_artemis: | ||
runs-on: [self-hosted, corefront, sandbox] | ||
needs: [publish_aws] | ||
needs: [debian11_back_images, debian11_front_images] | ||
name: Run artemis Dispatch (Dev) | ||
if: github.ref == 'refs/heads/dev' | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
FROM debian:bullseye-slim | ||
|
||
RUN apt-get update \ | ||
&& apt install -y python git libgeos-c1v5 libpq5 curl | ||
|
||
RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py | ||
RUN python2 get-pip.py | ||
|
||
# Install some binaries from tartare-tools | ||
ENV TARTARE_TOOLS_VERSION="v0.46.0" | ||
ARG GITHUB_TOKEN | ||
RUN git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/hove-io/".insteadOf "ssh://[email protected]/hove-io/" | ||
RUN git clone -b ${TARTARE_TOOLS_VERSION} --depth 1 https://x-access-token:${GITHUB_TOKEN}@github.com/hove-io/tartare-tools | ||
|
||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
# rustc 1.80.0 broke the compilation | ||
RUN rustup install 1.79.0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters