Skip to content

SDKTECHNO-267: change SMT_MAX_INSTANCES_FETCHED to SUM_MAX_INSTANCES_… #2948

SDKTECHNO-267: change SMT_MAX_INSTANCES_FETCHED to SUM_MAX_INSTANCES_…

SDKTECHNO-267: change SMT_MAX_INSTANCES_FETCHED to SUM_MAX_INSTANCES_… #2948

name: BUILD ONLY MODIFIED
on:
push:
branches:
- '*'
- 'hotfix/*'
- '!master'
jobs:
build:
runs-on: [self-hosted, technologies]
if: "!contains(github.event.head_commit.message, '[BOT]')"
steps:
- uses: actions/checkout@v1
- name: extract branch
id: extract_branch
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: run gradle :buildModifiedJobs
env:
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: |
./gradlew buildModifiedJobs --parallel --scan -Dversion.buildmeta=${{ steps.extract_branch.outputs.branch }}
- name: run gradle :buildModifiedApps
env:
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: |
./gradlew buildModifiedApps --scan -Dversion.buildmeta=${{ steps.extract_branch.outputs.branch }}
- name: get git changes
id: git_info
run: echo "::set-output name=changes::$(git status -s | wc -l)"
- name: Commit files
if: steps.git_info.outputs.changes > 0
run: |
git config --local user.email "github-action@saagie.com"
git config --local user.name "GitHub Action Bot"
git status
git add .
git commit -m "[BOT] Set version for this branch"
- name: Push changes
if: steps.git_info.outputs.changes > 0
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.TOKEN_GITHUB }}
branch: ${{ steps.extract_branch.outputs.branch }}
- name: extract version
id: extract_version
run: echo "::set-output name=v::$(cat version.properties | grep 'semver' | sed -e 's/^version.semver=//')"
- name: List all releases
uses: actions/github-script@0.3.0
with:
github-token: ${{ secrets.TOKEN_GITHUB }}
script: |
const result = await github.repos.listReleases(context.repo);
result.data
.filter(release => release.tag_name == "${{ steps.extract_version.outputs.v }}")
.forEach(function(release){
const releaseObj = {release_id:release.id, owner:context.repo.owner, repo:context.repo.repo}
github.repos.deleteRelease(releaseObj)
});
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
with:
tag_name: ${{ steps.extract_version.outputs.v }}
release_name: Release ${{ steps.extract_version.outputs.v }}
draft: false
prerelease: true
- name: Upload Release technologies Asset ZIP
id: upload-release-asset-technologies-zip
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tmp-zip/technologies.zip
asset_name: technologies.zip
asset_content_type: application/zip
- name: Upload Release technologies Asset JSON
id: upload-release-asset-technologies-json
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tmp-zip/docker_listing.json
asset_name: docker_listing.json
asset_content_type: application/json
- name: Upload Release technologies Asset TEXT-PLAIN
id: upload-release-asset-technologies-textplain
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tmp-zip/docker_listing.txt
asset_name: docker_listing.txt
asset_content_type: text/plain