Skip to content

Commit

Permalink
Merge pull request #234 from ansibleguy76/release/v5.0.7
Browse files Browse the repository at this point in the history
v5.0.7 into main
  • Loading branch information
ansibleguy76 authored Oct 3, 2024
2 parents c8625a1 + ef66a15 commit 0246c43
Show file tree
Hide file tree
Showing 19 changed files with 212 additions and 79 deletions.
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [5.0.7] - 2024-10-03

### Added

- Added scm branch option to pass to awx

### Fixed

- AzureAD with more than 100 groups was not working anymore since introduction of OIDC
- Mysql check during init failed and skipped part of init
- App now properly waits for mysql to be ready before starting
- Vuelidate 2+ was not working properly for dependent required fields

## [5.0.6] - 2024-09-20

### Fixed

- Removed ip lib parts CVE related
- Updated to vuelidate 2+ (CVE related)

### Added

- New dockerfile with debian

## [5.0.5] - 2024-09-18

### Fixed
Expand Down Expand Up @@ -739,7 +756,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Allow change password for current local user
- Start tracking versions

[Unreleased]: https://github.com/ansibleguy76/ansibleforms/compare/5.0.6...HEAD
[Unreleased]: https://github.com/ansibleguy76/ansibleforms/compare/5.0.7...HEAD

[5.0.7]: https://github.com/ansibleguy76/ansibleforms/compare/5.0.6...5.0.7

[5.0.6]: https://github.com/ansibleguy76/ansibleforms/compare/5.0.5...5.0.6

Expand Down
4 changes: 2 additions & 2 deletions app_versions.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ext.version_code = 50006
ext.version_name = "5.0.6"
ext.version_code = 50007
ext.version_name = "5.0.7"
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ansible_forms_vue",
"version": "5.0.6",
"version": "5.0.7",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
16 changes: 8 additions & 8 deletions client/src/views/Awx.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,23 @@
required
},
token:{
required:requiredIf(function(awx){
return !awx.use_credentials
required:requiredIf(function(){
return !this.awx.use_credentials
})
},
ca_bundle:{
required:requiredIf(function(awx){
return !awx.ignore_certs
required:requiredIf(function(){
return !this.awx.ignore_certs
})
},
username:{
required:requiredIf(function(awx){
return awx.use_credentials
required:requiredIf(function(){
return !!this.awx.use_credentials
})
},
password:{
required:requiredIf(function(awx){
return awx.use_credentials
required:requiredIf(function(){
return this.awx.use_credentials
})
}
}
Expand Down
8 changes: 4 additions & 4 deletions client/src/views/AzureAd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@
validations: {
azuread:{
client_id: {
required:requiredIf(function(azuread){
return azuread.enable
required:requiredIf(function(){
return !!this.azuread.enable
})
},
secret_id:{
required:requiredIf(function(azuread){
return azuread.enable
required:requiredIf(function(){
return !!this.azuread.enable
})
}
Expand Down
8 changes: 4 additions & 4 deletions client/src/views/Ldap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@
required
},
cert:{
requiredIf:requiredIf(function(ldap){
return ldap.enable_tls && !ldap.ignore_certs
requiredIf:requiredIf(function(){
return !!this.ldap.enable_tls && !this.ldap.ignore_certs
})
},
ca_bundle:{
requiredIf:requiredIf(function(ldap){
return ldap.enable_tls && !ldap.ignore_certs
requiredIf:requiredIf(function(){
return !!this.ldap.enable_tls && !this.ldap.ignore_certs
})
}
Expand Down
16 changes: 13 additions & 3 deletions client/src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
if (res.data['@odata.nextLink']) {
// If there's a nextLink, make a recursive call to get the next page of data
this.getGroupsAndLogin(token, res.data['@odata.nextLink'], allGroups);
this.getGroupsAndLogin(token, res.data['@odata.nextLink'], type, allGroups);
} else {
// No more nextLink, you have all the groups
this.tokenLogin(token, allGroups)
Expand All @@ -122,15 +122,25 @@
this.$toast.error("Failed to get group membership");
});
}
else {
else if (type === 'oidc') {
const payload = jwt.decode(token, {complete: true}).payload
this.tokenLogin(token, payload.groups || [], 'oidc')
}else{
this.$toast.error("Invalid Identity Provider type, contact developer")
}
},
tokenLogin(token, allGroups, type='azuread') {
var validRegex=true
var regex
const groupfilter = type === 'azuread' ? this.azureGroupfilter : this.oidcGroupfilter
var groupfilter
if(type === 'azuread'){
groupfilter = this.azureGroupfilter
}else if(type === 'oidc'){
groupfilter = this.oidcGroupfilter
}else{
this.$toast.error("Invalid Identity Provider type, contact developer")
return false
}
try{
regex = new RegExp(groupfilter, 'g');
}catch(e){
Expand Down
12 changes: 6 additions & 6 deletions client/src/views/OIDC.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,18 @@
validations: {
oidc:{
issuer: {
required:requiredIf(function(oidc){
return oidc.enabled
required:requiredIf(function(){
return !!this.oidc.enabled
})
},
client_id: {
required:requiredIf(function(oidc){
return oidc.enabled
required:requiredIf(function(){
return !!this.oidc.enabled
})
},
secret_id:{
required:requiredIf(function(oidc){
return oidc.enabled
required:requiredIf(function(){
return !!this.oidc.enabled
})
}
Expand Down
10 changes: 10 additions & 0 deletions docs/_data/help.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,16 @@
**Note** : You can also dynamically set the instanceGroups by using a field called `__instanceGroups__`. It must be sent as extravar. If this extravar is found it will overwrite the static instanceGroups.
**Note** : If you use multistep and you want to dynamically set every step, use the `key` property and `model` property to create separate extravars per step.
- name: scmBranch
type: string
short: SCM Branch
version: 5.0.0
group: workflow
description: |
Awx allows to pass the scm branch. Use this property to pass it to your template.
**Note** : You can also dynamically set the scmBranch by using a field called `__scmBranch__`. It must be sent as extravar. If this extravar is found it will overwrite the static scmBranch.
**Note** : If you use multistep and you want to dynamically set every step, use the `key` property and `model` property to create separate extravars per step.
- name: awxCredentials
type: array
group: workflow
Expand Down
53 changes: 16 additions & 37 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,22 @@ FROM node:16-alpine AS node

FROM node AS nodebase

# Use /app as CWD
WORKDIR /app

# Install github package
RUN wget -O /bin/ytt github.com/vmware-tanzu/carvel-ytt/releases/download/v0.49.0/ytt-linux-amd64
RUN chmod -R +x /bin/ytt

# Use /app as CWD
WORKDIR /app
# isntall apk packages
RUN apk add py3-pip py3-pyldap libxslt mysql-client curl tzdata mariadb-connector-c openssh sshpass git vim

# install ansible
RUN apk add ansible

# upgrade pip
RUN apk add py3-pip

# install some python dependencies
RUN pip3 install requests six
RUN apk add --update --no-cache --virtual .build-deps g++ gcc libxml2-dev libxslt-dev unixodbc-dev python3-dev postgresql-dev
RUN apk add --no-cache libxslt
RUN apk add --no-cache mysql-client
RUN apk add --no-cache curl
RUN apk add --no-cache py3-pyldap
RUN apk add --no-cache tzdata
RUN pip3 install --no-cache-dir lxml
RUN apk del .build-deps
RUN pip3 install PyMySQL
RUN pip3 install netapp_lib
RUN pip3 install netapp_ontap
RUN pip3 install solidfire-sdk-python
RUN pip3 install boto3
RUN pip3 install boto
RUN pip3 install botocore
# install some dev packages
# RUN apk add --update --no-cache --virtual .build-deps g++ gcc libxml2-dev libxslt-dev unixodbc-dev python3-dev postgresql-dev && apk del .build-deps
# looks like this is no longer needed

# install pip3 packages
RUN pip3 install requests six PyMySQL netapp_lib netapp_ontap solidfire-sdk-python boto3 boto botocore lxml ansible

# run ansible galaxy modules
RUN ansible-galaxy collection install netapp.ontap -p /usr/share/ansible/collections
Expand All @@ -45,25 +32,16 @@ RUN ansible-galaxy collection install netapp.storagegrid -p /usr/share/ansible/c
RUN ansible-galaxy collection install community.general -p /usr/share/ansible/collections
RUN ansible-galaxy collection install community.mysql -p /usr/share/ansible/collections

# add mariadb connector for mysql dump
RUN apk add --no-cache mariadb-connector-c

# add ssh
RUN apk add --no-cache openssh
# make ssh directory
RUN mkdir -p ~/.ssh

# add sshpass
RUN apk add --no-cache sshpass

# add git
RUN apk add --no-cache git

# update npm
RUN npm install -g npm@9.8.1

##################################################
# builder stage
# intermediate build to compile application
# can run in parallel with base stage

FROM node AS tmp_builder

Expand All @@ -73,9 +51,10 @@ WORKDIR /app
# Copy package.json and package-lock.json to /app
COPY package*.json ./

# Install all dependencies
# Update npm
RUN npm install -g npm@9.8.1

# install node modules
RUN npm install

# Copy the rest of the code
Expand Down
Loading

0 comments on commit 0246c43

Please sign in to comment.