Compare commits

...
Author SHA1 Message Date
Marcos Rodrigues Silva 94049d6e8e Merge pull request #356 from dadosfera/chore/oracle
CI: oracle
2025-08-07 12:27:08 -03:00
marcos-silva-rodrigues c28cc58ac7 CI: oracle 2025-08-07 12:24:44 -03:00
Marcos Rodrigues Silva 56a655bb90 Merge pull request #355 from dadosfera/chore/oracle
CI: fix env home
2025-08-07 12:16:02 -03:00
marcos-silva-rodrigues b3d4a6b028 CI: fix env home 2025-08-07 12:13:19 -03:00
Marcos Rodrigues Silva c7bd1f761a Merge pull request #354 from dadosfera/chore/oracle
CI: remove k8s-setup need
2025-08-07 12:01:43 -03:00
marcos-silva-rodrigues 09c045455e CI: remove k8s-setup need 2025-08-07 11:59:37 -03:00
Marcos Rodrigues Silva 52d651126e Merge pull request #353 from dadosfera/chore/oracle
CI: revert k8s-setup workflow for the step in job helmfile-deploy
2025-08-07 11:57:38 -03:00
marcos-silva-rodrigues 2f11b1e78f CI: revert k8s-setup workflow for the step in job helmfile-deploy 2025-08-07 11:56:54 -03:00
Marcos Rodrigues Silva 885e9b71bb Merge pull request #352 from dadosfera/fix/tracker-sso
Fix/tracker sso
2025-08-07 11:45:44 -03:00
Marcos Rodrigues Silva ac26ad9f44 Merge pull request #351 from dadosfera/chore/oracle
FIX: correct name
2025-08-01 18:06:27 -03:00
marcos-silva-rodrigues fbe00af6dc FIX: correct name 2025-08-01 18:05:19 -03:00
Marcos Rodrigues Silva bfa9929b69 Merge pull request #350 from dadosfera/chore/oracle
Chore/oracle
2025-08-01 18:01:38 -03:00
marcos-silva-rodrigues bada7000f6 CHORE: change ci to oracle cloud 2025-08-01 18:01:10 -03:00
3 changed files with 46 additions and 14 deletions
+41 -10
View File
@@ -142,17 +142,19 @@ jobs:
docker system prune --volumes -a -f docker system prune --volumes -a -f
docker system df docker system df
k8s-setup: # k8s-setup:
needs: [extract_environment] # needs: [extract_environment]
uses: ./.github/workflows/k8s-setup.yml # uses: ./.github/workflows/k8s-setup.yml
with: # with:
cloud: azure # cloud: oracle
environment: ${{ needs.extract_environment.outputs.environment }} # environment: ${{ needs.extract_environment.outputs.environment }}
secrets: inherit # secrets: inherit
helmfile-deploy: helmfile-deploy:
needs: [extract_environment, semantic_release, build_ecr_image, k8s-setup] needs: [extract_environment, semantic_release, build_ecr_image]
runs-on: [self-hosted, "prd-azure"] env:
HOME: /home/runner
runs-on: [self-hosted, "prd-oracle"]
environment: ${{ needs.extract_environment.outputs.environment }} environment: ${{ needs.extract_environment.outputs.environment }}
steps: steps:
@@ -164,6 +166,18 @@ jobs:
with: with:
version: 'v3.9.0' version: 'v3.9.0'
- name: Install OCI CLI
run: |
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" -- --accept-all-defaults
echo "$HOME/bin" >> $GITHUB_PATH
- name: Configure OCI CLI
run: |
mkdir -p ~/.oci || true
echo "${{ secrets.OCI_CONFIG }}" > ~/.oci/config
echo "${{ secrets.OCI_PRIVATE_KEY }}" > ~/.oci/oci_api_key.pem
chmod 600 ~/.oci/oci_api_key.pem
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
@@ -173,12 +187,29 @@ jobs:
run: | run: |
wget https://github.com/helmfile/helmfile/releases/download/v0.148.0/helmfile_0.148.0_linux_amd64.tar.gz wget https://github.com/helmfile/helmfile/releases/download/v0.148.0/helmfile_0.148.0_linux_amd64.tar.gz
tar -xzf helmfile_0.148.0_linux_amd64.tar.gz tar -xzf helmfile_0.148.0_linux_amd64.tar.gz
mv helmfile /usr/local/bin/ sudo mv helmfile /usr/local/bin/
helmfile --version helmfile --version
- name: Install Helm Diff Plugin - name: Install Helm Diff Plugin
run: helm plugin install https://github.com/databus23/helm-diff || true run: helm plugin install https://github.com/databus23/helm-diff || true
- name: Authenticate with OKE cluster
env:
ENV: ${{ needs.extract_environment.outputs.environment }}
STG_CLUSTER_ID: "ocid1.cluster.oc1.sa-saopaulo-1.aaaaaaaagh3jvln52a3ebm3dodx6emmhv5bmfs7i7sv2k4zkbcbrzcl6v37q"
PRD_CLUSTER_ID: "ocid1.cluster.oc1.sa-saopaulo-1.aaaaaaaanf3vptl6hc2tzd4enfd2hfpsht3wikxww5xejc3l7cwfm6l3sndq"
run: |
if [ "$ENV" = "stg" ]; then
CLUSTER_ID=$STG_CLUSTER_ID
elif [ "$ENV" = "prd" ]; then
CLUSTER_ID=$PRD_CLUSTER_ID
else
echo "Unknown environment: $ENV"
exit 1
fi
oci ce cluster create-kubeconfig --cluster-id ${CLUSTER_ID} --file $HOME/.kube/config --region sa-saopaulo-1 --token-version 2.0.0 --kube-endpoint PRIVATE_ENDPOINT
- name: Run Helmfile Apply - name: Run Helmfile Apply
env: env:
ENV: ${{ needs.extract_environment.outputs.environment }} ENV: ${{ needs.extract_environment.outputs.environment }}
+4 -3
View File
@@ -37,9 +37,11 @@ jobs:
with: with:
version: 'v1.30.1' version: 'v1.30.1'
oci: oracle:
if: inputs.cloud == 'oci' if: inputs.cloud == 'oracle'
runs-on: [self-hosted, "prd-oracle"] runs-on: [self-hosted, "prd-oracle"]
env:
HOME: /home/runner
steps: steps:
- name: Install OCI CLI - name: Install OCI CLI
run: | run: |
@@ -58,7 +60,6 @@ jobs:
ENV: ${{ inputs.environment }} ENV: ${{ inputs.environment }}
STG_CLUSTER_ID: "ocid1.cluster.oc1.sa-saopaulo-1.aaaaaaaagh3jvln52a3ebm3dodx6emmhv5bmfs7i7sv2k4zkbcbrzcl6v37q" STG_CLUSTER_ID: "ocid1.cluster.oc1.sa-saopaulo-1.aaaaaaaagh3jvln52a3ebm3dodx6emmhv5bmfs7i7sv2k4zkbcbrzcl6v37q"
PRD_CLUSTER_ID: "ocid1.cluster.oc1.sa-saopaulo-1.aaaaaaaanf3vptl6hc2tzd4enfd2hfpsht3wikxww5xejc3l7cwfm6l3sndq" PRD_CLUSTER_ID: "ocid1.cluster.oc1.sa-saopaulo-1.aaaaaaaanf3vptl6hc2tzd4enfd2hfpsht3wikxww5xejc3l7cwfm6l3sndq"
HOME: /home/runner
run: | run: |
if [ "$ENV" = "stg" ]; then if [ "$ENV" = "stg" ]; then
CLUSTER_ID=$STG_CLUSTER_ID CLUSTER_ID=$STG_CLUSTER_ID
+1 -1
View File
@@ -60,7 +60,7 @@ affinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
- matchExpressions: - matchExpressions:
- key: application - key: name
operator: In operator: In
values: values:
- general - general