forked from jfrog/project-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (105 loc) · 3.95 KB
/
masterbuild.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: "Master Build Mock"
on: push
permissions:
# This is required for requesting the OIDC token
id-token: write
# This is required for actions/checkout
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JFrog CLI
uses: RobiNino/setup-jfrog-cli@reorder-summary
env:
JF_URL: ${{ vars.JF_URL }}
JF_USER: ${{ secrets.JF_USER }}
JF_PASSWORD: ${{ secrets.JF_PASSWORD }}
#JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
with:
download-repository: generic-local-robi
#disable-job-summary: false
version: 2.59.1
# # OIDC provider name from the OIDC integration page in the JFrog Platform
# #oidc-provider-name: robi-oidc-test-groups
- name: Setup Python3
uses: actions/setup-python@v5
with:
python-version: "3.11.5"
- name: Setup Pipenv
run: python -m pip install --upgrade pip setuptools wheel
- name: Install npm
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Package managers versions
run: |
#jf rt dl generic-local-robi/cli-for-summary/jfrog-cli-linux-amd64/jfrog --flat --fail-no-op
#chmod +x ./jfrog
jf -v
which jf
docker --version
mvn -v
python --version
pip --version
wheel version
pip show setuptools
echo $VIRTUAL_ENV
node -v
npm -v
go version
- name: Docker multi platform build
run: |
cd docker-oci-examples/fat-manifest-example
echo ${{ secrets.JF_PASSWORD }} | docker login ${{ vars.JF_URL }} -u ${{ secrets.JF_USER }} --password-stdin
docker buildx install
docker buildx create --use --name mybuilder --driver docker-container
docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v7 --tag=ecosysjfrog.jfrog.io/docker-local/multiarch-image:1 -f=Dockerfile.Fatmanifest --metadata-file=build-metadata --push .
jf rt build-docker-create docker-local --image-file build-metadata
docker buildx uninstall
- name: Docker build
run: |
cd docker-oci-examples/docker-example
export DOCKER_IMAGE_NAME=ecosysjfrog.jfrog.io/docker-local/hello-frog:1.0.0
docker build -t $DOCKER_IMAGE_NAME .
jf docker push $DOCKER_IMAGE_NAME
#- name: Maven build
# run: |
# cd maven-examples/maven-example
# jf mvnc --repo-deploy-releases=libs-release --repo-deploy-snapshots=libs-snapshot --repo-resolve-releases=libs-release --repo-resolve-snapshots=libs-snapshot
# jf mvn clean install
- name: Pip build
run: |
cd python-example/pip-example/
jf pip-config --repo-resolve=robi-pypi-virtual
jf pip install . --module=jfrog-python-example
python setup.py sdist bdist_wheel
jf rt u dist/ robi-pypi-virtual/ --module=jfrog-python-example
- name: Npm build
run: |
cd npm-example
jf npm-config --repo-resolve=robi-npm --repo-deploy=robi-npm
jf npm i
jf npm publish
- name: Go build
run: |
cd golang-example
jf go-config --repo-resolve=robi-go --repo-deploy=robi-go
jf go build
jf go-publish v1.0.0
- name: Generic build
run: |
cd bash-example
jf rt u ./deploy-file.sh generic-local-robi/ --module=generic-module
- name: Terraform build
run: |
cd terraformproject
jf terraform-config --repo-deploy=robi-terraform-local
cd aws
jf terraform publish --namespace=example --provider=aws --tag=v0.0.1 --module=terraform-module --exclusions="*test*;*ignore*"
- name: Publish build info
run: |
jf rt bce
jf rt bp