Skip to content

Commit

Permalink
convert to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-jackson committed Mar 26, 2024
1 parent 83ce544 commit 75f05dc
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 88 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Continuous Integration

on:
push:

jobs:
build-and-publish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run tests
run: docker-compose -f action-services.yml run portal /data/run-tests.sh

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }}
tags: |
type=ref,event=branch
# set latest tag for main
type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
66 changes: 66 additions & 0 deletions action-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
services:
db:
image: mariadb:10
environment:
MYSQL_ROOT_PASSWORD: r00tp@ss!
MYSQL_DATABASE: test
MYSQL_USER: developer_portal
MYSQL_PASSWORD: developer_portal

redis:
image: redis:latest

api:
image: silintl/apiaxle-js:1.15.2
environment:
REDIS_HOST: redis
REDIS_PORT: 6379
DEBUG_MODE: 'false'
API_NAME_REGEX: "^(.+?)\\.api\\."
NODE_ENV: production
depends_on:
- redis
ports:
- "80"
command: api 80

proxy:
image: silintl/apiaxle-js:1.15.2
environment:
REDIS_HOST: redis
REDIS_PORT: 6379
DEBUG_MODE: 'false'
API_NAME_REGEX: "^(.+?)\\.api\\."
NODE_ENV: production
depends_on:
- api
- redis
ports:
- "80"
command: proxy 80 -q

portal:
build:
image: silintl/developer-portal
dockerfile_path: ./Dockerfile
cached: true
depends_on:
- db
- proxy:apiaxle.api.proxy
- proxy:test.api.proxy
- api
environment:
MYSQL_HOST: db
MYSQL_DATABASE: test
MYSQL_USER: developer_portal
MYSQL_PASSWORD: developer_portal
APIAXLE_ENDPOINT: http://apiaxle.api.proxy/v1
APIAXLE_KEY: developer-portal-dev-key
APIAXLE_SECRET: developer-portal-dev-secret
APIAXLE_SSL_VERIFYPEER: false
GOOGLE_OAUTH_ENABLED: false
SAML_ENTITY_ID: http://developer-portal.local/simplesaml/module.php/saml/sp/metadata.php/default-sp
SAML_ADMIN_PASSWORD: dummy-for-tests-q6.eYWtfLF-BTQXf-OktD5lVFCOFyC4B
SAML_SECRET_SALT: dummy-for-tests-Ac4MTgO9UJ6_wpXXKc6EGU_.gWNNkdMe
SAML_IDP: NONE
working_dir: /data
65 changes: 0 additions & 65 deletions codeship-services.yml

This file was deleted.

21 changes: 0 additions & 21 deletions codeship-steps.yml

This file was deleted.

2 changes: 0 additions & 2 deletions dockercfg.encrypted

This file was deleted.

0 comments on commit 75f05dc

Please sign in to comment.